From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id B3EAC159 for ; Mon, 7 Apr 2014 09:25:35 +0200 (CEST) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=platinum.localnet) by mail.droids-corp.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WX3yl-0004VK-6B; Mon, 07 Apr 2014 09:28:37 +0200 From: Olivier MATZ To: dev@dpdk.org Date: Mon, 07 Apr 2014 09:26:36 +0200 Message-ID: <4032649.DyNZWczOjm@platinum> Organization: 6WIND User-Agent: KMail/4.11.3 (Linux/3.12.6; KDE/4.11.3; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: Meir Tseitlin Subject: Re: [dpdk-dev] rte_pktmbuf_alloc fails X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2014 07:25:35 -0000 Hi Meir, On Tuesday, April 01, 2014 02:53:47 PM Meir Tseitlin wrote: > I think I found the problem - it was solved by manually calling > rte_pktmbuf_free for each packet. > It seems that rte_pktmbuf_free is not automatically called from > within rte_eth_tx_burst if packets are sent to pcap device. By looking at the eth_pcap_tx(pkts, nb_pkts) function, I think it may not work properly. I think it should return nb_pkts instead of num_tx. Indeed, if pcap_sendpacket() fails -- I don't know in which case it can occur -- the function will return a number lower than nb_pkts, causing a caller like l2fwd_send_burst() to free some mbufs. But all mbufs are already freed by eth_pcap_tx(). I don't know if it's related to your problem but it may help. Regards, Olivier