From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-f67.google.com (mail-vs1-f67.google.com [209.85.217.67]) by dpdk.org (Postfix) with ESMTP id 1487E1BB2E for ; Fri, 19 Apr 2019 11:47:36 +0200 (CEST) Received: by mail-vs1-f67.google.com with SMTP id t23so2616775vso.10 for ; Fri, 19 Apr 2019 02:47:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wakFEcuxGiNbdCXrtksWKgo1NplSCGpvk7Y7QZrPA50=; b=nPDi54XGE3FHhWBI+7+M0i2kUuootnii4fDQZ+MRv91sClQNPPNQLedlAOlhKqivSH XRm3SwYq+Islfqlumg5G7NsBSLYV7FzAqnCnPbPUAiB1jmtI9DikZqbF8y0a6md+sklM nGEbHH3VT1TC1dLa3YfM4ZR64Po5AuifiY0QOtF1Uac1MOP/FQKP+2NR5Ctp06tU1cT0 blaAvs1sNULnsA+wP6eMLKyqMj95J0BM8oQNJtSHEZlwZ1QMeiBr4nQJLJIbeBQYI4XL uabjgjE/GsHw1mCJgD6/ksB4XIuXwMP5+wEO5t0KHB/fpIzG6L6Yy1q7yjTU6jPXskVG Z09w== X-Gm-Message-State: APjAAAUTCkBKWquHp1ah2WBRpc2Ln2JJPhJd4/nUkwyapmjQeUVJAe5k 6IVvItzC/awBeYf9O6GQlQl1B1RLS3lhN5N0YROy1wUdFIU= X-Google-Smtp-Source: APXvYqz2LsDp06uMYpWTzNWqMyjX92kt5Fp3rstszPYNi5/XRhBw3IQIQvZe5Zp0I1U/WujRTRFTPol7OCBNnWVpKEA= X-Received: by 2002:a67:eb57:: with SMTP id x23mr1535568vso.39.1555667255498; Fri, 19 Apr 2019 02:47:35 -0700 (PDT) MIME-Version: 1.0 References: <34359a7b-f2c8-81f2-8a49-f1238e8dfbf0@tu-ilmenau.de> <20190418152056.15018-1-xiaolong.ye@intel.com> <20190418152056.15018-2-xiaolong.ye@intel.com> In-Reply-To: <20190418152056.15018-2-xiaolong.ye@intel.com> From: David Marchand Date: Fri, 19 Apr 2019 11:47:24 +0200 Message-ID: To: Xiaolong Ye Cc: dev , Ferruh Yigit , Qi Zhang Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 09:47:36 -0000 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. Reviewed-by: David Marchand -- 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 7FAF6A00E6 for ; Fri, 19 Apr 2019 11:47:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5BDB41BB3A; Fri, 19 Apr 2019 11:47:37 +0200 (CEST) Received: from mail-vs1-f67.google.com (mail-vs1-f67.google.com [209.85.217.67]) by dpdk.org (Postfix) with ESMTP id 1487E1BB2E for ; Fri, 19 Apr 2019 11:47:36 +0200 (CEST) Received: by mail-vs1-f67.google.com with SMTP id t23so2616775vso.10 for ; Fri, 19 Apr 2019 02:47:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wakFEcuxGiNbdCXrtksWKgo1NplSCGpvk7Y7QZrPA50=; b=nPDi54XGE3FHhWBI+7+M0i2kUuootnii4fDQZ+MRv91sClQNPPNQLedlAOlhKqivSH XRm3SwYq+Islfqlumg5G7NsBSLYV7FzAqnCnPbPUAiB1jmtI9DikZqbF8y0a6md+sklM nGEbHH3VT1TC1dLa3YfM4ZR64Po5AuifiY0QOtF1Uac1MOP/FQKP+2NR5Ctp06tU1cT0 blaAvs1sNULnsA+wP6eMLKyqMj95J0BM8oQNJtSHEZlwZ1QMeiBr4nQJLJIbeBQYI4XL uabjgjE/GsHw1mCJgD6/ksB4XIuXwMP5+wEO5t0KHB/fpIzG6L6Yy1q7yjTU6jPXskVG Z09w== X-Gm-Message-State: APjAAAUTCkBKWquHp1ah2WBRpc2Ln2JJPhJd4/nUkwyapmjQeUVJAe5k 6IVvItzC/awBeYf9O6GQlQl1B1RLS3lhN5N0YROy1wUdFIU= X-Google-Smtp-Source: APXvYqz2LsDp06uMYpWTzNWqMyjX92kt5Fp3rstszPYNi5/XRhBw3IQIQvZe5Zp0I1U/WujRTRFTPol7OCBNnWVpKEA= X-Received: by 2002:a67:eb57:: with SMTP id x23mr1535568vso.39.1555667255498; Fri, 19 Apr 2019 02:47:35 -0700 (PDT) MIME-Version: 1.0 References: <34359a7b-f2c8-81f2-8a49-f1238e8dfbf0@tu-ilmenau.de> <20190418152056.15018-1-xiaolong.ye@intel.com> <20190418152056.15018-2-xiaolong.ye@intel.com> In-Reply-To: <20190418152056.15018-2-xiaolong.ye@intel.com> From: David Marchand Date: Fri, 19 Apr 2019 11:47:24 +0200 Message-ID: To: Xiaolong Ye Cc: dev , Ferruh Yigit , Qi Zhang Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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: <20190419094724.h-H8WnxC-AmkG5G3_UPc8ZDBR8e6DUABcMtaX0EHQfw@z> 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. Reviewed-by: David Marchand -- David Marchand