On Thu, Jul 18, 2024 at 8:28 PM Bailey Forrest <bcf@xxxxxxxxxx> wrote: > > On Thu, Jul 18, 2024 at 4:07 PM Willem de Bruijn > <willemdebruijn.kernel@xxxxxxxxx> wrote: > > > > This however loops skb->len / gso_size. While the above modulo > > operation skips many segments that span a frag. Not sure if the more > > intuitive approach could be as performant. > > Yes, the original intention of the code was to loop over nr_frags, > instead of (skb->len / gso_size). > > But perhaps that's premature optimization if it makes the code > significantly harder to follow. Thanks. I don't mean to ask for a wholesale rewrite if not needed. But perhaps the logic can be explained in the commit in a way that it is more immediately obvious. Praveen suggested that. I'll respond to his reply in more detail.