Re: [PATCH net-next] net/packet: Improve the comment about LL header visibility criteria

From: Jakub Kicinski
Date: Sat Feb 06 2021 - 19:58:47 EST


On Fri, 5 Feb 2021 21:51:36 -0500 Willem de Bruijn wrote:
> On Fri, Feb 5, 2021 at 5:42 PM Xie He <xie.he.0141@xxxxxxxxx> wrote:
> >
> > The "dev_has_header" function, recently added in
> > commit d549699048b4 ("net/packet: fix packet receive on L3 devices
> > without visible hard header"),
> > is more accurate as criteria for determining whether a device exposes
> > the LL header to upper layers, because in addition to dev->header_ops,
> > it also checks for dev->header_ops->create.
> >
> > When transmitting an skb on a device, dev_hard_header can be called to
> > generate an LL header. dev_hard_header will only generate a header if
> > dev->header_ops->create is present.
> >
> > Signed-off-by: Xie He <xie.he.0141@xxxxxxxxx>
>
> Acked-by: Willem de Bruijn <willemb@xxxxxxxxxx>
>
> Indeed, existence of dev->header_ops->create is the deciding factor. Thanks Xie.

Applied, thanks!