[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJht_EOdrnuYn0COTW-6kEivbq+1FqzNnWgs8E_xsdyD_pwomA@mail.gmail.com>
Date: Sat, 1 Aug 2020 17:58:30 -0700
From: Xie He <xie.he.0141@...il.com>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Linux X25 <linux-x25@...r.kernel.org>,
Brian Norris <briannorris@...omium.org>
Subject: Re: [PATCH v2] drivers/net/wan/lapbether: Use needed_headroom instead
of hard_header_len
On Sat, Aug 1, 2020 at 6:31 AM Willem de Bruijn
<willemdebruijn.kernel@...il.com> wrote:
>
> The kernel interface cannot be changed. If packet sockets used to pass
> the first byte up to userspace, they have to continue to do so.
>
> So I think you can limit the header_ops to only dev_hard_header.
Actually if we want to keep the kernel interface unchanged, we
shouldn't implement header_ops for dev_hard_header either, because
this changes the way the user space program sends DGRAM packets, too.
Before the change the userspace program needs to add the 1-byte header
before sending, and after the change the userspace program will let
the kernel add the header via dev_hard_header.
> Fixes should be small and targeted. Any larger refactoring is
> best addressed in a separate net-next patch.
I guess the best way for this fix patch would be just add a 0-byte
packet check before the driver reads skb->data[0].
Thanks! I'll add the check and re-send the patch.
Powered by blists - more mailing lists