#
802a0389 |
| 03-Jul-2024 |
Srujana Challa <schalla@marvell.com> |
net/virtio: store desc IOVA address in vring structure
Stores desc IOVA in the queue's vring data structure, as preliminary work to provide a way for Virtio-user to share desc IOVA to the vhost back
net/virtio: store desc IOVA address in vring structure
Stores desc IOVA in the queue's vring data structure, as preliminary work to provide a way for Virtio-user to share desc IOVA to the vhost backend.
Signed-off-by: Srujana Challa <schalla@marvell.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
8c41645b |
| 20-Sep-2023 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
net/virtio: fix descriptor addresses in 32-bit build
With Virtio-user, the Virtio descriptor buffer address is the virtual address of the mbuf's buffer. On 32-bit builds, it is expected to be 32 bit
net/virtio: fix descriptor addresses in 32-bit build
With Virtio-user, the Virtio descriptor buffer address is the virtual address of the mbuf's buffer. On 32-bit builds, it is expected to be 32 bits.
With Virtio-PCI, the Virtio descriptor buffer address is the physical address of the mbuf's buffer. On 32-bit builds running on 64-bit kernel, it is expected to be up to 64 bits.
This patch introduces a new mask field in virtqueue's struct to filter our the upper 4 bytes of the address only when necessary. An optimization is introduced for 64-bit builds to remove the masking, as the address is always 64 bits wide.
Fixes: ba55c94a7ebc ("net/virtio: revert forcing IOVA as VA mode for virtio-user") Cc: stable@dpdk.org
Reported-by: Sampath Peechu <speechu@cisco.com> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
show more ...
|
#
b02b02b6 |
| 09-Feb-2023 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
net/virtio: extract virtqueue init from virtio queue init
This patch extracts the virtqueue initialization out of the Virtio ethdev queue initialization, as preliminary work to provide a way for Vir
net/virtio: extract virtqueue init from virtio queue init
This patch extracts the virtqueue initialization out of the Virtio ethdev queue initialization, as preliminary work to provide a way for Virtio-user to allocate its shadow control virtqueue.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
show more ...
|
#
d5284f0d |
| 09-Feb-2023 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
net/virtio: alloc Rx SW ring only if vectorized path
This patch only allocates the SW ring when vectorized datapath is used. It also moves the SW ring and fake mbuf in the virtnet_rx struct since th
net/virtio: alloc Rx SW ring only if vectorized path
This patch only allocates the SW ring when vectorized datapath is used. It also moves the SW ring and fake mbuf in the virtnet_rx struct since this is Rx-only.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
show more ...
|
#
89149851 |
| 09-Feb-2023 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
net/virtio: refactor indirect desc headers init
This patch refactors the indirect descriptors headers initialization in a dedicated function, and makes it used by both queue init and reset functions
net/virtio: refactor indirect desc headers init
This patch refactors the indirect descriptors headers initialization in a dedicated function, and makes it used by both queue init and reset functions.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
show more ...
|
#
5fddf290 |
| 09-Feb-2023 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
net/virtio: move vring memzone to virtqueue struct
Whatever its type (Rx, Tx or Ctl), all the virtqueue require a memzone for the vrings. This patch moves its pointer to the virtqueue struct, simpli
net/virtio: move vring memzone to virtqueue struct
Whatever its type (Rx, Tx or Ctl), all the virtqueue require a memzone for the vrings. This patch moves its pointer to the virtqueue struct, simplifying the code.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
show more ...
|
#
a632f0f6 |
| 09-Feb-2023 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
net/virtio: refactor virtqueue headers allocation
This patch refactors virtqueue initialization by moving its headers allocation and deallocation in dedicated function.
While at it, it renames the
net/virtio: refactor virtqueue headers allocation
This patch refactors virtqueue initialization by moving its headers allocation and deallocation in dedicated function.
While at it, it renames the memzone metadata and address pointers in the virtnet_tx and virtnet_ctl structures to remove redundant virtio_net_ prefix.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
show more ...
|
#
7be78d02 |
| 29-Nov-2021 |
Josh Soref <jsoref@gmail.com> |
fix spelling in comments and strings
The tool comes from https://github.com/jsoref
Signed-off-by: Josh Soref <jsoref@gmail.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
|
#
04bcc802 |
| 13-Oct-2021 |
Xuan Ding <xuan.ding@intel.com> |
net/virtio: fix indirect descriptor reconnection
Add initialization for packed ring indirect descriptors in reconnection path.
Fixes: 381f39ebb78a ("net/virtio: fix packed ring indirect descricptor
net/virtio: fix indirect descriptor reconnection
Add initialization for packed ring indirect descriptors in reconnection path.
Fixes: 381f39ebb78a ("net/virtio: fix packed ring indirect descricptors setup") Cc: stable@dpdk.org
Signed-off-by: Xuan Ding <xuan.ding@intel.com> Tested-by: Yinan Wang <yinan.wang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
b5ba7ee4 |
| 26-Jan-2021 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
net/virtio: remove last PCI refs in non-PCI code
This patch finalizes the bus isolation part of this refactoring.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Chenbo Xia
net/virtio: remove last PCI refs in non-PCI code
This patch finalizes the bus isolation part of this refactoring.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
show more ...
|
#
b4f9a45a |
| 26-Jan-2021 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
net/virtio: move features definition to generic header
This patch moves all the Virtio definition to the generic header. It also renames some helpers to no more reference PCI.
Signed-off-by: Maxime
net/virtio: move features definition to generic header
This patch moves all the Virtio definition to the generic header. It also renames some helpers to no more reference PCI.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
show more ...
|
#
f50560a5 |
| 15-May-2020 |
Marvin Liu <yong.liu@intel.com> |
net/virtio: fix unexpected event after reconnect
Event notification should be disabled after virtqueue initialization and enabled by calling rte_eth_dev_rx_intr_enable later. When virtio user device
net/virtio: fix unexpected event after reconnect
Event notification should be disabled after virtqueue initialization and enabled by calling rte_eth_dev_rx_intr_enable later. When virtio user device reconnecting to vhost, virtqueue_disable_intr should be called to disable event notification.
Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode") Cc: stable@dpdk.org
Signed-off-by: Marvin Liu <yong.liu@intel.com> Acked-by: Xiao Wang <xiao.w.wang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
ea5207c1 |
| 30-Apr-2020 |
Joyce Kong <joyce.kong@arm.com> |
virtio: use one way barrier for split vring used index
In case VIRTIO_F_ORDER_PLATFORM(36) is not negotiated, then the frontend and backend are assumed to be implemented in software, that is they ca
virtio: use one way barrier for split vring used index
In case VIRTIO_F_ORDER_PLATFORM(36) is not negotiated, then the frontend and backend are assumed to be implemented in software, that is they can run on identical CPUs in an SMP configuration. Thus a weak form of memory barriers like rte_smp_r/wmb, other than rte_cio_r/wmb, is sufficient for this case(vq->hw->weak_barriers == 1) and yields better performance. For the above case, this patch helps yielding even better performance by replacing the two-way barriers with C11 one-way barriers for used index in split ring.
Signed-off-by: Joyce Kong <joyce.kong@arm.com> Reviewed-by: Gavin Hu <gavin.hu@arm.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
4710e16a |
| 29-Apr-2020 |
Marvin Liu <yong.liu@intel.com> |
net/virtio: add parameter to enable vectorized path
Previously, virtio split ring vectorized path was enabled by default. This is not suitable for everyone because that path does not follow virtio s
net/virtio: add parameter to enable vectorized path
Previously, virtio split ring vectorized path was enabled by default. This is not suitable for everyone because that path does not follow virtio spec. Add new devarg for virtio vectorized path selection. By default vectorized path is disabled.
Signed-off-by: Marvin Liu <yong.liu@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
6ebbf410 |
| 15-Jan-2020 |
Xuan Ding <xuan.ding@intel.com> |
net/virtio-user: fix packed ring server mode
This patch fixes the situation where data path does not work properly when vhost reconnects to virtio in server mode with packed ring.
Currently, virtio
net/virtio-user: fix packed ring server mode
This patch fixes the situation where data path does not work properly when vhost reconnects to virtio in server mode with packed ring.
Currently, virtio and vhost share memory of vring. For split ring, vhost can read the status of descriptors directly from the available ring and the used ring during reconnection. Therefore, the data path can continue.
But for packed ring, when reconnecting to virtio, vhost cannot get the status of descriptors via the descriptor ring. By resetting Tx and Rx queues, the data path can restart from the beginning.
Fixes: 4c3f5822eb21 ("net/virtio: add packed virtqueue defines") Cc: stable@dpdk.org
Signed-off-by: Xuan Ding <xuan.ding@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
4cdc4d98 |
| 19-Mar-2019 |
Tiwei Bie <tiwei.bie@intel.com> |
net/virtio: drop redundant suffix in packed ring structure
Drop redundant suffix (_packed and _event) from the fields in packed ring structure.
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com> Review
net/virtio: drop redundant suffix in packed ring structure
Drop redundant suffix (_packed and _event) from the fields in packed ring structure.
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com> Reviewed-by: Jens Freimann <jfreimann@redhat.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
dfd33aa4 |
| 19-Mar-2019 |
Tiwei Bie <tiwei.bie@intel.com> |
net/virtio: refactor virtqueue structure
Put split ring and packed ring specific fields into separate sub-structures, and also union them as they won't be available at the same time.
Signed-off-by:
net/virtio: refactor virtqueue structure
Put split ring and packed ring specific fields into separate sub-structures, and also union them as they won't be available at the same time.
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
a76290c8 |
| 17-Dec-2018 |
Jens Freimann <jfreimann@redhat.com> |
net/virtio: implement Rx path for packed queues
Implement the receive part.
Signed-off-by: Jens Freimann <jfreimann@redhat.com> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com> Reviewed-by: Maxime Co
net/virtio: implement Rx path for packed queues
Implement the receive part.
Signed-off-by: Jens Freimann <jfreimann@redhat.com> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
7097ca1b |
| 02-Jul-2018 |
Marvin Liu <yong.liu@intel.com> |
net/virtio: free in-order descriptors before device start
Add new function for freeing IN_ORDER descriptors. As descriptors will be allocated and freed sequentially when IN_ORDER feature was negotia
net/virtio: free in-order descriptors before device start
Add new function for freeing IN_ORDER descriptors. As descriptors will be allocated and freed sequentially when IN_ORDER feature was negotiated. There will be no need to utilize chain for freed descriptors management, only index update is enough.
Signed-off-by: Marvin Liu <yong.liu@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
727411f5 |
| 23-Jan-2018 |
Olivier Matz <olivier.matz@6wind.com> |
net/virtio: fix typo in function name
Fixes: c1f86306a026 ("virtio: add new driver")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
|
#
e67ae1e2 |
| 23-Jan-2018 |
Olivier Matz <olivier.matz@6wind.com> |
net/virtio: fix queue flushing with vector Rx enabled
When using vector Rx mode (use_simple_rx = 1), vq->vq_descx[] is not kept up to date. To properly detach the mbufs in this case, browse sw_ring[
net/virtio: fix queue flushing with vector Rx enabled
When using vector Rx mode (use_simple_rx = 1), vq->vq_descx[] is not kept up to date. To properly detach the mbufs in this case, browse sw_ring[] instead, as it's done in virtqueue_rxvq_flush().
Since we need virtio_get_queue_type(), also move this function in virtqueue.h as a static inline.
Fixes: fc3d66212fed ("virtio: add vector Rx") Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
show more ...
|
#
bcf55c93 |
| 11-Dec-2017 |
Tiwei Bie <tiwei.bie@intel.com> |
net/virtio: fix vector Rx flushing
The vector Rx will be broken if backend has consumed all the descs in the avail ring before the device is started. Because in current implementation, vector Rx wil
net/virtio: fix vector Rx flushing
The vector Rx will be broken if backend has consumed all the descs in the avail ring before the device is started. Because in current implementation, vector Rx will return immediately without refilling the avail ring if the used ring is empty. So we have to refill the avail ring after flushing the elements in the used ring for vector Rx.
Besides, vector Rx has a different ring layout assumption and mbuf management. So we need to handle it differently.
Fixes: d8227497ec5c ("net/virtio: flush Rx queues on start") Cc: stable@dpdk.org
Reported-by: Antonio Fischetti <antonio.fischetti@intel.com> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Tested-by: Antonio Fischetti <antonio.fischetti@intel.com> Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
show more ...
|
#
5566a3e3 |
| 19-Dec-2017 |
Bruce Richardson <bruce.richardson@intel.com> |
drivers: use SPDX tag for Intel copyright files
Replace the BSD license header with the SPDX tag for files with only an Intel copyright on them.
Signed-off-by: Bruce Richardson <bruce.richardson@in
drivers: use SPDX tag for Intel copyright files
Replace the BSD license header with the SPDX tag for files with only an Intel copyright on them.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
#
d8227497 |
| 20-Oct-2017 |
Tiwei Bie <tiwei.bie@intel.com> |
net/virtio: flush Rx queues on start
After starting a device, the driver shouldn't deliver the packets that already existed before the device is started to applications. Otherwise it will lead to in
net/virtio: flush Rx queues on start
After starting a device, the driver shouldn't deliver the packets that already existed before the device is started to applications. Otherwise it will lead to incorrect packet collection for port state. This patch fixes this issue by flushing the Rx queues when starting the device.
Fixes: a85786dc816f ("virtio: fix states handling during initialization") Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com> Reviewed-by: Jens Freimann <jfreimann@redhat.com> Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
show more ...
|
#
c056be23 |
| 17-Jan-2017 |
Jianfeng Tan <jianfeng.tan@intel.com> |
net/virtio: add Rx interrupt enable/disable functions
This patch implements interrupt enable/disable functions for each Rx queue. And we rely on flags of avail queue as the hint for virtio device to
net/virtio: add Rx interrupt enable/disable functions
This patch implements interrupt enable/disable functions for each Rx queue. And we rely on flags of avail queue as the hint for virtio device to interrupt virtio driver or not.
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com> Tested-by: Lei Yao <lei.a.yao@intel.com> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
show more ...
|