From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 1C178F923 for ; Thu, 9 Feb 2017 10:19:12 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP; 09 Feb 2017 01:19:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,349,1484035200"; d="scan'208";a="63660645" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.61]) by fmsmga006.fm.intel.com with SMTP; 09 Feb 2017 01:19:08 -0800 Received: by (sSMTP sendmail emulation); Thu, 09 Feb 2017 09:19:07 +0000 Date: Thu, 9 Feb 2017 09:19:07 +0000 From: Bruce Richardson To: Karthikraj palanichamy Cc: dev@dpdk.org Message-ID: <20170209091906.GA324600@bricha3-MOBL3.ger.corp.intel.com> References: <589C0E7E.7080400@veryxtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <589C0E7E.7080400@veryxtech.com> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.7.1 (2016-10-04) Subject: Re: [dpdk-dev] Problem in configuring buffer size of a memory pool 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: Thu, 09 Feb 2017 09:19:13 -0000 On Thu, Feb 09, 2017 at 12:08:54PM +0530, Karthikraj palanichamy wrote: > Hi developers, > > For /`rte_pktmbuf_pool_create()`, /I normally provide > RTE_MBUF_DEFAULT_BUF_SIZE as the data room size. > > I needed to change this dynamically based on the frame size to be > transmitted. > To transmit 80 bytes frames, I configured (80 +/RTE_PKTMBUF_HEADROOM/). > There was no problem and transmission was successful. > > Then I will do `rte_mempool_free()` and create mem pool again whenever > needed. > > So, my code flow is /create mempool -> transmit pkts -> free mempool/ > > When I do this for 3 to 5 times, I get segmentation fault in the > transmission API of the PMD. - 'eth_igb_xmit_pkts' for igb PMD and > 'ixgbe_xmit_pkts_vec()' for ixgbe PMD. > > Thanks in advance for your help. > I think you'll need to stop the transmit ports and possibly destroy and recreate the TX queues too. What may be happening is that packet buffers are remaining on the TX ring after transmit, and then when being freed to make room for new packet buffers to be transmitted, the mempool to which they are to be freed no longer exists. > Regards > Karthik > > DISCLAIMER: Privileged and/or Confidential information may be > contained in this message. If you are not the addressee of this message, > you may not copy, use or deliver this message to anyone. In such > event,you should destroy the message and kindly notify the sender by > reply e-mail. > It is understood that opinions or conclusions that do not relate to the > official business of the company are neither given nor endorsed by the > company. > Since this is a public mailing list, please remove this disclaimer as the email cannot be private. /Bruce