RE: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-04 Thread Claudiu Manoil
>-Original Message- >From: Eric Dumazet >Sent: Tuesday, November 3, 2020 8:16 PM >To: Vladimir Oltean ; Claudiu Manoil > >Cc: Jakub Kicinski ; netdev@vger.kernel.org; David S . >Miller ; james.jur...@ametek.com >Subject: Re: [PATCH net v2 1/2] gianfar: Replace s

Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Eric Dumazet
On 11/3/20 6:49 PM, Vladimir Oltean wrote: > On Tue, Nov 03, 2020 at 05:41:36PM +, Claudiu Manoil wrote: >> This is the patch: >> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=d145c9031325fed963a887851d9fa42516efd52b >> >> are you sure you have it applied? > > Ac

Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Vladimir Oltean
On Tue, Nov 03, 2020 at 07:49:06PM +0200, Vladimir Oltean wrote: > On Tue, Nov 03, 2020 at 05:41:36PM +, Claudiu Manoil wrote: > > This is the patch: > > https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=d145c9031325fed963a887851d9fa42516efd52b > > > > are you sure you

Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Vladimir Oltean
On Tue, Nov 03, 2020 at 09:36:55AM -0800, Jakub Kicinski wrote: > IIRC we did this because too many drivers used dev_kfree_skb > incorrectly and made the dropwatch output very noisy. Nice, so that's why the drop monitor never complains with my misplaced dev_kfree_skb_any calls...

Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Vladimir Oltean
On Tue, Nov 03, 2020 at 05:41:36PM +, Claudiu Manoil wrote: > This is the patch: > https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=d145c9031325fed963a887851d9fa42516efd52b > > are you sure you have it applied? Actually? No, I didn't have it applied... I had thought t

RE: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Claudiu Manoil
>-Original Message- >From: Vladimir Oltean >Sent: Tuesday, November 3, 2020 7:30 PM >To: Claudiu Manoil >Cc: Jakub Kicinski ; netdev@vger.kernel.org; David S . >Miller ; james.jur...@ametek.com >Subject: Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom w

Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Jakub Kicinski
On Tue, 3 Nov 2020 09:36:55 -0800 Jakub Kicinski wrote: > On Tue, 3 Nov 2020 19:30:07 +0200 Vladimir Oltean wrote: > > On Tue, Nov 03, 2020 at 05:18:25PM +, Claudiu Manoil wrote: > > > It's either the dev_kfree_skb_any from the dma mapping error path or the > > > one > > > from skb_cow_head(

Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Vladimir Oltean
On Tue, Nov 03, 2020 at 07:24:41PM +0200, Vladimir Oltean wrote: > On Tue, Nov 03, 2020 at 09:12:26AM -0800, Jakub Kicinski wrote: > > While it is something to be fixed - is anything other than pktgen > > making use of IFF_TX_SKB_SHARING? Are you running pktgen, Vladimir? > > Nope, just iperf3 TCP

Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Jakub Kicinski
On Tue, 3 Nov 2020 19:30:07 +0200 Vladimir Oltean wrote: > On Tue, Nov 03, 2020 at 05:18:25PM +, Claudiu Manoil wrote: > > It's either the dev_kfree_skb_any from the dma mapping error path or the one > > from skb_cow_head()'s error path. A confirmation would help indeed. > > It says "consum

Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Vladimir Oltean
On Tue, Nov 03, 2020 at 05:18:25PM +, Claudiu Manoil wrote: > It's either the dev_kfree_skb_any from the dma mapping error path or the one > from skb_cow_head()'s error path. A confirmation would help indeed. It says "consume", not "kfree", which in my mind would make it point towards the onl

Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Vladimir Oltean
On Tue, Nov 03, 2020 at 07:18:49PM +0200, Vladimir Oltean wrote: > On Tue, Nov 03, 2020 at 06:36:30PM +0200, Julian Wiedmann wrote: > > Given the various skb modifications in its xmit path, I wonder why > > gianfar doesn't clear IFF_TX_SKB_SHARING. > > Thanks for the hint Julian :) I'll try to see

Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Vladimir Oltean
On Tue, Nov 03, 2020 at 09:12:26AM -0800, Jakub Kicinski wrote: > While it is something to be fixed - is anything other than pktgen > making use of IFF_TX_SKB_SHARING? Are you running pktgen, Vladimir? Nope, just iperf3 TCP and PTP. The problem is actually with PTP, I've been testing gianfar with

Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Vladimir Oltean
On Tue, Nov 03, 2020 at 06:36:30PM +0200, Julian Wiedmann wrote: > Given the various skb modifications in its xmit path, I wonder why > gianfar doesn't clear IFF_TX_SKB_SHARING. Thanks for the hint Julian :) I'll try to see if it makes any difference. Just a wild guess, but maybe because the gian

RE: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Claudiu Manoil
>-Original Message- >From: Jakub Kicinski >Sent: Tuesday, November 3, 2020 6:31 PM >To: Vladimir Oltean >Cc: Claudiu Manoil ; netdev@vger.kernel.org; >David S . Miller ; james.jur...@ametek.com >Subject: Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom w

Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Jakub Kicinski
On Tue, 3 Nov 2020 17:08:43 + Claudiu Manoil wrote: > >> Still crashes for me: > >> > > > >Given the various skb modifications in its xmit path, I wonder why > >gianfar doesn't clear IFF_TX_SKB_SHARING. > > Hi Vladimir, > Can you try the above suggestion on your setup? While it is somethi

RE: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Claudiu Manoil
>-Original Message- >From: Julian Wiedmann >Sent: Tuesday, November 3, 2020 6:37 PM >To: Vladimir Oltean ; Claudiu Manoil > >Cc: netdev@vger.kernel.org; David S . Miller ; Jakub >Kicinski ; james.jur...@ametek.com >Subject: Re: [PATCH net v2 1/2] gianfar: Replace s

Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Julian Wiedmann
his means >> that the skb provided by the stack is required to have >> enough headroom otherwise a new skb needs to be created >> by the driver to accommodate the timestamp inserted by h/w. >> Up until now the driver was relying on skb_realloc_headroom() >> to create

Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Jakub Kicinski
On Tue, 3 Nov 2020 18:13:19 +0200 Vladimir Oltean wrote: > [14538.046926] PC is at skb_release_data+0x6c/0x14c > [14538.051518] LR is at consume_skb+0x38/0xd8 > [14538.055588] pc : []lr : []psr: 200f0013 > [14538.061817] sp : c28f1da8 ip : fp : c265aa40 > [14538.067010] r10:

Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-11-03 Thread Vladimir Oltean
ired to have > enough headroom otherwise a new skb needs to be created > by the driver to accommodate the timestamp inserted by h/w. > Up until now the driver was relying on skb_realloc_headroom() > to create new skbs to accommodate PTP frames. Turns out that > this method is not reliab

Re: [PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-10-30 Thread Jakub Kicinski
ave > enough headroom otherwise a new skb needs to be created > by the driver to accommodate the timestamp inserted by h/w. > Up until now the driver was relying on skb_realloc_headroom() > to create new skbs to accommodate PTP frames. Turns out that > this method is not reliable i

[PATCH net v2 1/2] gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP

2020-10-29 Thread Claudiu Manoil
accommodate the timestamp inserted by h/w. Up until now the driver was relying on skb_realloc_headroom() to create new skbs to accommodate PTP frames. Turns out that this method is not reliable in this context at least, as skb_realloc_headroom() for PTP frames can cause random crashes, mostly in

Re: [PATCH 2/3] [IPV6]: Avoid skb_copy/pskb_copy/skb_realloc_headroom on input

2007-10-15 Thread David Miller
From: Herbert Xu <[EMAIL PROTECTED]> Date: Sun, 14 Oct 2007 22:49:04 +0800 > [IPV6]: Avoid skb_copy/pskb_copy/skb_realloc_headroom on input > > This patch replaces unnecessary uses of skb_copy by pskb_expand_head > on the IPv6 input path. > > This allows us to remove t

[PATCH 2/3] [IPV6]: Avoid skb_copy/pskb_copy/skb_realloc_headroom on input

2007-10-14 Thread Herbert Xu
[IPV6]: Avoid skb_copy/pskb_copy/skb_realloc_headroom on input This patch replaces unnecessary uses of skb_copy by pskb_expand_head on the IPv6 input path. This allows us to remove the double pointers later. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/ipv6/exthdrs.c

[PATCH 9/10] [NETFILTER]: Avoid skb_copy/pskb_copy/skb_realloc_headroom

2007-10-13 Thread Herbert Xu
[NETFILTER]: Avoid skb_copy/pskb_copy/skb_realloc_headroom This patch replaces unnecessary uses of skb_copy, pskb_copy and skb_realloc_headroom by functions such as skb_make_writable and pskb_expand_head. This allows us to remove the double pointers later. Signed-off-by: Herbert Xu <[EM

skb_realloc_headroom

2005-11-10 Thread Tony
radio_hard_start_xmit will do (simplified): 1) ajust the headroom space hh_len = LL_RESERVED_SPACE(bdev); if (unlikely(skb_headroom(skb) < hh_len && bdev->hard_header)) { struct sk_buff *skb2; skb2 = skb_realloc_headroom(skb, LL_RESERVED_SPACE(dev)); if