From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Han, Dongsu" Subject: Re: [PATCH] app: fix refcnt in mbuf allocation Date: Mon, 6 May 2013 11:47:23 -0400 Message-ID: References: <1367844470-15346-1-git-send-email-thomas.monjalon@6wind.com> <20130506135616.GN12221@6wind.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b67211aee7a1004dc0e9dd7 Cc: dev-VfR2kkLFssw@public.gmane.org To: Adrien Mazarguil Return-path: In-Reply-To: <20130506135616.GN12221-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> 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" --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-VfR2kkLFssw@public.gmane.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-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> 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-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> 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-VfR2kkLFssw@public.gmane.org
http://dpdk.o= rg/ml/listinfo/dev

--047d7b67211aee7a1004dc0e9dd7--