Re: [PATCH net] net: lapb: Copy the skb before sending a packet

2021-02-02 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Sun, 31 Jan 2021 21:57:06 -0800 you wrote: > When sending a packet, we will prepend it with an LAPB header. > This modifies the shared parts of a cloned skb, so we should copy the > skb rather than just clone it, before we

Re: [PATCH net] net: lapb: Copy the skb before sending a packet

2021-02-02 Thread Jakub Kicinski
On Mon, 1 Feb 2021 22:25:17 -0800 Xie He wrote: > On Mon, Feb 1, 2021 at 8:42 PM Jakub Kicinski wrote: > > > > On Mon, 1 Feb 2021 08:14:31 -0800 Xie He wrote: > > > On Mon, Feb 1, 2021 at 6:10 AM Julian Wiedmann > > > wrote: > [...] > > > > > > Calling "skb_cow_head" before we call

RE: [PATCH net] net: lapb: Copy the skb before sending a packet

2021-02-02 Thread David Laight
From: Xie He > Sent: 01 February 2021 16:15 > > On Mon, Feb 1, 2021 at 6:10 AM Julian Wiedmann wrote: > > > > This sounds a bit like you want skb_cow_head() ... ? > > Calling "skb_cow_head" before we call "skb_clone" would indeed solve > the problem of writes to our clones affecting clones in

Re: [PATCH net] net: lapb: Copy the skb before sending a packet

2021-02-01 Thread Xie He
On Mon, Feb 1, 2021 at 8:42 PM Jakub Kicinski wrote: > > On Mon, 1 Feb 2021 08:14:31 -0800 Xie He wrote: > > On Mon, Feb 1, 2021 at 6:10 AM Julian Wiedmann wrote: > > > This sounds a bit like you want skb_cow_head() ... ? > > > > Calling "skb_cow_head" before we call "skb_clone" would indeed

Re: [PATCH net] net: lapb: Copy the skb before sending a packet

2021-02-01 Thread Jakub Kicinski
On Mon, 1 Feb 2021 08:14:31 -0800 Xie He wrote: > On Mon, Feb 1, 2021 at 6:10 AM Julian Wiedmann wrote: > > This sounds a bit like you want skb_cow_head() ... ? > > Calling "skb_cow_head" before we call "skb_clone" would indeed solve > the problem of writes to our clones affecting clones in

Re: [PATCH net] net: lapb: Copy the skb before sending a packet

2021-02-01 Thread Xie He
On Mon, Feb 1, 2021 at 6:10 AM Julian Wiedmann wrote: > > This sounds a bit like you want skb_cow_head() ... ? Calling "skb_cow_head" before we call "skb_clone" would indeed solve the problem of writes to our clones affecting clones in other parts of the system. But since we are still writing to

Re: [PATCH net] net: lapb: Copy the skb before sending a packet

2021-02-01 Thread Julian Wiedmann
On 01.02.21 06:57, Xie He wrote: > When sending a packet, we will prepend it with an LAPB header. > This modifies the shared parts of a cloned skb, so we should copy the > skb rather than just clone it, before we prepend the header. > > In "Documentation/networking/driver.rst" (the 2nd point), it

Re: [PATCH net] net: lapb: Copy the skb before sending a packet

2021-02-01 Thread Martin Schiller
On 2021-02-01 11:49, Xie He wrote: On Mon, Feb 1, 2021 at 2:05 AM Martin Schiller wrote: What kind of packages do you mean are corrupted? ETH_P_X25 or ETH_P_HDLC? I mean ETH_P_X25. I was using "lapbether.c" to test so there was no ETH_P_HDLC. I have also sent a patch here in the past

Re: [PATCH net] net: lapb: Copy the skb before sending a packet

2021-02-01 Thread Xie He
On Mon, Feb 1, 2021 at 2:05 AM Martin Schiller wrote: > > What kind of packages do you mean are corrupted? > ETH_P_X25 or ETH_P_HDLC? I mean ETH_P_X25. I was using "lapbether.c" to test so there was no ETH_P_HDLC. > I have also sent a patch here in the past that addressed corrupted > ETH_P_X25

Re: [PATCH net] net: lapb: Copy the skb before sending a packet

2021-02-01 Thread Martin Schiller
On 2021-02-01 06:57, Xie He wrote: When sending a packet, we will prepend it with an LAPB header. This modifies the shared parts of a cloned skb, so we should copy the skb rather than just clone it, before we prepend the header. In "Documentation/networking/driver.rst" (the 2nd point), it