[PATCH v1 10/21] net/virtio: alloc Rx SW ring only if vectorized path
Maxime Coquelin
maxime.coquelin at redhat.com
Tue Feb 7 11:12:03 CET 2023
On 1/30/23 08:49, Xia, Chenbo wrote:
> Hi Maxime,
>
>> -----Original Message-----
>> From: Maxime Coquelin <maxime.coquelin at redhat.com>
>> Sent: Wednesday, November 30, 2022 11:56 PM
>> To: dev at dpdk.org; Xia, Chenbo <chenbo.xia at intel.com>;
>> david.marchand at redhat.com; eperezma at redhat.com
>> Cc: Maxime Coquelin <maxime.coquelin at redhat.com>
>> Subject: [PATCH v1 10/21] 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 at redhat.com>
>> ---
>> drivers/net/virtio/virtio_ethdev.c | 88 ++++++++++++-------
>> drivers/net/virtio/virtio_rxtx.c | 8 +-
>> drivers/net/virtio/virtio_rxtx.h | 4 +-
>> drivers/net/virtio/virtio_rxtx_simple.h | 2 +-
>> .../net/virtio/virtio_rxtx_simple_altivec.c | 4 +-
>> drivers/net/virtio/virtio_rxtx_simple_neon.c | 4 +-
>> drivers/net/virtio/virtio_rxtx_simple_sse.c | 4 +-
>> drivers/net/virtio/virtqueue.c | 6 +-
>> drivers/net/virtio/virtqueue.h | 1 -
>> 9 files changed, 72 insertions(+), 49 deletions(-)
>>
>> --- a/drivers/net/virtio/virtio_rxtx_simple_altivec.c
>> +++ b/drivers/net/virtio/virtio_rxtx_simple_altivec.c
>> @@ -103,8 +103,8 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf
>> **rx_pkts,
>>
>> desc_idx = (uint16_t)(vq->vq_used_cons_idx & (vq->vq_nentries - 1));
>> rused = &vq->vq_split.ring.used->ring[desc_idx];
>> - sw_ring = &vq->sw_ring[desc_idx];
>> - sw_ring_end = &vq->sw_ring[vq->vq_nentries];
>> + sw_ring = &vq->rxq.sw_ring[desc_idx];
>
> After sw_ring, there are two spaces, should be only one.
Right, it was here before but I fixed it in v2 here and elsewhere.
Thanks,
Maxime
More information about the dev
mailing list