dev->min_header_len was introduced in commit 217e6fa24ce2 ("net: introduce device min_header_len") for dev_validate_header() when header_ops->validate and the CAP_SYS_RAWIO bypass could accept frames shorter than hard_header_len. Now that dev_validate_header() and the remaining workarounds in af_packet have been removed, dev->min_header_len has no readers left. Remove the field from struct net_device along with its remaining assignments in ether_setup() and loopback setup. Signed-off-by: Willem de Bruijn --- Documentation/networking/net_cachelines/net_device.rst | 1 - drivers/net/loopback.c | 1 - include/linux/netdevice.h | 2 -- net/ethernet/eth.c | 1 - 4 files changed, 5 deletions(-) diff --git a/Documentation/networking/net_cachelines/net_device.rst b/Documentation/networking/net_cachelines/net_device.rst index 7620d3fcb8dc..f73ea0069432 100644 --- a/Documentation/networking/net_cachelines/net_device.rst +++ b/Documentation/networking/net_cachelines/net_device.rst @@ -46,7 +46,6 @@ netdev_features_t gso_partial_features read_mostly unsigned_int min_mtu unsigned_int max_mtu unsigned_short type -unsigned_char min_header_len unsigned_char name_assign_type int group struct net_device_stats stats diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index 1e6d1b7d71ba..6fdf00c223b9 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c @@ -173,7 +173,6 @@ static void gen_lo_setup(struct net_device *dev, { dev->mtu = mtu; dev->hard_header_len = ETH_HLEN; /* 14 */ - dev->min_header_len = ETH_HLEN; /* 14 */ dev->addr_len = ETH_ALEN; /* 6 */ dev->type = ARPHRD_LOOPBACK; /* 0x0001*/ dev->flags = IFF_LOOPBACK; diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 930899a7a577..2a1b3f48bed5 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1929,7 +1929,6 @@ enum netdev_reg_state { * @max_mtu: Interface Maximum MTU value * @type: Interface hardware type * @hard_header_len: Maximum hardware header length. - * @min_header_len: Minimum hardware header length * * @needed_headroom: Extra headroom the hardware may need, but not in all * cases can this be guaranteed @@ -2292,7 +2291,6 @@ struct net_device { unsigned int min_mtu; unsigned int max_mtu; unsigned short type; - unsigned char min_header_len; unsigned char name_assign_type; int group; diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index 39aab0f8035a..db39527d4704 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c @@ -330,7 +330,6 @@ void ether_setup(struct net_device *dev) dev->header_ops = ð_header_ops; dev->type = ARPHRD_ETHER; dev->hard_header_len = ETH_HLEN; - dev->min_header_len = ETH_HLEN; dev->mtu = ETH_DATA_LEN; dev->min_mtu = ETH_MIN_MTU; dev->max_mtu = ETH_DATA_LEN; -- 2.56.1.839.g22a8290db9-goog