patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Jiang, Cheng1" <cheng1.jiang@intel.com>
To: "Ma, WenwuX" <wenwux.ma@intel.com>, "dev@dpdk.org" <dev@dpdk.org>,
	"Coquelin, Maxime" <maxime.coquelin@redhat.com>,
	"Xia, Chenbo" <chenbo.xia@intel.com>
Cc: "Ma, WenwuX" <wenwux.ma@intel.com>, "stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [PATCH] vhost: fix net header settings in vhost datapath
Date: Fri, 13 Jan 2023 03:16:54 +0000	[thread overview]
Message-ID: <SN7PR11MB7019B1E0823461EE44A730BDDCC29@SN7PR11MB7019.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230104023945.6669-1-wenwux.ma@intel.com>

Hi Wenwu,

> -----Original Message-----
> From: Wenwu Ma <wenwux.ma@intel.com>
> Sent: Wednesday, January 4, 2023 10:40 AM
> To: dev@dpdk.org
> Cc: Ma, WenwuX <wenwux.ma@intel.com>; stable@dpdk.org
> Subject: [PATCH] vhost: fix net header settings in vhost datapath
>
> In vhost sync batch enqueue, the "num_buffers" of virtio net header is not
> be set, but it should be set to 1 if the mrg_rxbuf feature is turned on, This
> patch fix the issue.
>
> Fixes: ef861692c398 ("vhost: add packed ring batch enqueue")
> Cc: stable@dpdk.org
>
> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> ---
>  lib/vhost/virtio_net.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c index
> cf796183a0..61d9052a57 100644
> --- a/lib/vhost/virtio_net.c
> +++ b/lib/vhost/virtio_net.c
> @@ -1493,6 +1493,12 @@ virtio_dev_rx_batch_packed_copy(struct
> virtio_net *dev,
>                       sizeof(struct virtio_net_hdr_mrg_rxbuf);
>       }
>
> +     if (rxvq_is_mergeable(dev)) {
> +             vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {
> +                     ASSIGN_UNLESS_EQUAL(hdrs[i]->num_buffers, 1);
> +             }
> +     }
> +
>       vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE)
>               virtio_enqueue_offload(pkts[i], &hdrs[i]->hdr);
>
> --
> 2.25.1

Acked-by: Cheng Jiang <cheng1.jiang@intel.com>

Thanks,
Cheng


  parent reply	other threads:[~2023-01-13  3:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04  2:39 Wenwu Ma
2023-01-13  3:06 ` Ling, WeiX
2023-01-13  3:16 ` Jiang, Cheng1 [this message]
2023-02-03 14:43 ` Maxime Coquelin
2023-02-03 14:58 ` Maxime Coquelin
  -- strict thread matches above, loose matches on Subject: below --
2023-01-04  2:31 Wenwu Ma

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=SN7PR11MB7019B1E0823461EE44A730BDDCC29@SN7PR11MB7019.namprd11.prod.outlook.com \
    --to=cheng1.jiang@intel.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    --cc=wenwux.ma@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).