On Thu, Apr 18, 2019 at 5:27 PM Xiaolong Ye <xiaolong...@intel.com> 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 <markus.th...@tu-ilmenau.de> > Signed-off-by: Xiaolong Ye <xiaolong...@intel.com> > --- > 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.march...@redhat.com> -- David Marchand