DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Loftus, Ciara" <ciara.loftus@intel.com>
To: "Wang, Xiao W" <xiao.w.wang@intel.com>,
	"Ye, Xiaolong" <xiaolong.ye@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "Wang, Xiao W" <xiao.w.wang@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/af_xdp: use single-prod-and-cons ring
Date: Mon, 13 Jan 2020 10:05:33 +0000	[thread overview]
Message-ID: <74F120C019F4A64C9B78E802F6AD4CC27929DC61@IRSMSX106.ger.corp.intel.com> (raw)
In-Reply-To: <20200108133708.51909-1-xiao.w.wang@intel.com>

> 
> The ring is used only by af_xdp pmd itself, so no need to support
> multi-producer and multi-consumer mode. This patch changes the ring
> to single-producer and single-consumer mode, which could yield better
> performance for addr enqueue and dequeue.
> 
> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>

LGTM.

I ran some rough numbers and measured a +~6.8% improvement for single-core single-pmd testpmd loopback (IRQs pinned to app core) and +~15.9% for two core (IRQs and app pinned to separate cores).

Tested-by: Ciara Loftus <ciara.loftus@intel.com>

Thanks,
Ciara

> ---
>  drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c
> b/drivers/net/af_xdp/rte_eth_af_xdp.c
> index d903e6c28..683e2a559 100644
> --- a/drivers/net/af_xdp/rte_eth_af_xdp.c
> +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
> @@ -809,7 +809,7 @@ xsk_umem_info *xdp_umem_configure(struct
> pmd_internals *internals,
>  	umem->buf_ring = rte_ring_create(ring_name,
>  					 ETH_AF_XDP_NUM_BUFFERS,
>  					 rte_socket_id(),
> -					 0x0);
> +					 RING_F_SP_ENQ |
> RING_F_SC_DEQ);
>  	if (umem->buf_ring == NULL) {
>  		AF_XDP_LOG(ERR, "Failed to create rte_ring\n");
>  		goto err;
> --
> 2.15.1


  reply	other threads:[~2020-01-13 10:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08 13:37 Xiao Wang
2020-01-13 10:05 ` Loftus, Ciara [this message]
2020-01-14  1:37 ` Ye Xiaolong
2020-01-14  9:38   ` Ferruh Yigit

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=74F120C019F4A64C9B78E802F6AD4CC27929DC61@IRSMSX106.ger.corp.intel.com \
    --to=ciara.loftus@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=xiao.w.wang@intel.com \
    --cc=xiaolong.ye@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).