On 2 March 2017 at 00:56, David Gwynne <da...@gwynne.id.au> wrote: > >> On 2 Mar 2017, at 06:43, Mike Belopuhov <m...@belopuhov.com> wrote: >> >> This convers hand rolled lists into exactly the same mbuf_lists. >> I need this because of the next diff that uses the ml_len packet >> counter that mbuf_lists have. Otherwise there's no functional >> change. > > i didnt use mbuf lists here because they have an extra counter that isnt, or > wasnt, needed. > > im not sure you need to know how long a list is in your later diff, you just > need to know if it is not empty. you can do that by checking if the head is > NULL. >
true, i was thinking about clarifying this, but i like the "declarativeness" of the length check. i don't think that an extra counter is a big deal. also mbuf lists make this code look simpler which is a good thing, imo.