From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: rte_pktmbuf_alloc fails Date: Thu, 22 May 2014 17:47:21 +0200 Message-ID: <3243438.tFUQaShmoV@xps13> References: <2601191342CEEE43887BDE71AB9772580EF94DE9@IRSMSX105.ger.corp.intel.com> <2441602.aZ8JVAEsGZ@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: "Ananyev, Konstantin" Return-path: In-Reply-To: <2441602.aZ8JVAEsGZ@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 2014-04-17 17:00, Thomas Monjalon: > Hi Konstantin, > > 2014-04-07 08:53, Ananyev, Konstantin: > > Yep indeed, there is a bug in eth_pcap_tx() that can cause mbuf > > corruption. > > I think it should be something like that instead: > > > > --- a/lib/librte_pmd_pcap/rte_eth_pcap.c > > +++ b/lib/librte_pmd_pcap/rte_eth_pcap.c > > @@ -205,8 +205,9 @@ eth_pcap_tx(void *queue, > > > > mbuf = bufs[i]; > > ret = pcap_sendpacket(tx_queue->pcap, (u_char*) > > > > mbuf->pkt.data, mbuf->pkt.data_len); > > - if(likely(!ret)) > > - num_tx++; > > + if(unlikely(ret != 0)) > > + break; > > + num_tx++; > > > > rte_pktmbuf_free(mbuf); > > > > } > > Please could you send a patch with a commit log as described in > http://dpdk.org/dev#send ? I think you haven't sent patch for this bug. Do you plan to do so? Thanks -- Thomas