From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 546521BB72 for ; Fri, 19 Apr 2019 17:11:33 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2019 08:11:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,370,1549958400"; d="scan'208";a="150753505" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.110.206]) by FMSMGA003.fm.intel.com with ESMTP; 19 Apr 2019 08:11:31 -0700 Date: Fri, 19 Apr 2019 23:05:38 +0800 From: Ye Xiaolong To: Ferruh Yigit Cc: David Marchand , dev , Qi Zhang Message-ID: <20190419150538.GA39034@intel.com> References: <34359a7b-f2c8-81f2-8a49-f1238e8dfbf0@tu-ilmenau.de> <20190418152056.15018-1-xiaolong.ye@intel.com> <20190418152056.15018-2-xiaolong.ye@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v1 2/2] net/af_xdp: name the umem memzone dynamically 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: , X-List-Received-Date: Fri, 19 Apr 2019 15:11:33 -0000 On 04/19, Ferruh Yigit wrote: >On 4/19/2019 10:47 AM, David Marchand wrote: >> On Thu, Apr 18, 2019 at 5:27 PM Xiaolong Ye wrote: >> >>> Naming the umem memzone dynamically allows to create multiple af_xdp vdevs. >>> >>> Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") >>> >>> Reported-by: Markus Theil >>> Signed-off-by: Xiaolong Ye >>> --- >>> drivers/net/af_xdp/rte_eth_af_xdp.c | 5 ++++- >>> 1 file changed, 4 insertions(+), 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 d8e99204e..666b4c17e 100644 >>> --- a/drivers/net/af_xdp/rte_eth_af_xdp.c >>> +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c >>> @@ -483,6 +483,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals >>> *internals) >>> .frame_size = ETH_AF_XDP_FRAME_SIZE, >>> .frame_headroom = ETH_AF_XDP_DATA_HEADROOM }; >>> char ring_name[RTE_RING_NAMESIZE]; >>> + char mz_name[RTE_MEMZONE_NAMESIZE]; >>> int ret; >>> uint64_t i; >>> >>> @@ -508,7 +509,9 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals >>> *internals) >>> (void *)(i * ETH_AF_XDP_FRAME_SIZE + >>> ETH_AF_XDP_DATA_HEADROOM)); >>> >>> - mz = rte_memzone_reserve_aligned("af_xdp uemem", >>> + ret = snprintf(mz_name, sizeof(mz_name), "af_xdp_umem_%s_%d", >>> + internals->if_name, internals->queue_idx); >>> >> >> Idem previous patch. >> >> + mz = rte_memzone_reserve_aligned(mz_name, >>> ETH_AF_XDP_NUM_BUFFERS * ETH_AF_XDP_FRAME_SIZE, >>> rte_socket_id(), RTE_MEMZONE_IOVA_CONTIG, >>> getpagesize()); >>> -- >>> 2.17.1 >>> >>> >> How about squashing those two patches as a single one ? >> The issue is that you can't create multiple devices. Having the first one >> still leaves the issue. >> > >+1 to squash. let me make a new version applying minor issues you pointed in >other patch, squashing both and keeping your review tag. Thanks for doing the new patch. > >> >> Reviewed-by: David Marchand >> > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id A55F3A00E6 for ; Fri, 19 Apr 2019 17:11:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3517B1BBB4; Fri, 19 Apr 2019 17:11:35 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 546521BB72 for ; Fri, 19 Apr 2019 17:11:33 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2019 08:11:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,370,1549958400"; d="scan'208";a="150753505" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.110.206]) by FMSMGA003.fm.intel.com with ESMTP; 19 Apr 2019 08:11:31 -0700 Date: Fri, 19 Apr 2019 23:05:38 +0800 From: Ye Xiaolong To: Ferruh Yigit Cc: David Marchand , dev , Qi Zhang Message-ID: <20190419150538.GA39034@intel.com> References: <34359a7b-f2c8-81f2-8a49-f1238e8dfbf0@tu-ilmenau.de> <20190418152056.15018-1-xiaolong.ye@intel.com> <20190418152056.15018-2-xiaolong.ye@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v1 2/2] net/af_xdp: name the umem memzone dynamically 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" Message-ID: <20190419150538.nzVs6jf5NtXxNELkQ095DQJvS650hcrn35sQE5_rFfI@z> On 04/19, Ferruh Yigit wrote: >On 4/19/2019 10:47 AM, David Marchand wrote: >> On Thu, Apr 18, 2019 at 5:27 PM Xiaolong Ye wrote: >> >>> Naming the umem memzone dynamically allows to create multiple af_xdp vdevs. >>> >>> Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") >>> >>> Reported-by: Markus Theil >>> Signed-off-by: Xiaolong Ye >>> --- >>> drivers/net/af_xdp/rte_eth_af_xdp.c | 5 ++++- >>> 1 file changed, 4 insertions(+), 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 d8e99204e..666b4c17e 100644 >>> --- a/drivers/net/af_xdp/rte_eth_af_xdp.c >>> +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c >>> @@ -483,6 +483,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals >>> *internals) >>> .frame_size = ETH_AF_XDP_FRAME_SIZE, >>> .frame_headroom = ETH_AF_XDP_DATA_HEADROOM }; >>> char ring_name[RTE_RING_NAMESIZE]; >>> + char mz_name[RTE_MEMZONE_NAMESIZE]; >>> int ret; >>> uint64_t i; >>> >>> @@ -508,7 +509,9 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals >>> *internals) >>> (void *)(i * ETH_AF_XDP_FRAME_SIZE + >>> ETH_AF_XDP_DATA_HEADROOM)); >>> >>> - mz = rte_memzone_reserve_aligned("af_xdp uemem", >>> + ret = snprintf(mz_name, sizeof(mz_name), "af_xdp_umem_%s_%d", >>> + internals->if_name, internals->queue_idx); >>> >> >> Idem previous patch. >> >> + mz = rte_memzone_reserve_aligned(mz_name, >>> ETH_AF_XDP_NUM_BUFFERS * ETH_AF_XDP_FRAME_SIZE, >>> rte_socket_id(), RTE_MEMZONE_IOVA_CONTIG, >>> getpagesize()); >>> -- >>> 2.17.1 >>> >>> >> How about squashing those two patches as a single one ? >> The issue is that you can't create multiple devices. Having the first one >> still leaves the issue. >> > >+1 to squash. let me make a new version applying minor issues you pointed in >other patch, squashing both and keeping your review tag. Thanks for doing the new patch. > >> >> Reviewed-by: David Marchand >> >