net/virtio: fixed missing next flag when sending packets in packed mode
Checks
Commit Message
When the packets is sent in packed mode, and the packets data and
virtio-header are divided into two desc, set the next flag of
virtio-header desc
Bugzilla ID: 1295
Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues")
Signed-off-by: Fengjiang Liu <liufengjiang.0426@bytedance.com>
---
drivers/net/virtio/virtqueue.h | 1 +
1 file changed, 1 insertion(+)
Comments
Hi,
On 10/17/23 09:26, Fengjiang Liu wrote:
> When the packets is sent in packed mode, and the packets data and
> virtio-header are divided into two desc, set the next flag of
> virtio-header desc
>
> Bugzilla ID: 1295
> Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues")
>
> Signed-off-by: Fengjiang Liu <liufengjiang.0426@bytedance.com>
> ---
> drivers/net/virtio/virtqueue.h | 1 +
> 1 file changed, 1 insertion(+)
>
No need to resend so many new versions :)
(For new patches, don't forget to increase the revision number).
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
On 10/17/23 09:26, Fengjiang Liu wrote:
> When the packets is sent in packed mode, and the packets data and
> virtio-header are divided into two desc, set the next flag of
> virtio-header desc
>
> Bugzilla ID: 1295
> Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues")
>
> Signed-off-by: Fengjiang Liu <liufengjiang.0426@bytedance.com>
> ---
> drivers/net/virtio/virtqueue.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
> index 9d4aba11a3..4e9f2d0358 100644
> --- a/drivers/net/virtio/virtqueue.h
> +++ b/drivers/net/virtio/virtqueue.h
> @@ -672,6 +672,7 @@ virtqueue_enqueue_xmit_packed(struct virtnet_tx *txvq, struct rte_mbuf *cookie,
> */
> start_dp[idx].addr = txvq->hdr_mem + RTE_PTR_DIFF(&txr[idx].tx_hdr, txr);
> start_dp[idx].len = vq->hw->vtnet_hdr_size;
> + head_flags |= VRING_DESC_F_NEXT;
> hdr = (struct virtio_net_hdr *)&txr[idx].tx_hdr;
> idx++;
> if (idx >= vq->vq_nentries) {
Applied to next-virtio/for-next-net
Thanks,
Maxime
@@ -672,6 +672,7 @@ virtqueue_enqueue_xmit_packed(struct virtnet_tx *txvq, struct rte_mbuf *cookie,
*/
start_dp[idx].addr = txvq->hdr_mem + RTE_PTR_DIFF(&txr[idx].tx_hdr, txr);
start_dp[idx].len = vq->hw->vtnet_hdr_size;
+ head_flags |= VRING_DESC_F_NEXT;
hdr = (struct virtio_net_hdr *)&txr[idx].tx_hdr;
idx++;
if (idx >= vq->vq_nentries) {