]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: Introduce parse_protocol header_ops callback
authorMaxim Mikityanskiy <maximmi@mellanox.com>
Thu, 21 Feb 2019 12:39:58 +0000 (12:39 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 15:34:28 +0000 (16:34 +0100)
commitb2c2bd7c2891797cae92ce425113e42b23d30c4e
treeb1fa18c67da3aa3d3f0a8ee2e57e9d4265a4791d
parent5aac598c4e897c86ebdcae24391b3a672af47153
net: Introduce parse_protocol header_ops callback

commit e78b2915517e8fcadb1bc130ad6aeac7099e510c upstream.

Introduce a new optional header_ops callback called parse_protocol and a
wrapper function dev_parse_header_protocol, similar to dev_parse_header.

The new callback's purpose is to extract the protocol number from the L2
header, the format of which is known to the driver, but not to the upper
layers of the stack.

Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/netdevice.h