From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D278A04F0; Mon, 13 Jan 2020 11:05:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 051CE1C29C; Mon, 13 Jan 2020 11:05:38 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E9A971C0B2 for ; Mon, 13 Jan 2020 11:05:35 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jan 2020 02:05:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,428,1571727600"; d="scan'208";a="212951039" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga007.jf.intel.com with ESMTP; 13 Jan 2020 02:05:34 -0800 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.26]) by IRSMSX101.ger.corp.intel.com ([169.254.1.94]) with mapi id 14.03.0439.000; Mon, 13 Jan 2020 10:05:33 +0000 From: "Loftus, Ciara" To: "Wang, Xiao W" , "Ye, Xiaolong" , "Zhang, Qi Z" CC: "dev@dpdk.org" , "Wang, Xiao W" Thread-Topic: [dpdk-dev] [PATCH] net/af_xdp: use single-prod-and-cons ring Thread-Index: AQHVxcRh4367eXCKoUC+NJxOJ3FJC6foW+1w Date: Mon, 13 Jan 2020 10:05:33 +0000 Message-ID: <74F120C019F4A64C9B78E802F6AD4CC27929DC61@IRSMSX106.ger.corp.intel.com> References: <20200108133708.51909-1-xiao.w.wang@intel.com> In-Reply-To: <20200108133708.51909-1-xiao.w.wang@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/af_xdp: use single-prod-and-cons ring X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" >=20 > 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. >=20 > Signed-off-by: Xiao Wang 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 c= ore (IRQs and app pinned to separate cores). Tested-by: Ciara Loftus Thanks, Ciara > --- > drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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 =3D 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 =3D=3D NULL) { > AF_XDP_LOG(ERR, "Failed to create rte_ring\n"); > goto err; > -- > 2.15.1