RE: [PATCH net-next v2 0/3] introduce skb_for_each_frag()

2021-04-17 Thread David Laight
From: Matteo Croce > Sent: 16 April 2021 23:44 ... > > A more interesting change would be something that generated: > > unsigned int nr_frags = skb_shinfo(skb)->nr_frags; > > for (i = 0; i < nr_frags; i++) { > > since that will run faster for most loops. > > But that is ~impossible

Re: [PATCH net-next v2 0/3] introduce skb_for_each_frag()

2021-04-16 Thread Matteo Croce
On Tue, Apr 13, 2021 at 9:53 AM David Laight wrote: > > From: Matteo Croce > > Sent: 12 April 2021 01:38 > > > > Introduce skb_for_each_frag, an helper macro to iterate over the SKB frags. > > The real question is why, the change is: > > - for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { >

RE: [PATCH net-next v2 0/3] introduce skb_for_each_frag()

2021-04-13 Thread David Laight
From: Matteo Croce > Sent: 12 April 2021 01:38 > > Introduce skb_for_each_frag, an helper macro to iterate over the SKB frags. The real question is why, the change is: - for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { + skb_for_each_frag(skb, i) { The existing code isn't complicat

[PATCH net-next v2 0/3] introduce skb_for_each_frag()

2021-04-11 Thread Matteo Croce
From: Matteo Croce Introduce skb_for_each_frag, an helper macro to iterate over the SKB frags. First patch introduces the helper, the second one is generated with coccinelle and uses the macro where possible. Last one is a chunk which have to be applied by hand. The second patch raises some che