All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jian Shen <shenjian15@huawei.com>
To: <davem@davemloft.net>, <kuba@kernel.org>, <andrew@lunn.ch>,
	<hkallweit1@gmail.com>
Cc: <netdev@vger.kernel.org>, <linuxarm@openeuler.org>
Subject: [RFCv2 net-next 009/167] net: convert the prototype of ndo_features_check
Date: Wed, 29 Sep 2021 23:50:56 +0800	[thread overview]
Message-ID: <20210929155334.12454-10-shenjian15@huawei.com> (raw)
In-Reply-To: <20210929155334.12454-1-shenjian15@huawei.com>

For the origin type for netdev_features_t would be changed to
be unsigned long * from u64, so changes the prototype of
ndo_features_check for adaption.

Signed-off-by: Jian Shen <shenjian15@huawei.com>
---
 drivers/net/ethernet/amd/xgbe/xgbe-drv.c      | 11 ++---
 .../net/ethernet/broadcom/bnx2x/bnx2x_main.c  | 12 +++---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c     | 15 ++++---
 drivers/net/ethernet/cadence/macb_main.c      | 20 +++++----
 .../net/ethernet/chelsio/cxgb4/cxgb4_main.c   | 11 +++--
 drivers/net/ethernet/cisco/enic/enic_main.c   | 13 +++---
 drivers/net/ethernet/emulex/benet/be_main.c   | 23 +++++------
 .../net/ethernet/hisilicon/hns3/hns3_enet.c   | 11 ++---
 drivers/net/ethernet/ibm/ibmvnic.c            |  9 ++--
 .../net/ethernet/intel/fm10k/fm10k_netdev.c   |  9 ++--
 drivers/net/ethernet/intel/i40e/i40e_main.c   | 13 +++---
 drivers/net/ethernet/intel/iavf/iavf_main.c   | 13 +++---
 drivers/net/ethernet/intel/ice/ice_main.c     | 15 ++++---
 drivers/net/ethernet/intel/igb/igb_main.c     | 41 ++++++++++---------
 drivers/net/ethernet/intel/igbvf/netdev.c     | 37 +++++++++--------
 drivers/net/ethernet/intel/igc/igc_main.c     | 37 +++++++++--------
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 41 ++++++++++---------
 .../net/ethernet/intel/ixgbevf/ixgbevf_main.c | 37 +++++++++--------
 .../net/ethernet/mellanox/mlx4/en_netdev.c    | 13 +++---
 drivers/net/ethernet/mellanox/mlx5/core/en.h  |  5 +--
 .../net/ethernet/mellanox/mlx5/core/en_main.c | 15 +++----
 .../ethernet/netronome/nfp/nfp_net_common.c   | 22 +++++-----
 drivers/net/ethernet/qlogic/qede/qede.h       |  5 +--
 drivers/net/ethernet/qlogic/qede/qede_fp.c    | 20 ++++-----
 .../net/ethernet/qlogic/qlcnic/qlcnic_main.c  | 10 ++---
 drivers/net/ethernet/realtek/8139cp.c         | 10 ++---
 drivers/net/ethernet/realtek/r8169_main.c     | 18 ++++----
 drivers/net/ethernet/sfc/efx_common.c         | 13 +++---
 drivers/net/ethernet/sfc/efx_common.h         |  4 +-
 drivers/net/usb/lan78xx.c                     | 14 +++----
 drivers/net/usb/r8152.c                       | 11 ++---
 drivers/net/vmxnet3/vmxnet3_ethtool.c         | 15 +++----
 drivers/net/vmxnet3/vmxnet3_int.h             |  4 +-
 drivers/s390/net/qeth_core.h                  |  5 +--
 drivers/s390/net/qeth_core_main.c             | 18 ++++----
 drivers/s390/net/qeth_l3_main.c               | 10 ++---
 include/linux/netdevice.h                     |  9 ++--
 net/core/dev.c                                |  9 ++--
 38 files changed, 280 insertions(+), 318 deletions(-)

diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
index 29bca9fabcde..cc1f1a7a46ae 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
@@ -2267,14 +2267,11 @@ static int xgbe_set_features(struct net_device *netdev,
 	return 0;
 }
 
-static netdev_features_t xgbe_features_check(struct sk_buff *skb,
-					     struct net_device *netdev,
-					     netdev_features_t features)
+static void xgbe_features_check(struct sk_buff *skb, struct net_device *netdev,
+				netdev_features_t *features)
 {
-	vlan_features_check(skb, &features);
-	vxlan_features_check(skb, &features);
-
-	return features;
+	vlan_features_check(skb, features);
+	vxlan_features_check(skb, features);
 }
 
 static const struct net_device_ops xgbe_netdev_ops = {
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index f444515452a5..1f817dfa5b64 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -12834,9 +12834,8 @@ static int bnx2x_get_phys_port_id(struct net_device *netdev,
 	return 0;
 }
 
-static netdev_features_t bnx2x_features_check(struct sk_buff *skb,
-					      struct net_device *dev,
-					      netdev_features_t features)
+static void bnx2x_features_check(struct sk_buff *skb, struct net_device *dev,
+				 netdev_features_t *features)
 {
 	/*
 	 * A skb with gso_size + header length > 9700 will cause a
@@ -12854,11 +12853,10 @@ static netdev_features_t bnx2x_features_check(struct sk_buff *skb,
 	if (unlikely(skb_is_gso(skb) &&
 		     (skb_shinfo(skb)->gso_size > 9000) &&
 		     !skb_gso_validate_mac_len(skb, 9700)))
-		features &= ~NETIF_F_GSO_MASK;
+		*features &= ~NETIF_F_GSO_MASK;
 
-	vlan_features_check(skb, &features);
-	vxlan_features_check(skb, &features);
-	return features;
+	vlan_features_check(skb, features);
+	vxlan_features_check(skb, features);
 }
 
 static int __bnx2x_vlan_configure_vid(struct bnx2x *bp, u16 vid, bool add)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 775dfcdd35f2..4689d053aff8 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -11090,31 +11090,30 @@ static bool bnxt_tunl_check(struct bnxt *bp, struct sk_buff *skb, u8 l4_proto)
 	return false;
 }
 
-static netdev_features_t bnxt_features_check(struct sk_buff *skb,
-					     struct net_device *dev,
-					     netdev_features_t features)
+static void bnxt_features_check(struct sk_buff *skb, struct net_device *dev,
+				netdev_features_t *features)
 {
 	struct bnxt *bp = netdev_priv(dev);
 	u8 *l4_proto;
 
-	vlan_features_check(skb, &features);
+	vlan_features_check(skb, features);
 	switch (vlan_get_protocol(skb)) {
 	case htons(ETH_P_IP):
 		if (!skb->encapsulation)
-			return features;
+			return;
 		l4_proto = &ip_hdr(skb)->protocol;
 		if (bnxt_tunl_check(bp, skb, *l4_proto))
-			return features;
+			return;
 		break;
 	case htons(ETH_P_IPV6):
 		if (!bnxt_exthdr_check(bp, skb, skb_network_offset(skb),
 				       &l4_proto))
 			break;
 		if (!l4_proto || bnxt_tunl_check(bp, skb, *l4_proto))
-			return features;
+			return;
 		break;
 	}
-	return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+	*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
 }
 
 int bnxt_dbg_hwrm_rd_reg(struct bnxt *bp, u32 reg_off, u16 num_words,
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index e2730b3e1a57..e30ee19d9ba2 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -2035,9 +2035,8 @@ static unsigned int macb_tx_map(struct macb *bp,
 	return 0;
 }
 
-static netdev_features_t macb_features_check(struct sk_buff *skb,
-					     struct net_device *dev,
-					     netdev_features_t features)
+static void macb_features_check(struct sk_buff *skb, struct net_device *dev,
+				netdev_features_t *features)
 {
 	unsigned int nr_frags, f;
 	unsigned int hdrlen;
@@ -2046,7 +2045,7 @@ static netdev_features_t macb_features_check(struct sk_buff *skb,
 
 	/* there is only one buffer or protocol is not UDP */
 	if (!skb_is_nonlinear(skb) || (ip_hdr(skb)->protocol != IPPROTO_UDP))
-		return features;
+		return;
 
 	/* length of header */
 	hdrlen = skb_transport_offset(skb);
@@ -2055,8 +2054,10 @@ static netdev_features_t macb_features_check(struct sk_buff *skb,
 	 * When software supplies two or more payload buffers all payload buffers
 	 * apart from the last must be a multiple of 8 bytes in size.
 	 */
-	if (!IS_ALIGNED(skb_headlen(skb) - hdrlen, MACB_TX_LEN_ALIGN))
-		return features & ~MACB_NETIF_LSO;
+	if (!IS_ALIGNED(skb_headlen(skb) - hdrlen, MACB_TX_LEN_ALIGN)) {
+		*features &= ~MACB_NETIF_LSO;
+		return;
+	}
 
 	nr_frags = skb_shinfo(skb)->nr_frags;
 	/* No need to check last fragment */
@@ -2064,10 +2065,11 @@ static netdev_features_t macb_features_check(struct sk_buff *skb,
 	for (f = 0; f < nr_frags; f++) {
 		const skb_frag_t *frag = &skb_shinfo(skb)->frags[f];
 
-		if (!IS_ALIGNED(skb_frag_size(frag), MACB_TX_LEN_ALIGN))
-			return features & ~MACB_NETIF_LSO;
+		if (!IS_ALIGNED(skb_frag_size(frag), MACB_TX_LEN_ALIGN)) {
+			*features &= ~MACB_NETIF_LSO;
+			return;
+		}
 	}
-	return features;
 }
 
 static inline int macb_clear_csum(struct sk_buff *skb)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 0d9cda4ab303..a654169b9dfc 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -3834,22 +3834,21 @@ static const struct udp_tunnel_nic_info cxgb_udp_tunnels = {
 	},
 };
 
-static netdev_features_t cxgb_features_check(struct sk_buff *skb,
-					     struct net_device *dev,
-					     netdev_features_t features)
+static void cxgb_features_check(struct sk_buff *skb, struct net_device *dev,
+				netdev_features_t *features)
 {
 	struct port_info *pi = netdev_priv(dev);
 	struct adapter *adapter = pi->adapter;
 
 	if (CHELSIO_CHIP_VERSION(adapter->params.chip) < CHELSIO_T6)
-		return features;
+		return;
 
 	/* Check if hw supports offload for this packet */
 	if (!skb->encapsulation || cxgb_encap_offload_supported(skb))
-		return features;
+		return;
 
 	/* Offload is not supported for this encapsulated packet */
-	return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+	*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
 }
 
 static netdev_features_t cxgb_fix_features(struct net_device *dev,
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index 558a07c5b4bc..5bc075331343 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -240,9 +240,8 @@ static const struct udp_tunnel_nic_info enic_udp_tunnels = {
 	},
 };
 
-static netdev_features_t enic_features_check(struct sk_buff *skb,
-					     struct net_device *dev,
-					     netdev_features_t features)
+static void enic_features_check(struct sk_buff *skb, struct net_device *dev,
+				netdev_features_t *features)
 {
 	const struct ethhdr *eth = (struct ethhdr *)skb_inner_mac_header(skb);
 	struct enic *enic = netdev_priv(dev);
@@ -251,9 +250,9 @@ static netdev_features_t enic_features_check(struct sk_buff *skb,
 	u8 proto;
 
 	if (!skb->encapsulation)
-		return features;
+		return;
 
-	vxlan_features_check(skb, &features);
+	vxlan_features_check(skb, features);
 
 	switch (vlan_get_protocol(skb)) {
 	case htons(ETH_P_IPV6):
@@ -291,10 +290,10 @@ static netdev_features_t enic_features_check(struct sk_buff *skb,
 	if (port  != enic->vxlan.vxlan_udp_port_number)
 		goto out;
 
-	return features;
+	return;
 
 out:
-	return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+	*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
 }
 
 int enic_is_dynamic(struct enic *enic)
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 556242d32d93..27e8a1d95a9a 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -5064,9 +5064,8 @@ static struct be_cmd_work *be_alloc_work(struct be_adapter *adapter,
 	return work;
 }
 
-static netdev_features_t be_features_check(struct sk_buff *skb,
-					   struct net_device *dev,
-					   netdev_features_t features)
+static void be_features_check(struct sk_buff *skb, struct net_device *dev,
+			      netdev_features_t *features)
 {
 	struct be_adapter *adapter = netdev_priv(dev);
 	u8 l4_hdr = 0;
@@ -5076,7 +5075,7 @@ static netdev_features_t be_features_check(struct sk_buff *skb,
 		 * to Lancer and BE3 HW. Disable TSO6 feature.
 		 */
 		if (!skyhawk_chip(adapter) && is_ipv6_ext_hdr(skb))
-			features &= ~NETIF_F_TSO6;
+			*features &= ~NETIF_F_TSO6;
 
 		/* Lancer cannot handle the packet with MSS less than 256.
 		 * Also it can't handle a TSO packet with a single segment
@@ -5085,17 +5084,17 @@ static netdev_features_t be_features_check(struct sk_buff *skb,
 		if (lancer_chip(adapter) &&
 		    (skb_shinfo(skb)->gso_size < 256 ||
 		     skb_shinfo(skb)->gso_segs == 1))
-			features &= ~NETIF_F_GSO_MASK;
+			*features &= ~NETIF_F_GSO_MASK;
 	}
 
 	/* The code below restricts offload features for some tunneled and
 	 * Q-in-Q packets.
 	 * Offload features for normal (non tunnel) packets are unchanged.
 	 */
-	vlan_features_check(skb, &features);
+	vlan_features_check(skb, features);
 	if (!skb->encapsulation ||
 	    !(adapter->flags & BE_FLAGS_VXLAN_OFFLOADS))
-		return features;
+		return;
 
 	/* It's an encapsulated packet and VxLAN offloads are enabled. We
 	 * should disable tunnel offload features if it's not a VxLAN packet,
@@ -5111,7 +5110,7 @@ static netdev_features_t be_features_check(struct sk_buff *skb,
 		l4_hdr = ipv6_hdr(skb)->nexthdr;
 		break;
 	default:
-		return features;
+		return;
 	}
 
 	if (l4_hdr != IPPROTO_UDP ||
@@ -5120,10 +5119,10 @@ static netdev_features_t be_features_check(struct sk_buff *skb,
 	    skb_inner_mac_header(skb) - skb_transport_header(skb) !=
 		sizeof(struct udphdr) + sizeof(struct vxlanhdr) ||
 	    !adapter->vxlan_port ||
-	    udp_hdr(skb)->dest != adapter->vxlan_port)
-		return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
-
-	return features;
+	    udp_hdr(skb)->dest != adapter->vxlan_port) {
+		*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+		return;
+	}
 }
 
 static int be_get_phys_port_id(struct net_device *dev,
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index adc54a726661..e8179ac6d4e3 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -2353,9 +2353,8 @@ static int hns3_nic_set_features(struct net_device *netdev,
 	return 0;
 }
 
-static netdev_features_t hns3_features_check(struct sk_buff *skb,
-					     struct net_device *dev,
-					     netdev_features_t features)
+static void hns3_features_check(struct sk_buff *skb, struct net_device *dev,
+				netdev_features_t *features)
 {
 #define HNS3_MAX_HDR_LEN	480U
 #define HNS3_MAX_L4_HDR_LEN	60U
@@ -2363,7 +2362,7 @@ static netdev_features_t hns3_features_check(struct sk_buff *skb,
 	size_t len;
 
 	if (skb->ip_summed != CHECKSUM_PARTIAL)
-		return features;
+		return;
 
 	if (skb->encapsulation)
 		len = skb_inner_transport_header(skb) - skb->data;
@@ -2379,9 +2378,7 @@ static netdev_features_t hns3_features_check(struct sk_buff *skb,
 	 * len of 480 bytes.
 	 */
 	if (len > HNS3_MAX_HDR_LEN)
-		features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
-
-	return features;
+		*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
 }
 
 static void hns3_nic_get_stats64(struct net_device *netdev,
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 8f17096e614d..b8ee2e3977b5 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -3003,9 +3003,8 @@ static int ibmvnic_change_mtu(struct net_device *netdev, int new_mtu)
 	return wait_for_reset(adapter);
 }
 
-static netdev_features_t ibmvnic_features_check(struct sk_buff *skb,
-						struct net_device *dev,
-						netdev_features_t features)
+static void ibmvnic_features_check(struct sk_buff *skb, struct net_device *dev,
+				   netdev_features_t *features)
 {
 	/* Some backing hardware adapters can not
 	 * handle packets with a MSS less than 224
@@ -3014,10 +3013,8 @@ static netdev_features_t ibmvnic_features_check(struct sk_buff *skb,
 	if (skb_is_gso(skb)) {
 		if (skb_shinfo(skb)->gso_size < 224 ||
 		    skb_shinfo(skb)->gso_segs == 1)
-			features &= ~NETIF_F_GSO_MASK;
+			*features &= ~NETIF_F_GSO_MASK;
 	}
-
-	return features;
 }
 
 static const struct net_device_ops ibmvnic_netdev_ops = {
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
index 2fb52bd6fc0e..a311bcdfbff2 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
@@ -1504,14 +1504,13 @@ static void fm10k_dfwd_del_station(struct net_device *dev, void *priv)
 	}
 }
 
-static netdev_features_t fm10k_features_check(struct sk_buff *skb,
-					      struct net_device *dev,
-					      netdev_features_t features)
+static void fm10k_features_check(struct sk_buff *skb, struct net_device *dev,
+				 netdev_features_t *features)
 {
 	if (!skb->encapsulation || fm10k_tx_encap_offload(skb))
-		return features;
+		return;
 
-	return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+	*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
 }
 
 static const struct net_device_ops fm10k_netdev_ops = {
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 2f20980dd9a5..5246c6abbd7d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -12873,9 +12873,8 @@ static int i40e_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
  * @dev: This physical port's netdev
  * @features: Offload features that the stack believes apply
  **/
-static netdev_features_t i40e_features_check(struct sk_buff *skb,
-					     struct net_device *dev,
-					     netdev_features_t features)
+static void i40e_features_check(struct sk_buff *skb, struct net_device *dev,
+				netdev_features_t *features)
 {
 	size_t len;
 
@@ -12884,13 +12883,13 @@ static netdev_features_t i40e_features_check(struct sk_buff *skb,
 	 * checking for CHECKSUM_PARTIAL
 	 */
 	if (skb->ip_summed != CHECKSUM_PARTIAL)
-		return features;
+		return;
 
 	/* We cannot support GSO if the MSS is going to be less than
 	 * 64 bytes.  If it is then we need to drop support for GSO.
 	 */
 	if (skb_is_gso(skb) && (skb_shinfo(skb)->gso_size < 64))
-		features &= ~NETIF_F_GSO_MASK;
+		*features &= ~NETIF_F_GSO_MASK;
 
 	/* MACLEN can support at most 63 words */
 	len = skb_network_header(skb) - skb->data;
@@ -12920,9 +12919,9 @@ static netdev_features_t i40e_features_check(struct sk_buff *skb,
 	 * by TCP, which is at most 15 dwords
 	 */
 
-	return features;
+	return;
 out_err:
-	return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+	*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
 }
 
 /**
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 23762a7ef740..b066f1864b3f 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -3379,9 +3379,8 @@ static int iavf_set_features(struct net_device *netdev,
  * @dev: This physical port's netdev
  * @features: Offload features that the stack believes apply
  **/
-static netdev_features_t iavf_features_check(struct sk_buff *skb,
-					     struct net_device *dev,
-					     netdev_features_t features)
+static void iavf_features_check(struct sk_buff *skb, struct net_device *dev,
+				netdev_features_t *features)
 {
 	size_t len;
 
@@ -3390,13 +3389,13 @@ static netdev_features_t iavf_features_check(struct sk_buff *skb,
 	 * checking for CHECKSUM_PARTIAL
 	 */
 	if (skb->ip_summed != CHECKSUM_PARTIAL)
-		return features;
+		return;
 
 	/* We cannot support GSO if the MSS is going to be less than
 	 * 64 bytes.  If it is then we need to drop support for GSO.
 	 */
 	if (skb_is_gso(skb) && (skb_shinfo(skb)->gso_size < 64))
-		features &= ~NETIF_F_GSO_MASK;
+		*features &= ~NETIF_F_GSO_MASK;
 
 	/* MACLEN can support at most 63 words */
 	len = skb_network_header(skb) - skb->data;
@@ -3426,9 +3425,9 @@ static netdev_features_t iavf_features_check(struct sk_buff *skb,
 	 * by TCP, which is at most 15 dwords
 	 */
 
-	return features;
+	return;
 out_err:
-	return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+	*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
 }
 
 /**
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 909e5cd98054..1ad630b8d103 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -7176,10 +7176,9 @@ int ice_stop(struct net_device *netdev)
  * @netdev: This port's netdev
  * @features: Offload features that the stack believes apply
  */
-static netdev_features_t
-ice_features_check(struct sk_buff *skb,
-		   struct net_device __always_unused *netdev,
-		   netdev_features_t features)
+static void ice_features_check(struct sk_buff *skb,
+			       struct net_device __always_unused *netdev,
+			       netdev_features_t *features)
 {
 	size_t len;
 
@@ -7188,13 +7187,13 @@ ice_features_check(struct sk_buff *skb,
 	 * checking for CHECKSUM_PARTIAL
 	 */
 	if (skb->ip_summed != CHECKSUM_PARTIAL)
-		return features;
+		return;
 
 	/* We cannot support GSO if the MSS is going to be less than
 	 * 64 bytes. If it is then we need to drop support for GSO.
 	 */
 	if (skb_is_gso(skb) && (skb_shinfo(skb)->gso_size < 64))
-		features &= ~NETIF_F_GSO_MASK;
+		*features &= ~NETIF_F_GSO_MASK;
 
 	len = skb_network_header(skb) - skb->data;
 	if (len > ICE_TXD_MACLEN_MAX || len & 0x1)
@@ -7215,9 +7214,9 @@ ice_features_check(struct sk_buff *skb,
 			goto out_rm_features;
 	}
 
-	return features;
+	return;
 out_rm_features:
-	return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+	*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
 }
 
 static const struct net_device_ops ice_netdev_safe_mode_ops = {
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 751de06019a0..82b59adf8034 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -2505,37 +2505,38 @@ static int igb_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
 #define IGB_MAX_MAC_HDR_LEN	127
 #define IGB_MAX_NETWORK_HDR_LEN	511
 
-static netdev_features_t
-igb_features_check(struct sk_buff *skb, struct net_device *dev,
-		   netdev_features_t features)
+static void igb_features_check(struct sk_buff *skb, struct net_device *dev,
+			       netdev_features_t *features)
 {
 	unsigned int network_hdr_len, mac_hdr_len;
 
 	/* Make certain the headers can be described by a context descriptor */
 	mac_hdr_len = skb_network_header(skb) - skb->data;
-	if (unlikely(mac_hdr_len > IGB_MAX_MAC_HDR_LEN))
-		return features & ~(NETIF_F_HW_CSUM |
-				    NETIF_F_SCTP_CRC |
-				    NETIF_F_GSO_UDP_L4 |
-				    NETIF_F_HW_VLAN_CTAG_TX |
-				    NETIF_F_TSO |
-				    NETIF_F_TSO6);
+	if (unlikely(mac_hdr_len > IGB_MAX_MAC_HDR_LEN)) {
+		*features &= ~(NETIF_F_HW_CSUM |
+			       NETIF_F_SCTP_CRC |
+			       NETIF_F_GSO_UDP_L4 |
+			       NETIF_F_HW_VLAN_CTAG_TX |
+			       NETIF_F_TSO |
+			       NETIF_F_TSO6);
+		return;
+	}
 
 	network_hdr_len = skb_checksum_start(skb) - skb_network_header(skb);
-	if (unlikely(network_hdr_len >  IGB_MAX_NETWORK_HDR_LEN))
-		return features & ~(NETIF_F_HW_CSUM |
-				    NETIF_F_SCTP_CRC |
-				    NETIF_F_GSO_UDP_L4 |
-				    NETIF_F_TSO |
-				    NETIF_F_TSO6);
+	if (unlikely(network_hdr_len >  IGB_MAX_NETWORK_HDR_LEN)) {
+		*features &= ~(NETIF_F_HW_CSUM |
+			       NETIF_F_SCTP_CRC |
+			       NETIF_F_GSO_UDP_L4 |
+			       NETIF_F_TSO |
+			       NETIF_F_TSO6);
+		return;
+	}
 
 	/* We can only support IPV4 TSO in tunnels if we can mangle the
 	 * inner IP ID field, so strip TSO if MANGLEID is not supported.
 	 */
-	if (skb->encapsulation && !(features & NETIF_F_TSO_MANGLEID))
-		features &= ~NETIF_F_TSO;
-
-	return features;
+	if (skb->encapsulation && !(*features & NETIF_F_TSO_MANGLEID))
+		*features &= ~NETIF_F_TSO;
 }
 
 static void igb_offload_apply(struct igb_adapter *adapter, s32 queue)
diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
index d32e72d953c8..92a46ac4ee1f 100644
--- a/drivers/net/ethernet/intel/igbvf/netdev.c
+++ b/drivers/net/ethernet/intel/igbvf/netdev.c
@@ -2619,35 +2619,36 @@ static int igbvf_set_features(struct net_device *netdev,
 #define IGBVF_MAX_MAC_HDR_LEN		127
 #define IGBVF_MAX_NETWORK_HDR_LEN	511
 
-static netdev_features_t
-igbvf_features_check(struct sk_buff *skb, struct net_device *dev,
-		     netdev_features_t features)
+static void igbvf_features_check(struct sk_buff *skb, struct net_device *dev,
+				 netdev_features_t *features)
 {
 	unsigned int network_hdr_len, mac_hdr_len;
 
 	/* Make certain the headers can be described by a context descriptor */
 	mac_hdr_len = skb_network_header(skb) - skb->data;
-	if (unlikely(mac_hdr_len > IGBVF_MAX_MAC_HDR_LEN))
-		return features & ~(NETIF_F_HW_CSUM |
-				    NETIF_F_SCTP_CRC |
-				    NETIF_F_HW_VLAN_CTAG_TX |
-				    NETIF_F_TSO |
-				    NETIF_F_TSO6);
+	if (unlikely(mac_hdr_len > IGBVF_MAX_MAC_HDR_LEN)) {
+		*features &= ~(NETIF_F_HW_CSUM |
+			       NETIF_F_SCTP_CRC |
+			       NETIF_F_HW_VLAN_CTAG_TX |
+			       NETIF_F_TSO |
+			       NETIF_F_TSO6);
+		return;
+	}
 
 	network_hdr_len = skb_checksum_start(skb) - skb_network_header(skb);
-	if (unlikely(network_hdr_len >  IGBVF_MAX_NETWORK_HDR_LEN))
-		return features & ~(NETIF_F_HW_CSUM |
-				    NETIF_F_SCTP_CRC |
-				    NETIF_F_TSO |
-				    NETIF_F_TSO6);
+	if (unlikely(network_hdr_len >  IGBVF_MAX_NETWORK_HDR_LEN)) {
+		*features &= ~(NETIF_F_HW_CSUM |
+			       NETIF_F_SCTP_CRC |
+			       NETIF_F_TSO |
+			       NETIF_F_TSO6);
+		return;
+	}
 
 	/* We can only support IPV4 TSO in tunnels if we can mangle the
 	 * inner IP ID field, so strip TSO if MANGLEID is not supported.
 	 */
-	if (skb->encapsulation && !(features & NETIF_F_TSO_MANGLEID))
-		features &= ~NETIF_F_TSO;
-
-	return features;
+	if (skb->encapsulation && !(*features & NETIF_F_TSO_MANGLEID))
+		*features &= ~NETIF_F_TSO;
 }
 
 static const struct net_device_ops igbvf_netdev_ops = {
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 0e19b4d02e62..fdb3ed051456 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -4955,35 +4955,36 @@ static int igc_set_features(struct net_device *netdev,
 	return 1;
 }
 
-static netdev_features_t
-igc_features_check(struct sk_buff *skb, struct net_device *dev,
-		   netdev_features_t features)
+static void igc_features_check(struct sk_buff *skb, struct net_device *dev,
+			       netdev_features_t *features)
 {
 	unsigned int network_hdr_len, mac_hdr_len;
 
 	/* Make certain the headers can be described by a context descriptor */
 	mac_hdr_len = skb_network_header(skb) - skb->data;
-	if (unlikely(mac_hdr_len > IGC_MAX_MAC_HDR_LEN))
-		return features & ~(NETIF_F_HW_CSUM |
-				    NETIF_F_SCTP_CRC |
-				    NETIF_F_HW_VLAN_CTAG_TX |
-				    NETIF_F_TSO |
-				    NETIF_F_TSO6);
+	if (unlikely(mac_hdr_len > IGC_MAX_MAC_HDR_LEN)) {
+		*features &= ~(NETIF_F_HW_CSUM |
+			       NETIF_F_SCTP_CRC |
+			       NETIF_F_HW_VLAN_CTAG_TX |
+			       NETIF_F_TSO |
+			       NETIF_F_TSO6);
+		return;
+	}
 
 	network_hdr_len = skb_checksum_start(skb) - skb_network_header(skb);
-	if (unlikely(network_hdr_len >  IGC_MAX_NETWORK_HDR_LEN))
-		return features & ~(NETIF_F_HW_CSUM |
-				    NETIF_F_SCTP_CRC |
-				    NETIF_F_TSO |
-				    NETIF_F_TSO6);
+	if (unlikely(network_hdr_len >  IGC_MAX_NETWORK_HDR_LEN)) {
+		*features &= ~(NETIF_F_HW_CSUM |
+			       NETIF_F_SCTP_CRC |
+			       NETIF_F_TSO |
+			       NETIF_F_TSO6);
+		return;
+	}
 
 	/* We can only support IPv4 TSO in tunnels if we can mangle the
 	 * inner IP ID field, so strip TSO if MANGLEID is not supported.
 	 */
-	if (skb->encapsulation && !(features & NETIF_F_TSO_MANGLEID))
-		features &= ~NETIF_F_TSO;
-
-	return features;
+	if (skb->encapsulation && !(*features & NETIF_F_TSO_MANGLEID))
+		*features &= ~NETIF_F_TSO;
 }
 
 static void igc_tsync_interrupt(struct igc_adapter *adapter)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 24e06ba6f5e9..e39d3983a455 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -10067,43 +10067,44 @@ static void ixgbe_fwd_del(struct net_device *pdev, void *priv)
 #define IXGBE_MAX_MAC_HDR_LEN		127
 #define IXGBE_MAX_NETWORK_HDR_LEN	511
 
-static netdev_features_t
-ixgbe_features_check(struct sk_buff *skb, struct net_device *dev,
-		     netdev_features_t features)
+static void ixgbe_features_check(struct sk_buff *skb, struct net_device *dev,
+				 netdev_features_t *features)
 {
 	unsigned int network_hdr_len, mac_hdr_len;
 
 	/* Make certain the headers can be described by a context descriptor */
 	mac_hdr_len = skb_network_header(skb) - skb->data;
-	if (unlikely(mac_hdr_len > IXGBE_MAX_MAC_HDR_LEN))
-		return features & ~(NETIF_F_HW_CSUM |
-				    NETIF_F_SCTP_CRC |
-				    NETIF_F_GSO_UDP_L4 |
-				    NETIF_F_HW_VLAN_CTAG_TX |
-				    NETIF_F_TSO |
-				    NETIF_F_TSO6);
+	if (unlikely(mac_hdr_len > IXGBE_MAX_MAC_HDR_LEN)) {
+		*features &= ~(NETIF_F_HW_CSUM |
+			       NETIF_F_SCTP_CRC |
+			       NETIF_F_GSO_UDP_L4 |
+			       NETIF_F_HW_VLAN_CTAG_TX |
+			       NETIF_F_TSO |
+			       NETIF_F_TSO6);
+		return;
+	}
 
 	network_hdr_len = skb_checksum_start(skb) - skb_network_header(skb);
-	if (unlikely(network_hdr_len >  IXGBE_MAX_NETWORK_HDR_LEN))
-		return features & ~(NETIF_F_HW_CSUM |
-				    NETIF_F_SCTP_CRC |
-				    NETIF_F_GSO_UDP_L4 |
-				    NETIF_F_TSO |
-				    NETIF_F_TSO6);
+	if (unlikely(network_hdr_len >  IXGBE_MAX_NETWORK_HDR_LEN)) {
+		*features &= ~(NETIF_F_HW_CSUM |
+			       NETIF_F_SCTP_CRC |
+			       NETIF_F_GSO_UDP_L4 |
+			       NETIF_F_TSO |
+			       NETIF_F_TSO6);
+		return;
+	}
 
 	/* We can only support IPV4 TSO in tunnels if we can mangle the
 	 * inner IP ID field, so strip TSO if MANGLEID is not supported.
 	 * IPsec offoad sets skb->encapsulation but still can handle
 	 * the TSO, so it's the exception.
 	 */
-	if (skb->encapsulation && !(features & NETIF_F_TSO_MANGLEID)) {
+	if (skb->encapsulation && !(*features & NETIF_F_TSO_MANGLEID)) {
 #ifdef CONFIG_IXGBE_IPSEC
 		if (!secpath_exists(skb))
 #endif
-			features &= ~NETIF_F_TSO;
+			*features &= ~NETIF_F_TSO;
 	}
-
-	return features;
 }
 
 static int ixgbe_xdp_setup(struct net_device *dev, struct bpf_prog *prog)
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index c714e1ecd308..f2f6d00960c5 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -4381,35 +4381,36 @@ static void ixgbevf_get_stats(struct net_device *netdev,
 #define IXGBEVF_MAX_MAC_HDR_LEN		127
 #define IXGBEVF_MAX_NETWORK_HDR_LEN	511
 
-static netdev_features_t
-ixgbevf_features_check(struct sk_buff *skb, struct net_device *dev,
-		       netdev_features_t features)
+static void ixgbevf_features_check(struct sk_buff *skb, struct net_device *dev,
+				   netdev_features_t *features)
 {
 	unsigned int network_hdr_len, mac_hdr_len;
 
 	/* Make certain the headers can be described by a context descriptor */
 	mac_hdr_len = skb_network_header(skb) - skb->data;
-	if (unlikely(mac_hdr_len > IXGBEVF_MAX_MAC_HDR_LEN))
-		return features & ~(NETIF_F_HW_CSUM |
-				    NETIF_F_SCTP_CRC |
-				    NETIF_F_HW_VLAN_CTAG_TX |
-				    NETIF_F_TSO |
-				    NETIF_F_TSO6);
+	if (unlikely(mac_hdr_len > IXGBEVF_MAX_MAC_HDR_LEN)) {
+		*features &= ~(NETIF_F_HW_CSUM |
+			       NETIF_F_SCTP_CRC |
+			       NETIF_F_HW_VLAN_CTAG_TX |
+			       NETIF_F_TSO |
+			       NETIF_F_TSO6);
+		return;
+	}
 
 	network_hdr_len = skb_checksum_start(skb) - skb_network_header(skb);
-	if (unlikely(network_hdr_len >  IXGBEVF_MAX_NETWORK_HDR_LEN))
-		return features & ~(NETIF_F_HW_CSUM |
-				    NETIF_F_SCTP_CRC |
-				    NETIF_F_TSO |
-				    NETIF_F_TSO6);
+	if (unlikely(network_hdr_len >  IXGBEVF_MAX_NETWORK_HDR_LEN)) {
+		*features &= ~(NETIF_F_HW_CSUM |
+			       NETIF_F_SCTP_CRC |
+			       NETIF_F_TSO |
+			       NETIF_F_TSO6);
+		return;
+	}
 
 	/* We can only support IPV4 TSO in tunnels if we can mangle the
 	 * inner IP ID field, so strip TSO if MANGLEID is not supported.
 	 */
-	if (skb->encapsulation && !(features & NETIF_F_TSO_MANGLEID))
-		features &= ~NETIF_F_TSO;
-
-	return features;
+	if (skb->encapsulation && !(*features & NETIF_F_TSO_MANGLEID))
+		*features &= ~NETIF_F_TSO;
 }
 
 static int ixgbevf_xdp_setup(struct net_device *dev, struct bpf_prog *prog)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index dd6a41182446..354c63aa726d 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -2674,12 +2674,11 @@ static const struct udp_tunnel_nic_info mlx4_udp_tunnels = {
 	},
 };
 
-static netdev_features_t mlx4_en_features_check(struct sk_buff *skb,
-						struct net_device *dev,
-						netdev_features_t features)
+static void mlx4_en_features_check(struct sk_buff *skb, struct net_device *dev,
+				   netdev_features_t *features)
 {
-	vlan_features_check(skb, &features);
-	vxlan_features_check(skb, &features);
+	vlan_features_check(skb, features);
+	vxlan_features_check(skb, features);
 
 	/* The ConnectX-3 doesn't support outer IPv6 checksums but it does
 	 * support inner IPv6 checksums and segmentation so  we need to
@@ -2692,10 +2691,8 @@ static netdev_features_t mlx4_en_features_check(struct sk_buff *skb,
 		if (!priv->vxlan_port ||
 		    (ip_hdr(skb)->version != 4) ||
 		    (udp_hdr(skb)->dest != priv->vxlan_port))
-			features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+			*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
 	}
-
-	return features;
 }
 
 static int mlx4_en_set_tx_maxrate(struct net_device *dev, int queue_index, u32 maxrate)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
index f5d147c3141a..daf276c43d8a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
@@ -1129,9 +1129,8 @@ void mlx5e_build_nic_params(struct mlx5e_priv *priv, struct mlx5e_xsk *xsk, u16
 void mlx5e_rx_dim_work(struct work_struct *work);
 void mlx5e_tx_dim_work(struct work_struct *work);
 
-netdev_features_t mlx5e_features_check(struct sk_buff *skb,
-				       struct net_device *netdev,
-				       netdev_features_t features);
+void mlx5e_features_check(struct sk_buff *skb, struct net_device *netdev,
+			  netdev_features_t *features);
 int mlx5e_set_features(struct net_device *netdev, netdev_features_t features);
 #ifdef CONFIG_MLX5_ESWITCH
 int mlx5e_set_vf_mac(struct net_device *dev, int vf, u8 *mac);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 4518a490cdcd..6fdc2a793c1f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3904,21 +3904,18 @@ static netdev_features_t mlx5e_tunnel_features_check(struct mlx5e_priv *priv,
 	return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
 }
 
-netdev_features_t mlx5e_features_check(struct sk_buff *skb,
-				       struct net_device *netdev,
-				       netdev_features_t features)
+void mlx5e_features_check(struct sk_buff *skb, struct net_device *netdev,
+			  netdev_features_t *features)
 {
 	struct mlx5e_priv *priv = netdev_priv(netdev);
 
-	vlan_features_check(skb, &features);
-	vxlan_features_check(skb, &features);
+	vlan_features_check(skb, features);
+	vxlan_features_check(skb, features);
 
 	/* Validate if the tunneled packet is being offloaded by HW */
 	if (skb->encapsulation &&
-	    (features & NETIF_F_CSUM_MASK || features & NETIF_F_GSO_MASK))
-		return mlx5e_tunnel_features_check(priv, skb, features);
-
-	return features;
+	    (*features & NETIF_F_CSUM_MASK || *features & NETIF_F_GSO_MASK))
+		*features = mlx5e_tunnel_features_check(priv, skb, *features);
 }
 
 static void mlx5e_tx_timeout_work(struct work_struct *work)
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
index 58e7d98d0dd6..6261596cfda6 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
@@ -3598,17 +3598,16 @@ static int nfp_net_set_features(struct net_device *netdev,
 	return 0;
 }
 
-static netdev_features_t
-nfp_net_features_check(struct sk_buff *skb, struct net_device *dev,
-		       netdev_features_t features)
+static void nfp_net_features_check(struct sk_buff *skb, struct net_device *dev,
+				   netdev_features_t *features)
 {
 	u8 l4_hdr;
 
 	/* We can't do TSO over double tagged packets (802.1AD) */
-	vlan_features_check(skb, &features);
+	vlan_features_check(skb, features);
 
 	if (!skb->encapsulation)
-		return features;
+		return;
 
 	/* Ensure that inner L4 header offset fits into TX descriptor field */
 	if (skb_is_gso(skb)) {
@@ -3621,7 +3620,7 @@ nfp_net_features_check(struct sk_buff *skb, struct net_device *dev,
 		 * metadata prepend - 8B
 		 */
 		if (unlikely(hdrlen > NFP_NET_LSO_MAX_HDR_SZ - 8))
-			features &= ~NETIF_F_GSO_MASK;
+			*features &= ~NETIF_F_GSO_MASK;
 	}
 
 	/* VXLAN/GRE check */
@@ -3633,7 +3632,8 @@ nfp_net_features_check(struct sk_buff *skb, struct net_device *dev,
 		l4_hdr = ipv6_hdr(skb)->nexthdr;
 		break;
 	default:
-		return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+		*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+		return;
 	}
 
 	if (skb->inner_protocol_type != ENCAP_TYPE_ETHER ||
@@ -3641,10 +3641,10 @@ nfp_net_features_check(struct sk_buff *skb, struct net_device *dev,
 	    (l4_hdr != IPPROTO_UDP && l4_hdr != IPPROTO_GRE) ||
 	    (l4_hdr == IPPROTO_UDP &&
 	     (skb_inner_mac_header(skb) - skb_transport_header(skb) !=
-	      sizeof(struct udphdr) + sizeof(struct vxlanhdr))))
-		return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
-
-	return features;
+	      sizeof(struct udphdr) + sizeof(struct vxlanhdr)))) {
+		*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+		return;
+	}
 }
 
 static int
diff --git a/drivers/net/ethernet/qlogic/qede/qede.h b/drivers/net/ethernet/qlogic/qede/qede.h
index f90dcfe9ee68..c1f26a2e374d 100644
--- a/drivers/net/ethernet/qlogic/qede/qede.h
+++ b/drivers/net/ethernet/qlogic/qede/qede.h
@@ -527,9 +527,8 @@ int qede_xdp_transmit(struct net_device *dev, int n_frames,
 		      struct xdp_frame **frames, u32 flags);
 u16 qede_select_queue(struct net_device *dev, struct sk_buff *skb,
 		      struct net_device *sb_dev);
-netdev_features_t qede_features_check(struct sk_buff *skb,
-				      struct net_device *dev,
-				      netdev_features_t features);
+void qede_features_check(struct sk_buff *skb, struct net_device *dev,
+			 netdev_features_t *features);
 int qede_alloc_rx_buffer(struct qede_rx_queue *rxq, bool allow_lazy);
 int qede_free_tx_pkt(struct qede_dev *edev,
 		     struct qede_tx_queue *txq, int *len);
diff --git a/drivers/net/ethernet/qlogic/qede/qede_fp.c b/drivers/net/ethernet/qlogic/qede/qede_fp.c
index 065e9004598e..8a459d2ca983 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_fp.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_fp.c
@@ -1747,9 +1747,8 @@ u16 qede_select_queue(struct net_device *dev, struct sk_buff *skb,
 /* 8B udp header + 8B base tunnel header + 32B option length */
 #define QEDE_MAX_TUN_HDR_LEN 48
 
-netdev_features_t qede_features_check(struct sk_buff *skb,
-				      struct net_device *dev,
-				      netdev_features_t features)
+void qede_features_check(struct sk_buff *skb, struct net_device *dev,
+			 netdev_features_t *features)
 {
 	if (skb->encapsulation) {
 		u8 l4_proto = 0;
@@ -1762,7 +1761,7 @@ netdev_features_t qede_features_check(struct sk_buff *skb,
 			l4_proto = ipv6_hdr(skb)->nexthdr;
 			break;
 		default:
-			return features;
+			return;
 		}
 
 		/* Disable offloads for geneve tunnels, as HW can't parse
@@ -1780,16 +1779,17 @@ netdev_features_t qede_features_check(struct sk_buff *skb,
 			if ((skb_inner_mac_header(skb) -
 			     skb_transport_header(skb)) > hdrlen ||
 			     (ntohs(udp_hdr(skb)->dest) != vxln_port &&
-			      ntohs(udp_hdr(skb)->dest) != gnv_port))
-				return features & ~(NETIF_F_CSUM_MASK |
-						    NETIF_F_GSO_MASK);
+			      ntohs(udp_hdr(skb)->dest) != gnv_port)) {
+				*features &= ~(NETIF_F_CSUM_MASK |
+					       NETIF_F_GSO_MASK);
+				return;
+			}
 		} else if (l4_proto == IPPROTO_IPIP) {
 			/* IPIP tunnels are unknown to the device or at least unsupported natively,
 			 * offloads for them can't be done trivially, so disable them for such skb.
 			 */
-			return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+			*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+			return;
 		}
 	}
-
-	return features;
 }
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index d823f2a22472..192d74665c20 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -492,13 +492,11 @@ static const struct udp_tunnel_nic_info qlcnic_udp_tunnels = {
 	},
 };
 
-static netdev_features_t qlcnic_features_check(struct sk_buff *skb,
-					       struct net_device *dev,
-					       netdev_features_t features)
+static void qlcnic_features_check(struct sk_buff *skb, struct net_device *dev,
+				  netdev_features_t *features)
 {
-	vlan_features_check(skb, &features);
-	vxlan_features_check(skb, &features);
-	return features;
+	vlan_features_check(skb, features);
+	vxlan_features_check(skb, features);
 }
 
 static const struct net_device_ops qlcnic_netdev_ops = {
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
index d2135fe99cd7..663a12598cad 100644
--- a/drivers/net/ethernet/realtek/8139cp.c
+++ b/drivers/net/ethernet/realtek/8139cp.c
@@ -1853,15 +1853,13 @@ static void cp_set_d3_state (struct cp_private *cp)
 	pci_set_power_state (cp->pdev, PCI_D3hot);
 }
 
-static netdev_features_t cp_features_check(struct sk_buff *skb,
-					   struct net_device *dev,
-					   netdev_features_t features)
+static void cp_features_check(struct sk_buff *skb, struct net_device *dev,
+			      netdev_features_t *features)
 {
 	if (skb_shinfo(skb)->gso_size > MSSMask)
-		features &= ~NETIF_F_TSO;
+		*features &= ~NETIF_F_TSO;
 
-	vlan_features_check(skb, &features);
-	return features;
+	vlan_features_check(skb, features);
 }
 static const struct net_device_ops cp_netdev_ops = {
 	.ndo_open		= cp_open,
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 98e7ffa6aa0a..3d753ddd1a89 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -4347,35 +4347,33 @@ static netdev_features_t rtl8168evl_fix_tso(struct sk_buff *skb,
 	return features;
 }
 
-static netdev_features_t rtl8169_features_check(struct sk_buff *skb,
-						struct net_device *dev,
-						netdev_features_t features)
+static void rtl8169_features_check(struct sk_buff *skb, struct net_device *dev,
+				   netdev_features_t *features)
 {
 	int transport_offset = skb_transport_offset(skb);
 	struct rtl8169_private *tp = netdev_priv(dev);
 
 	if (skb_is_gso(skb)) {
 		if (tp->mac_version == RTL_GIGA_MAC_VER_34)
-			features = rtl8168evl_fix_tso(skb, features);
+			*features = rtl8168evl_fix_tso(skb, *features);
 
 		if (transport_offset > GTTCPHO_MAX &&
 		    rtl_chip_supports_csum_v2(tp))
-			features &= ~NETIF_F_ALL_TSO;
+			*features &= ~NETIF_F_ALL_TSO;
 	} else if (skb->ip_summed == CHECKSUM_PARTIAL) {
 		/* work around hw bug on some chip versions */
 		if (skb->len < ETH_ZLEN)
-			features &= ~NETIF_F_CSUM_MASK;
+			*features &= ~NETIF_F_CSUM_MASK;
 
 		if (rtl_quirk_packet_padto(tp, skb))
-			features &= ~NETIF_F_CSUM_MASK;
+			*features &= ~NETIF_F_CSUM_MASK;
 
 		if (transport_offset > TCPHO_MAX &&
 		    rtl_chip_supports_csum_v2(tp))
-			features &= ~NETIF_F_CSUM_MASK;
+			*features &= ~NETIF_F_CSUM_MASK;
 	}
 
-	vlan_features_check(skb, &features);
-	return features;
+	vlan_features_check(skb, features);
 }
 
 static void rtl8169_pcierr_interrupt(struct net_device *dev)
diff --git a/drivers/net/ethernet/sfc/efx_common.c b/drivers/net/ethernet/sfc/efx_common.c
index 896b59253197..a101fa50a5cc 100644
--- a/drivers/net/ethernet/sfc/efx_common.c
+++ b/drivers/net/ethernet/sfc/efx_common.c
@@ -1353,25 +1353,24 @@ static bool efx_can_encap_offloads(struct efx_nic *efx, struct sk_buff *skb)
 	}
 }
 
-netdev_features_t efx_features_check(struct sk_buff *skb, struct net_device *dev,
-				     netdev_features_t features)
+void efx_features_check(struct sk_buff *skb, struct net_device *dev,
+			netdev_features_t *features)
 {
 	struct efx_nic *efx = netdev_priv(dev);
 
 	if (skb->encapsulation) {
-		if (features & NETIF_F_GSO_MASK)
+		if (*features & NETIF_F_GSO_MASK)
 			/* Hardware can only do TSO with at most 208 bytes
 			 * of headers.
 			 */
 			if (skb_inner_transport_offset(skb) >
 			    EFX_TSO2_MAX_HDRLEN)
-				features &= ~(NETIF_F_GSO_MASK);
-		if (features & (NETIF_F_GSO_MASK | NETIF_F_CSUM_MASK))
+				*features &= ~(NETIF_F_GSO_MASK);
+		if (*features & (NETIF_F_GSO_MASK | NETIF_F_CSUM_MASK))
 			if (!efx_can_encap_offloads(efx, skb))
-				features &= ~(NETIF_F_GSO_MASK |
+				*features &= ~(NETIF_F_GSO_MASK |
 					      NETIF_F_CSUM_MASK);
 	}
-	return features;
 }
 
 int efx_get_phys_port_id(struct net_device *net_dev,
diff --git a/drivers/net/ethernet/sfc/efx_common.h b/drivers/net/ethernet/sfc/efx_common.h
index 65513fd0cf6c..c4fea3997704 100644
--- a/drivers/net/ethernet/sfc/efx_common.h
+++ b/drivers/net/ethernet/sfc/efx_common.h
@@ -105,8 +105,8 @@ int efx_change_mtu(struct net_device *net_dev, int new_mtu);
 
 extern const struct pci_error_handlers efx_err_handlers;
 
-netdev_features_t efx_features_check(struct sk_buff *skb, struct net_device *dev,
-				     netdev_features_t features);
+void efx_features_check(struct sk_buff *skb, struct net_device *dev,
+			netdev_features_t *features);
 
 int efx_get_phys_port_id(struct net_device *net_dev,
 			 struct netdev_phys_item_id *ppid);
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 9bfee75cbaf1..7a60cc0f6aad 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -3976,17 +3976,15 @@ static void lan78xx_tx_timeout(struct net_device *net, unsigned int txqueue)
 	tasklet_schedule(&dev->bh);
 }
 
-static netdev_features_t lan78xx_features_check(struct sk_buff *skb,
-						struct net_device *netdev,
-						netdev_features_t features)
+static void lan78xx_features_check(struct sk_buff *skb,
+				   struct net_device *netdev,
+				   netdev_features_t *features)
 {
 	if (skb->len + TX_OVERHEAD > MAX_SINGLE_PACKET_SIZE)
-		features &= ~NETIF_F_GSO_MASK;
+		*features &= ~NETIF_F_GSO_MASK;
 
-	vlan_features_check(skb, &features);
-	vxlan_features_check(skb, &features);
-
-	return features;
+	vlan_features_check(skb, features);
+	vxlan_features_check(skb, features);
 }
 
 static const struct net_device_ops lan78xx_netdev_ops = {
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 60ba9b734055..5bb327b8d8e0 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -2741,20 +2741,17 @@ static void _rtl8152_set_rx_mode(struct net_device *netdev)
 	netif_wake_queue(netdev);
 }
 
-static netdev_features_t
-rtl8152_features_check(struct sk_buff *skb, struct net_device *dev,
-		       netdev_features_t features)
+static void rtl8152_features_check(struct sk_buff *skb, struct net_device *dev,
+				   netdev_features_t *features)
 {
 	u32 mss = skb_shinfo(skb)->gso_size;
 	int max_offset = mss ? GTTCPHO_MAX : TCPHO_MAX;
 	int offset = skb_transport_offset(skb);
 
 	if ((mss || skb->ip_summed == CHECKSUM_PARTIAL) && offset > max_offset)
-		features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+		*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
 	else if ((skb->len + sizeof(struct tx_desc)) > agg_buf_sz)
-		features &= ~NETIF_F_GSO_MASK;
-
-	return features;
+		*features &= ~NETIF_F_GSO_MASK;
 }
 
 static netdev_tx_t rtl8152_start_xmit(struct sk_buff *skb,
diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c
index 5dd8360b21a0..e840547cd19e 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethtool.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c
@@ -256,9 +256,8 @@ netdev_features_t vmxnet3_fix_features(struct net_device *netdev,
 	return features;
 }
 
-netdev_features_t vmxnet3_features_check(struct sk_buff *skb,
-					 struct net_device *netdev,
-					 netdev_features_t features)
+void vmxnet3_features_check(struct sk_buff *skb, struct net_device *netdev,
+			    netdev_features_t *features)
 {
 	struct vmxnet3_adapter *adapter = netdev_priv(netdev);
 
@@ -277,7 +276,8 @@ netdev_features_t vmxnet3_features_check(struct sk_buff *skb,
 			l4_proto = ipv6_hdr(skb)->nexthdr;
 			break;
 		default:
-			return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+			*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+			return;
 		}
 
 		switch (l4_proto) {
@@ -288,14 +288,15 @@ netdev_features_t vmxnet3_features_check(struct sk_buff *skb,
 			if (port != GENEVE_UDP_PORT &&
 			    port != IANA_VXLAN_UDP_PORT &&
 			    port != VXLAN_UDP_PORT) {
-				return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+				*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+				return;
 			}
 			break;
 		default:
-			return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+			*features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+			return;
 		}
 	}
-	return features;
 }
 
 static void vmxnet3_enable_encap_offloads(struct net_device *netdev)
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h
index 7027ff483fa5..a711759ebb00 100644
--- a/drivers/net/vmxnet3/vmxnet3_int.h
+++ b/drivers/net/vmxnet3/vmxnet3_int.h
@@ -478,9 +478,9 @@ vmxnet3_rq_destroy_all(struct vmxnet3_adapter *adapter);
 netdev_features_t
 vmxnet3_fix_features(struct net_device *netdev, netdev_features_t features);
 
-netdev_features_t
+void
 vmxnet3_features_check(struct sk_buff *skb,
-		       struct net_device *netdev, netdev_features_t features);
+		       struct net_device *netdev, netdev_features_t *features);
 
 int
 vmxnet3_set_features(struct net_device *netdev, netdev_features_t features);
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index a5aa0bdc61d6..58bd0dc43695 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -1094,9 +1094,8 @@ int qeth_setassparms_cb(struct qeth_card *, struct qeth_reply *, unsigned long);
 int qeth_set_features(struct net_device *, netdev_features_t);
 void qeth_enable_hw_features(struct net_device *dev);
 netdev_features_t qeth_fix_features(struct net_device *, netdev_features_t);
-netdev_features_t qeth_features_check(struct sk_buff *skb,
-				      struct net_device *dev,
-				      netdev_features_t features);
+void qeth_features_check(struct sk_buff *skb, struct net_device *dev,
+			 netdev_features_t *features);
 void qeth_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats);
 int qeth_set_real_num_tx_queues(struct qeth_card *card, unsigned int count);
 u16 qeth_iqd_select_queue(struct net_device *dev, struct sk_buff *skb,
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 3b1903f8790a..46b5ad0171fa 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -6946,9 +6946,8 @@ netdev_features_t qeth_fix_features(struct net_device *dev,
 }
 EXPORT_SYMBOL_GPL(qeth_fix_features);
 
-netdev_features_t qeth_features_check(struct sk_buff *skb,
-				      struct net_device *dev,
-				      netdev_features_t features)
+void qeth_features_check(struct sk_buff *skb, struct net_device *dev,
+			 netdev_features_t *features)
 {
 	struct qeth_card *card = dev->ml_priv;
 
@@ -6957,7 +6956,7 @@ netdev_features_t qeth_features_check(struct sk_buff *skb,
 	    READ_ONCE(card->options.isolation) != ISOLATION_MODE_FWD) {
 		netdev_features_t restricted = 0;
 
-		if (skb_is_gso(skb) && !netif_needs_gso(skb, features))
+		if (skb_is_gso(skb) && !netif_needs_gso(skb, *features))
 			restricted |= NETIF_F_ALL_TSO;
 
 		switch (vlan_get_protocol(skb)) {
@@ -6966,14 +6965,14 @@ netdev_features_t qeth_features_check(struct sk_buff *skb,
 				restricted |= NETIF_F_IP_CSUM;
 
 			if (restricted && qeth_next_hop_is_local_v4(card, skb))
-				features &= ~restricted;
+				*features &= ~restricted;
 			break;
 		case htons(ETH_P_IPV6):
 			if (!card->info.has_lp2lp_cso_v6)
 				restricted |= NETIF_F_IPV6_CSUM;
 
 			if (restricted && qeth_next_hop_is_local_v6(card, skb))
-				features &= ~restricted;
+				*features &= ~restricted;
 			break;
 		default:
 			break;
@@ -6987,7 +6986,7 @@ netdev_features_t qeth_features_check(struct sk_buff *skb,
 	 * additional buffer element. This reduces buffer utilization, and
 	 * hurts throughput. So compress small segments into one element.
 	 */
-	if (netif_needs_gso(skb, features)) {
+	if (netif_needs_gso(skb, *features)) {
 		/* match skb_segment(): */
 		unsigned int doffset = skb->data - skb_mac_header(skb);
 		unsigned int hsize = skb_shinfo(skb)->gso_size;
@@ -6995,11 +6994,10 @@ netdev_features_t qeth_features_check(struct sk_buff *skb,
 
 		/* linearize only if resulting skb allocations are order-0: */
 		if (SKB_DATA_ALIGN(hroom + doffset + hsize) <= SKB_MAX_HEAD(0))
-			features &= ~NETIF_F_SG;
+			*features &= ~NETIF_F_SG;
 	}
 
-	vlan_features_check(skb, &features);
-	return features;
+	vlan_features_check(skb, features);
 }
 EXPORT_SYMBOL_GPL(qeth_features_check);
 
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 6fd3e288f059..1d3d0377fe4b 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -1804,13 +1804,13 @@ qeth_l3_neigh_setup(struct net_device *dev, struct neigh_parms *np)
 	return 0;
 }
 
-static netdev_features_t qeth_l3_osa_features_check(struct sk_buff *skb,
-						    struct net_device *dev,
-						    netdev_features_t features)
+static void qeth_l3_osa_features_check(struct sk_buff *skb,
+				       struct net_device *dev,
+				       netdev_features_t *features)
 {
 	if (vlan_get_protocol(skb) != htons(ETH_P_IP))
-		features &= ~NETIF_F_HW_VLAN_CTAG_TX;
-	return qeth_features_check(skb, dev, features);
+		*features &= ~NETIF_F_HW_VLAN_CTAG_TX;
+	qeth_features_check(skb, dev, features);
 }
 
 static u16 qeth_l3_iqd_select_queue(struct net_device *dev, struct sk_buff *skb,
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index a5598d617789..09233e7df8f1 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1352,9 +1352,9 @@ struct net_device_ops {
 	int			(*ndo_stop)(struct net_device *dev);
 	netdev_tx_t		(*ndo_start_xmit)(struct sk_buff *skb,
 						  struct net_device *dev);
-	netdev_features_t	(*ndo_features_check)(struct sk_buff *skb,
+	void			(*ndo_features_check)(struct sk_buff *skb,
 						      struct net_device *dev,
-						      netdev_features_t features);
+						      netdev_features_t *features);
 	u16			(*ndo_select_queue)(struct net_device *dev,
 						    struct sk_buff *skb,
 						    struct net_device *sb_dev);
@@ -5056,9 +5056,8 @@ void netdev_change_features(struct net_device *dev);
 void netif_stacked_transfer_operstate(const struct net_device *rootdev,
 					struct net_device *dev);
 
-netdev_features_t passthru_features_check(struct sk_buff *skb,
-					  struct net_device *dev,
-					  netdev_features_t features);
+void passthru_features_check(struct sk_buff *skb, struct net_device *dev,
+			     netdev_features_t *features);
 netdev_features_t netif_skb_features(struct sk_buff *skb);
 
 static inline bool net_gso_ok(netdev_features_t features, int gso_type)
diff --git a/net/core/dev.c b/net/core/dev.c
index 814e6e7ee579..43b81dc6b815 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3472,11 +3472,9 @@ static void harmonize_features(struct sk_buff *skb, netdev_features_t *features)
 		*features &= ~NETIF_F_SG;
 }
 
-netdev_features_t passthru_features_check(struct sk_buff *skb,
-					  struct net_device *dev,
-					  netdev_features_t features)
+void passthru_features_check(struct sk_buff *skb, struct net_device *dev,
+			     netdev_features_t *features)
 {
-	return features;
 }
 EXPORT_SYMBOL(passthru_features_check);
 
@@ -3547,8 +3545,7 @@ netdev_features_t netif_skb_features(struct sk_buff *skb)
 					  NETIF_F_HW_VLAN_STAG_TX);
 
 	if (dev->netdev_ops->ndo_features_check)
-		features &= dev->netdev_ops->ndo_features_check(skb, dev,
-								features);
+		dev->netdev_ops->ndo_features_check(skb, dev, &features);
 	else
 		dflt_features_check(skb, dev, &features);
 
-- 
2.33.0


  parent reply	other threads:[~2021-09-29 15:58 UTC|newest]

Thread overview: 181+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 15:50 [RFCv2 net-next 000/167] net: extend the netdev_features_t Jian Shen
2021-09-29 15:50 ` [RFCv2 net-next 001/167] net: convert the prototype of netdev_intersect_features Jian Shen
2021-09-29 15:50 ` [RFCv2 net-next 002/167] net: convert the prototype of netdev_get_wanted_features Jian Shen
2021-09-29 15:50 ` [RFCv2 net-next 003/167] net: convert the prototype of net_mpls_features Jian Shen
2021-09-29 15:50 ` [RFCv2 net-next 004/167] net: convert the prototype of harmonize_features Jian Shen
2021-09-29 15:50 ` [RFCv2 net-next 005/167] net: convert the prototype of gso_features_check Jian Shen
2021-09-29 15:50 ` [RFCv2 net-next 006/167] net: convert the prototype of vlan_features_check Jian Shen
2021-09-29 15:50 ` [RFCv2 net-next 007/167] net: convert the prototype of vxlan_features_check Jian Shen
2021-09-29 15:50 ` [RFCv2 net-next 008/167] net: convert the prototype of dflt_features_check Jian Shen
2021-09-29 15:50 ` Jian Shen [this message]
2021-09-29 15:50 ` [RFCv2 net-next 010/167] net: convert the prototype of netif_skb_features Jian Shen
2021-09-29 15:50 ` [RFCv2 net-next 011/167] net: convert the prototype of ndo_fix_features Jian Shen
2021-09-29 15:50 ` [RFCv2 net-next 012/167] net: convert the prototype of netdev_fix_features Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 013/167] net: convert the prototype of netdev_sync_upper_features Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 014/167] net: convert the prototype of br_features_recompute Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 015/167] net: convert the prototype of netdev_add_tso_features Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 016/167] net: convert the prototype of netdev_increment_features Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 017/167] net: convert the prototype of hsr_features_recompute Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 018/167] net: mlx5: convert prototype of mlx5e_ipsec_feature_check, mlx5e_tunnel_features_check and mlx5e_fix_uplink_rep_features Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 019/167] net: sfc: convert the prototype of xxx_supported_features Jian Shen
2021-09-30  0:28   ` Edward Cree
2021-09-29 15:51 ` [RFCv2 net-next 020/167] net: qlogic: convert the prototype of qlcnic_process_flags Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 021/167] net: realtek: convert the prototype of rtl8168evl_fix_tso Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 022/167] ethtool: convert the prototype of ethtool_get_feature_mask Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 023/167] net: add netdev feature helpers Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 024/167] net: core: use " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 025/167] skbuff: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 026/167] net: vlan: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 027/167] bridge: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 028/167] ipvlan: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 029/167] veth: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 030/167] bonding: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 031/167] net: tun: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 032/167] net: tap: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 033/167] net: geneve: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 034/167] hv_netvsc: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 035/167] macvlan: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 036/167] macsec: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 037/167] net: tls: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 038/167] s390: qeth: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 039/167] dsa: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 040/167] macvtap: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 041/167] team: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 042/167] vmxnet3: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 043/167] net_failover: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 044/167] pktgen: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 045/167] net: sched: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 046/167] netdevsim: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 047/167] virtio_net: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 048/167] net: ipv4: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 049/167] net: ipv6: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 050/167] net: hsr: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 051/167] net: mpls: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 052/167] net: nsh: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 053/167] net: decnet: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 054/167] net: dccp: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 055/167] net: l2tp: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 056/167] net: ntb_netdev: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 057/167] net: thunderbolt: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 058/167] net: phonet: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 059/167] net: vrf: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 060/167] net: sctp: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 061/167] vxlan: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 062/167] xen-netback: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 063/167] xen-netfront: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 064/167] sock: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 065/167] sunrpc: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 066/167] net: caif: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 067/167] net: loopback: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 068/167] net: dummy: use netdev_feature helpers Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 069/167] net: mac80211: use netdev feature helpers Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 070/167] net: ifb: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 071/167] net: bareudp: " Jian Shen
2021-09-29 15:51 ` [RFCv2 net-next 072/167] net: rionet: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 073/167] net: gtp: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 074/167] net: vsockmon: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 075/167] net: nlmon: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 076/167] net: wireguard: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 077/167] net: can: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 078/167] net: ppp: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 079/167] net: ipa: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 080/167] net: fjes: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 081/167] net: usb: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 082/167] net: wireless: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 083/167] net: realtek: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 084/167] net: broadcom: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 085/167] net: intel: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 086/167] net: hisilicon: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 087/167] net: mellanox: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 088/167] net: atlantic: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 089/167] net: atheros: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 090/167] net: chelsio: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 091/167] net: davicom: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 092/167] net: freescale: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 093/167] net: synopsys: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 094/167] net: sfc: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 095/167] net: qualcomm: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 096/167] net: nvidia: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 097/167] net: faraday: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 098/167] net: google: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 099/167] net: hinic: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 100/167] net: ibm: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 101/167] net: ionic: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 102/167] net: jme: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 103/167] net: micrel: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 104/167] net: cavium: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 105/167] net: cadence: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 106/167] net: mediatek: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 107/167] net: marvell: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 108/167] net: socionext: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 109/167] net: qlogic: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 110/167] net: nfp: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 111/167] net: mscc: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 112/167] net: oki-semi: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 113/167] net: renesas: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 114/167] net: neterion: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 115/167] net: cortina: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 116/167] net: stmmac: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 117/167] net: sxgbe: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 118/167] net: xgmac: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 119/167] net: altera: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 120/167] net: ti: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 121/167] net: benet: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 122/167] net: amd: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 123/167] net: bna: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 124/167] net: enic: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 125/167] net: 3com: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 126/167] net: aeroflex: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 127/167] net: sun: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 128/167] net: mana: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 129/167] net: myricom: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 130/167] net: alacritech: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 131/167] net: toshiba: " Jian Shen
2021-09-29 15:52 ` [RFCv2 net-next 132/167] net: tehuti: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 133/167] net: alteon: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 134/167] net: ena: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 135/167] net: sgi: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 136/167] net: microchip: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 137/167] net: ni: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 138/167] net: apm: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 139/167] net: natsemi: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 140/167] net: xilinx: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 141/167] net: pasemi: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 142/167] net: rocker: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 143/167] net: silan: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 144/167] net: adaptec: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 145/167] net: tundra: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 146/167] net: via: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 147/167] net: wiznet: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 148/167] net: dnet: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 149/167] net: ethoc: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 150/167] RDMA: ipoib: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 151/167] um: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 152/167] scsi: fcoe: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 153/167] net: ipvs: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 154/167] net: xfrm: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 155/167] net: cirrus: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 156/167] net: ec_bhf: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 157/167] net: hamradio: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 158/167] net: batman: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 159/167] net: ieee802154: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 160/167] test_bpf: change the prototype of features Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 161/167] net: openvswitch: use netdev feature helpers Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 162/167] firewire: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 163/167] staging: qlge: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 164/167] staging: octeon: " Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 165/167] net: sock: add helper sk_nocaps_add_gso() Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 166/167] treewide: introduce macro __DECLARE_NETDEV_FEATURE_MASK Jian Shen
2021-09-29 15:53 ` [RFCv2 net-next 167/167] net: extend the type of netdev_features_t to bitmap Jian Shen
2021-09-29 17:15 ` [RFCv2 net-next 000/167] net: extend the netdev_features_t Andrew Lunn
2021-09-30  2:57   ` shenjian (K)
2021-09-30  0:55 ` Edward Cree
2021-09-30  3:15   ` shenjian (K)
2021-10-01 15:17 ` Alexander Lobakin
2021-10-04 14:59   ` Andrew Lunn
2021-10-04 22:30     ` Saeed Mahameed
2021-10-05 14:22       ` Alexander Lobakin
2021-10-08  2:54       ` shenjian (K)
2022-01-27  9:16 ` Leon Romanovsky
2022-01-27  9:40   ` shenjian (K)
2022-01-27  9:50     ` Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210929155334.12454-10-shenjian15@huawei.com \
    --to=shenjian15@huawei.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linuxarm@openeuler.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.