For the origin type for netdev_features_t would be changed to be unsigned long * from u64, so changes the prototype of vlan_features_check for adaption.
Signed-off-by: Jian Shen shenjian15@huawei.com --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 2 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/emulex/benet/be_main.c | 2 +- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 2 +- drivers/net/ethernet/realtek/8139cp.c | 3 ++- drivers/net/ethernet/realtek/r8169_main.c | 3 ++- drivers/net/usb/lan78xx.c | 2 +- drivers/s390/net/qeth_core_main.c | 3 ++- include/linux/if_vlan.h | 12 +++++------- net/core/dev.c | 3 ++- 14 files changed, 22 insertions(+), 20 deletions(-)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c index 17a585a..3fb15f6 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c @@ -2271,7 +2271,7 @@ static netdev_features_t xgbe_features_check(struct sk_buff *skb, struct net_device *netdev, netdev_features_t features) { - features = vlan_features_check(skb, features); + vlan_features_check(skb, &features); features = vxlan_features_check(skb, features);
return features; diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 6d98134..5f67a9a 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -12907,7 +12907,7 @@ static netdev_features_t bnx2x_features_check(struct sk_buff *skb, !skb_gso_validate_mac_len(skb, 9700))) features &= ~NETIF_F_GSO_MASK;
- features = vlan_features_check(skb, features); + vlan_features_check(skb, &features); return vxlan_features_check(skb, features); }
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 865fcb8..af6bddf 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -11114,7 +11114,7 @@ static netdev_features_t bnxt_features_check(struct sk_buff *skb, struct bnxt *bp = netdev_priv(dev); u8 *l4_proto;
- features = vlan_features_check(skb, features); + vlan_features_check(skb, &features); switch (vlan_get_protocol(skb)) { case htons(ETH_P_IP): if (!skb->encapsulation) diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 361c1c8..556242d 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -5092,7 +5092,7 @@ static netdev_features_t be_features_check(struct sk_buff *skb, * Q-in-Q packets. * Offload features for normal (non tunnel) packets are unchanged. */ - features = vlan_features_check(skb, features); + vlan_features_check(skb, &features); if (!skb->encapsulation || !(adapter->flags & BE_FLAGS_VXLAN_OFFLOADS)) return features; diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index a2f61a8..c51bd5d 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c @@ -2664,7 +2664,7 @@ static netdev_features_t mlx4_en_features_check(struct sk_buff *skb, struct net_device *dev, netdev_features_t features) { - features = vlan_features_check(skb, features); + vlan_features_check(skb, &features); features = vxlan_features_check(skb, features);
/* The ConnectX-3 doesn't support outer IPv6 checksums but it does diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index ccc569c..6c0fc8d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -3820,7 +3820,7 @@ netdev_features_t mlx5e_features_check(struct sk_buff *skb, { struct mlx5e_priv *priv = netdev_priv(netdev);
- features = vlan_features_check(skb, features); + vlan_features_check(skb, &features); features = vxlan_features_check(skb, features);
/* Validate if the tunneled packet is being offloaded by HW */ diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c index 5bfa22a..58e7d98 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c @@ -3605,7 +3605,7 @@ nfp_net_features_check(struct sk_buff *skb, struct net_device *dev, u8 l4_hdr;
/* We can't do TSO over double tagged packets (802.1AD) */ - features &= vlan_features_check(skb, features); + vlan_features_check(skb, &features);
if (!skb->encapsulation) return features; diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index a4fa5079..4b13db3 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -496,7 +496,7 @@ static netdev_features_t qlcnic_features_check(struct sk_buff *skb, struct net_device *dev, netdev_features_t features) { - features = vlan_features_check(skb, features); + vlan_features_check(skb, &features); return vxlan_features_check(skb, features); }
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c index edc6190..276a158 100644 --- a/drivers/net/ethernet/realtek/8139cp.c +++ b/drivers/net/ethernet/realtek/8139cp.c @@ -1860,7 +1860,8 @@ static netdev_features_t cp_features_check(struct sk_buff *skb, if (skb_shinfo(skb)->gso_size > MSSMask) features &= ~NETIF_F_TSO;
- return vlan_features_check(skb, features); + vlan_features_check(skb, &features); + return 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 fa2dab6..d48e589 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -4379,7 +4379,8 @@ static netdev_features_t rtl8169_features_check(struct sk_buff *skb, features &= ~NETIF_F_CSUM_MASK; }
- return vlan_features_check(skb, features); + vlan_features_check(skb, &features); + return features; }
static void rtl8169_pcierr_interrupt(struct net_device *dev) diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index 4e8d3c2..e536d96 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -3595,7 +3595,7 @@ static netdev_features_t lan78xx_features_check(struct sk_buff *skb, if (skb->len + TX_OVERHEAD > MAX_SINGLE_PACKET_SIZE) features &= ~NETIF_F_GSO_MASK;
- features = vlan_features_check(skb, features); + vlan_features_check(skb, &features); features = vxlan_features_check(skb, features);
return features; diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 5b973f3..1a7bb6f 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -7006,7 +7006,8 @@ netdev_features_t qeth_features_check(struct sk_buff *skb, features &= ~NETIF_F_SG; }
- return vlan_features_check(skb, features); + vlan_features_check(skb, &features); + return features; } EXPORT_SYMBOL_GPL(qeth_features_check);
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 41a5183..2337538 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h @@ -727,8 +727,8 @@ static inline bool skb_vlan_tagged_multi(struct sk_buff *skb) * * Returns features without unsafe ones if the skb has multiple tags. */ -static inline netdev_features_t vlan_features_check(struct sk_buff *skb, - netdev_features_t features) +static inline void vlan_features_check(struct sk_buff *skb, + netdev_features_t *features) { if (skb_vlan_tagged_multi(skb)) { /* In the case of multi-tagged packets, use a direct mask @@ -736,12 +736,10 @@ static inline netdev_features_t vlan_features_check(struct sk_buff *skb, * sure that only devices supporting NETIF_F_HW_CSUM will * have checksum offloading support. */ - features &= NETIF_F_SG | NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | - NETIF_F_FRAGLIST | NETIF_F_HW_VLAN_CTAG_TX | - NETIF_F_HW_VLAN_STAG_TX; + *features &= NETIF_F_SG | NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | + NETIF_F_FRAGLIST | NETIF_F_HW_VLAN_CTAG_TX | + NETIF_F_HW_VLAN_STAG_TX; } - - return features; }
/** diff --git a/net/core/dev.c b/net/core/dev.c index 4e553d4..78466c8 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3482,7 +3482,8 @@ static netdev_features_t dflt_features_check(struct sk_buff *skb, struct net_device *dev, netdev_features_t features) { - return vlan_features_check(skb, features); + vlan_features_check(skb, &features); + return features; }
static void gso_features_check(const struct sk_buff *skb,