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 B5A84A04FD; Tue, 14 Jan 2020 02:37:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC94C1C440; Tue, 14 Jan 2020 02:37:27 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id CA6B61C2F7 for ; Tue, 14 Jan 2020 02:37:26 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jan 2020 17:37:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,431,1571727600"; d="scan'208";a="256098493" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by fmsmga002.fm.intel.com with ESMTP; 13 Jan 2020 17:37:25 -0800 Date: Tue, 14 Jan 2020 09:37:22 +0800 From: Ye Xiaolong To: Xiao Wang Cc: qi.z.zhang@intel.com, dev@dpdk.org Message-ID: <20200114013722.GD59121@intel.com> References: <20200108133708.51909-1-xiao.w.wang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200108133708.51909-1-xiao.w.wang@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) 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" On 01/08, Xiao Wang wrote: >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 >--- > 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 > Acked-by: Xiaolong Ye