[dpdk-dev] [memnic PATCH 7/7] pmd: split calling mbuf free
Hiroshi Shimamoto
h-shimamoto at ct.jp.nec.com
Thu Sep 25 03:12:01 CEST 2014
Hi Thomas, Keith,
> Subject: Re: [dpdk-dev] [memnic PATCH 7/7] pmd: split calling mbuf free
>
>
> On Sep 24, 2014, at 10:20 AM, Thomas Monjalon <thomas.monjalon at 6wind.com> wrote:
>
> > 2014-09-11 07:52, Hiroshi Shimamoto:
> >> @@ -408,9 +408,9 @@ retry:
> >>
> >> rte_compiler_barrier();
> >> p->status = MEMNIC_PKT_ST_FILLED;
> >> -
> >> - rte_pktmbuf_free(tx_pkts[nr]);
> >> }
> >> + for (i = 0; i < nr; i++)
> >> + rte_pktmbuf_free(tx_pkts[i]);
> >>
> >> /* stats */
> >> st->opackets += pkts;
> >>
> >
> > You are bursting mbuf freeing. Why title is about "split”?
I thought that in this patch splits main loop operations to putting content and
freeing mbuf, then took work "split", but I see "burst mbuf freeing" is preferable.
>
> Maybe this should be a new API as in rte_pktmbuf_bulk_free(tx_pkts, nr); ??
> This would remove the loop in the application and I know I have done the same thing for Pktgen too.
Good point, yes, I'm thinking that having new API like rte_pktmbuf_(alloc|free)_bulk()
is good to reduce TLS access and gain performance.
I put that on my stack, but haven't had a time yet.
Do you have any plan to do such thing?
thanks,
Hiroshi
> >
> > --
> > Thomas
>
> Keith Wiles, Principal Technologist with CTO office, Wind River mobile 972-213-5533
More information about the dev
mailing list