From: Martin Schiller <ms@dev.tdt.de>
To: Xie He <xie.he.0141@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Linux X25 <linux-x25@vger.kernel.org>,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] net: lapb: Copy the skb before sending a packet
Date: Mon, 01 Feb 2021 13:47:54 +0100 [thread overview]
Message-ID: <abe3a003ad7fd68d3ecae5246e8d5137@dev.tdt.de> (raw)
In-Reply-To: <CAJht_EPGk871aqK-1+=W7vGZrX8QY8LDVF26jkFjm3veeQmPWw@mail.gmail.com>
On 2021-02-01 11:49, Xie He wrote:
> On Mon, Feb 1, 2021 at 2:05 AM Martin Schiller <ms@dev.tdt.de> 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 frames on an AF_PACKET socket:
>>
>> https://lkml.org/lkml/2020/1/13/388
>>
>> Unfortunately I could not track and describe exactly where the problem
>> was.
>
> Ah... Looks like we had the same problem.
>
>> I just wonder when/where is the logically correct place to copy the
>> skb.
>> Shouldn't it be copied before removing the pseudo header (as I did in
>> my
>> patch)?
>
> I think it's not necessary to copy it before removing the pseudo
> header, because "skb_pull" will not change any data in the data
> buffer. "skb_pull" will only change the values of "skb->data" and
> "skb->len". These values are not shared between clones of skbs, so
> it's safe to change them without affecting other clones of the skb.
>
> I also choose to copy the skb in the LAPB module (rather than in the
> drivers) because I see all drivers have this problem (including the
> recently deleted x25_asy.c driver), so it'd be better to fix this
> issue in the LAPB module, for all drivers.
OK.
Acked-by: Martin Schiller <ms@dev.tdt.de>
next prev parent reply other threads:[~2021-02-01 12:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 5:57 [PATCH net] net: lapb: Copy the skb before sending a packet Xie He
2021-02-01 10:05 ` Martin Schiller
2021-02-01 10:49 ` Xie He
2021-02-01 12:47 ` Martin Schiller [this message]
2021-02-01 14:10 ` Julian Wiedmann
2021-02-01 16:14 ` Xie He
2021-02-02 4:42 ` Jakub Kicinski
2021-02-02 6:25 ` Xie He
2021-02-02 16:41 ` Jakub Kicinski
2021-02-02 9:04 ` David Laight
2021-02-02 16:50 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=abe3a003ad7fd68d3ecae5246e8d5137@dev.tdt.de \
--to=ms@dev.tdt.de \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-x25@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=xie.he.0141@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).