Hi Rahul,

Rahul Lakkireddy <rahul.lakkireddy at chelsio.com> writes:

> Update sge initialization with respect to free-list manager configuration
> and ingress arbiter. Also update refill logic to refill mbufs only after
> a certain threshold for rx.  Optimize tx packet prefetch and free.
<<snip>>
>                       for (i = 0; i < sd->coalesce.idx; i++) {
> -                             rte_pktmbuf_free(sd->coalesce.mbuf[i]);
> +                             struct rte_mbuf *tmp = sd->coalesce.mbuf[i];
> +
> +                             do {
> +                                     struct rte_mbuf *next = tmp->next;
> +
> +                                     rte_pktmbuf_free_seg(tmp);
> +                                     tmp = next;
> +                             } while (tmp);
>                               sd->coalesce.mbuf[i] = NULL;
Pardon my ignorance here, but rte_pktmbuf_free does this work. I can't
actually see much difference between your rewrite of this block, and
the implementation of rte_pktmbuf_free() (apart from moving your branch
to the end of the function). Did your microbenchmarking really show this
as an improvement? 

Thanks for your time,
Aaron

Reply via email to