From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) by dpdk.org (Postfix) with ESMTP id 531414AAA for ; Mon, 6 May 2013 17:47:24 +0200 (CEST) Received: by mail-pd0-f179.google.com with SMTP id q10so2078140pdj.10 for ; Mon, 06 May 2013 08:47:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=mAMKdNVdjXor7z0FJ5KeuHXpbVDHy7csHTIqyhoITlE=; b=yEGxNqqJG8Ceqc20SD7KoYSaSyM0Ipm0Bq1266YKNCkc6wJBfMe/zpd3+SFV2O2DpK e+P9x4JWEOsuqQY2AcuRJZSNHCulLChIle+nT9uABWYyjkAPRIuaE0z+OFeyWlyOgJOx xPHO69nYMMiOzBTxgA4LhQFl9rmMJNEuzQdqiQkSOwvB1FqVJz9etZ3MrCJiQSt71ua9 iyOtETYmOnRyF/hclu2LYFkn4PEO3B8LDkJQWYYYP7m9KYndrOtMO365Xm8SoIjN35gC 9H+TMBaIAJILv8LOlaWY5vO0+vBWOMEE5+OXtbixVVAfGlS862nY6BSJJFzAtXcNSbg8 uYeA== MIME-Version: 1.0 X-Received: by 10.69.3.65 with SMTP id bu1mr26244622pbd.107.1367855244144; Mon, 06 May 2013 08:47:24 -0700 (PDT) Received: by 10.66.148.199 with HTTP; Mon, 6 May 2013 08:47:23 -0700 (PDT) In-Reply-To: <20130506135616.GN12221@6wind.com> References: <1367844470-15346-1-git-send-email-thomas.monjalon@6wind.com> <20130506135616.GN12221@6wind.com> Date: Mon, 6 May 2013 11:47:23 -0400 Message-ID: From: "Han, Dongsu" To: Adrien Mazarguil Content-Type: multipart/alternative; boundary=047d7b67211aee7a1004dc0e9dd7 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] app: fix refcnt in mbuf allocation 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, 06 May 2013 15:47:24 -0000 --047d7b67211aee7a1004dc0e9dd7 Content-Type: text/plain; charset=ISO-8859-1 In addition to this, we should probably clone pkt mbuf using rte_pktmbuf_clone() and transmit the cloned packet. This will avoid having to copy the mac and IP headers. -Dongsu On Mon, May 6, 2013 at 9:56 AM, Adrien Mazarguil wrote: > Hi all (replying below) > > On Mon, May 06, 2013 at 09:28:33AM -0400, Han, Dongsu wrote: > > Sounds good. With the two bug fixes I submitted txonly now runs > perfectly. > > Thanks! > > -Dongsu > > On May 6, 2013 8:47 AM, "Thomas Monjalon" > wrote: > > > > > Hi Dongsu Han, > > > > > > I think your fix is right. > > > I've just removed tx_mbuf_alloc() and directly called > rte_pktmbuf_alloc() > > > instead. > > > Is it OK for you ? > > > Could you also review this (modified) description ? > [...] > > While using rte_pktmbuf_alloc() is the correct fix, it's much slower than > __rte_mbuf_raw_alloc() due to the unnecessary call to rte_pktmbuf_reset(). > > Since testpmd is often used for performance testing, we should consider a > wrapper function calling __rte_mbuf_raw_alloc() directly instead, as in > rte_rxmbuf_alloc() implemented in igb and ixgbe PMDs. > > -- > Adrien Mazarguil > 6WIND > _______________________________________________ > dev mailing list > dev@dpdk.org > http://dpdk.org/ml/listinfo/dev > --047d7b67211aee7a1004dc0e9dd7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
In addition to this, we should probably clone pkt mbuf usi= ng=A0rte_pktmbuf_clone() and transmit the = cloned packet. This will avoid having to copy the mac and IP headers. =A0

-Dongsu

On Mon, May 6, 2013 at 9:56 AM, Adrien Mazarguil <= adrien.maza= rguil@6wind.com> wrote:
Hi all (replying below)

On Mon, May 06, 2013 at 09:28:33AM -0400, Han, Dongsu wrote:
> Sounds good. With the two bug fixes I submitted txonly now runs perfec= tly.
> Thanks!
> -Dongsu
> On May 6, 2013 8:47 AM, "Thomas Monjalon" <thomas.monjalon@6wind.com> wrote:
>
> > Hi Dongsu Han,
> >
> > I think your fix is right.
> > I've just removed tx_mbuf_alloc() and directly called rte_pkt= mbuf_alloc()
> > instead.
> > Is it OK for you ?
> > Could you also review this (modified) description ?
[...]

While using rte_pktmbuf_alloc() is the correct fix, it's much slower th= an
__rte_mbuf_raw_alloc() due to the unnecessary call to rte_pktmbuf_reset().<= br>
Since testpmd is often used for performance testing, we should consider a wrapper function calling __rte_mbuf_raw_alloc() directly instead, as in
rte_rxmbuf_alloc() implemented in igb and ixgbe PMDs.

--
Adrien Mazarguil
6WIND
___________________________= ____________________
dev mailing list
dev@dpdk.org
http://dpdk.o= rg/ml/listinfo/dev

--047d7b67211aee7a1004dc0e9dd7--