patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Marvin Liu <yong.liu@intel.com>, chenbo.xia@intel.com
Cc: dev@dpdk.org, stable@dpdk.org
Subject: Re: [PATCH] net/virtio: fix incorrect slots number when indirect feature on
Date: Tue, 1 Feb 2022 09:53:45 +0100	[thread overview]
Message-ID: <69751a6a-230a-adb2-afea-17daee34d525@redhat.com> (raw)
In-Reply-To: <20220120122218.25027-1-yong.liu@intel.com>



On 1/20/22 13:22, Marvin Liu wrote:
> Virtio driver only occupies one slot for enqueuing chained mbufs when
> indirect feature is on. Required slots calculation should depend on
> indirect feature status at the end.
> 
> Fixes: 0eaf7fc2fe8e ("net/virtio: separate AVX Rx/Tx")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Marvin Liu <yong.liu@intel.com>
> 
> diff --git a/drivers/net/virtio/virtio_rxtx_packed.h b/drivers/net/virtio/virtio_rxtx_packed.h
> index d5c259a1f6..536112983c 100644
> --- a/drivers/net/virtio/virtio_rxtx_packed.h
> +++ b/drivers/net/virtio/virtio_rxtx_packed.h
> @@ -125,13 +125,12 @@ virtqueue_enqueue_single_packed_vec(struct virtnet_tx *txvq,
>   	 * any_layout => number of segments
>   	 * default    => number of segments + 1
>   	 */
> -	slots = use_indirect ? 1 : (txm->nb_segs + !can_push);
>   	can_push = rte_mbuf_refcnt_read(txm) == 1 &&
>   		   RTE_MBUF_DIRECT(txm) &&
>   		   txm->nb_segs == 1 &&
>   		   rte_pktmbuf_headroom(txm) >= hdr_size;
>   
> -	slots = txm->nb_segs + !can_push;
> +	slots = use_indirect ? 1 : (txm->nb_segs + !can_push);
>   	need = slots - vq->vq_free_cnt;
>   
>   	/* Positive value indicates it need free vring descriptors */

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


  reply	other threads:[~2022-02-01  8:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-20 12:22 Marvin Liu
2022-02-01  8:53 ` Maxime Coquelin [this message]
2022-02-08 11:11 ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69751a6a-230a-adb2-afea-17daee34d525@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=yong.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).