[dpdk-dev] [DPDK] net/virtio: packed ring notification data feature support
Liu, Yong
yong.liu at intel.com
Thu Jan 9 08:29:29 CET 2020
> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Cheng Jiang
> Sent: Wednesday, December 04, 2019 11:03 PM
> To: dev at dpdk.org
> Cc: maxime.coquelin at redhat.com; Bie, Tiwei <tiwei.bie at intel.com>; Wang,
> Zhihong <zhihong.wang at intel.com>; Jiang, Cheng1 <cheng1.jiang at intel.com>
> Subject: [dpdk-dev] [DPDK] net/virtio: packed ring notification data
> feature support
>
> This patch supports the feature that the driver passes extra data
> (besides identifying the virtqueue) in its device notifications.
>
> Signed-off-by: Cheng Jiang <Cheng1.jiang at intel.com>
> ---
> drivers/net/virtio/virtio_ethdev.h | 3 ++-
> drivers/net/virtio/virtio_pci.c | 15 ++++++++++++++-
> drivers/net/virtio/virtio_pci.h | 6 ++++++
> 3 files changed, 22 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/virtio/virtio_ethdev.h
> b/drivers/net/virtio/virtio_ethdev.h
> index a10111758..cd8947656 100644
> --- a/drivers/net/virtio/virtio_ethdev.h
> +++ b/drivers/net/virtio/virtio_ethdev.h
> + if (vtpci_with_feature(hw, VIRTIO_F_RING_PACKED))
> + notify_data = ((((uint32_t)vq->vq_packed.used_wrap_counter <<
> 15) |
> + vq->vq_avail_idx) << 16) | vq->vq_queue_index;
> + else
> + notify_data = ((uint32_t)vq->vq_avail_idx << 16) |
> + vq->vq_queue_index;
Hi Cheng,
According to virtio1.1 spec, wrap counter should refer to next available descriptor.
So used_wrap_counter should be replaced with avail_wrap_counter. Sorry for late noticing.
Thanks,
Marvin
> + rte_write32(notify_data, vq->notify_addr);
> }
>
More information about the dev
mailing list