Thread (5 messages) flat view 5 messages, 4 authors, 2021-02-07

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

From: Eyal Birger <hidden>
Date: 2021-02-06 15:44:05
Also in: lkml

Hi,

On Sat, Feb 6, 2021 at 4:52 AM Willem de Bruijn
[off-list ref] wrote:
On Fri, Feb 5, 2021 at 5:42 PM Xie He [off-list ref] wrote:
quoted
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 <redacted>
Acked-by: Willem de Bruijn <willemb@google.com>

Indeed, existence of dev->header_ops->create is the deciding factor. Thanks Xie.
As such, may I suggest making this explicit by making
dev_hard_header() use dev_has_header()?

Eyal.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help