From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ye Xiaolong Subject: Re: [PATCH v4 4/5] net/af_xdp: use mbuf mempool for buffer management Date: Sun, 24 Mar 2019 19:52:55 +0800 Message-ID: <20190324115255.GA29795@intel.com> References: <20190301080947.91086-1-xiaolong.ye@intel.com> <20190322130129.109964-1-xiaolong.ye@intel.com> <20190322130129.109964-5-xiaolong.ye@intel.com> <0dd90e3f-8412-4508-8056-35ad0a3e5e8d@redhat.com> <20190324090803.GA22909@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, Qi Zhang , Karlsson Magnus , Topel Bjorn To: Maxime Coquelin Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 7374F1B732 for ; Sun, 24 Mar 2019 12:57:09 +0100 (CET) Content-Disposition: inline In-Reply-To: <20190324090803.GA22909@intel.com> 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 03/24, Ye Xiaolong wrote: >>> - ret = xsk_umem__create(&umem->umem, bufs, >>> + ret = xsk_umem__create(&umem->umem, base_addr, >>> ETH_AF_XDP_NUM_BUFFERS * ETH_AF_XDP_FRAME_SIZE, >>> &umem->fq, &umem->cq, >>> &usr_config); >>> @@ -499,7 +527,7 @@ static struct xsk_umem_info *xdp_umem_configure(void) >>> AF_XDP_LOG(ERR, "Failed to create umem"); >>> goto err; >> >>You need to destroy mb_pool if xsk_umem__create() fails. > >Will do. Correction, mp_pool destrcttion has alrealy been hanled in xdp_umem_destory. Thanks, Xiaolong > >Thanks, >Xiaolong >> >>> } >>> - umem->buffer = bufs; >>> + umem->buffer = base_addr; >>> return umem; >>> @@ -912,10 +940,9 @@ rte_pmd_af_xdp_remove(struct rte_vdev_device *dev) >>> internals = eth_dev->data->dev_private; >>> - rte_ring_free(internals->umem->buf_ring); >>> - rte_free(internals->umem->buffer); >>> rte_free(internals->umem); >>> + rte_mempool_free(internals->umem->mb_pool); >>> rte_eth_dev_release_port(eth_dev); >>>