From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f176.google.com (mail-we0-f176.google.com [74.125.82.176]) by dpdk.org (Postfix) with ESMTP id B06B0678B for ; Thu, 17 Apr 2014 17:00:55 +0200 (CEST) Received: by mail-we0-f176.google.com with SMTP id x48so543028wes.21 for ; Thu, 17 Apr 2014 08:00:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=myQU4FSSDrYgOuX8PDn10CgPbNDZuLjn1X5qdqK6Ehc=; b=nG1t+KGb5dzHcvHqzwEQcjSL0nn+h2J31uNv2RF39V3Qg1ftc7lFNj5YkZV2ZoYnKH i6RLwBouu5/7hEuN9UhO+sxHgWSXeM1gnZma39EOQork3x41LhUgqQWnoBxeeA3MMPZs 4x2KNBvJK0z62SVCif4HxGYVLhAyL2+y0nIG0y/ZsJuM+W39YiLJnzT2ZIDQAGiZfXMg rC2F9DViEg6Rk6hFstE7FuEmwrXRtlryUsTlH7BPDOUlRXBcFHeagPEQS9BAY1BaWId3 PLE/baLR2ZY0HuEUPDFg5s+FBp1Tfu7qsIQ0mMWPI5J1/NDRhoeNnzjFqEXACxiMxmPT JlfA== X-Gm-Message-State: ALoCoQkvzKhQn53/NXe1pzzggLVcPJ8zCwWIsaV4BboU4MGHkQUZ41uJnLBvoBAg0JPaz+3EtnIj X-Received: by 10.180.74.203 with SMTP id w11mr24416519wiv.27.1397746856262; Thu, 17 Apr 2014 08:00:56 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id h3sm5316060wiz.16.2014.04.17.08.00.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Apr 2014 08:00:55 -0700 (PDT) From: Thomas Monjalon To: "Ananyev, Konstantin" Date: Thu, 17 Apr 2014 17:00:54 +0200 Message-ID: <2441602.aZ8JVAEsGZ@xps13> Organization: 6WIND User-Agent: KMail/4.12.4 (Linux/3.14.1-1-ARCH; KDE/4.12.4; x86_64; ; ) In-Reply-To: <2601191342CEEE43887BDE71AB9772580EF94DE9@IRSMSX105.ger.corp.intel.com> References: <4032649.DyNZWczOjm@platinum> <2601191342CEEE43887BDE71AB9772580EF94DE9@IRSMSX105.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org 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: Thu, 17 Apr 2014 15:00:56 -0000 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 ? Thanks -- Thomas