On 2/18/2016 9:48 PM, Yuanhan Liu wrote:
> [...]
CCed changchun, the author for the chained handling of desc and mbuf.
The change makes the code more readable, but i think the following
commit message is simple and enough.
>
>       while (this_desc_is_not_drained_totally || has_next_desc) {
>               if (this_desc_has_drained_totally) {
>                       this_desc = next_desc();
>               }
>
>               if (mbuf_has_no_room) {
>                       mbuf = allocate_a_new_mbuf();
>               }
>
>               COPY(mbuf, desc);
>       }
>
> [...]
>
> This refactor makes the code much more readable (IMO), yet it reduces
> binary code size (nearly 2K).
I guess the reduced binary code size comes from reduced inline calls to
mbuf allocation.

Reply via email to