For the origin type for netdev_features_t would be changed to be unsigned long * from u64, so changes the prototype of vxlan_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 | 3 ++- drivers/net/ethernet/cisco/enic/enic_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/qlogic/qlcnic/qlcnic_main.c | 3 ++- drivers/net/usb/lan78xx.c | 2 +- include/net/vxlan.h | 13 ++++++------- 8 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c index 3fb15f6..29bca9fa 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c @@ -2272,7 +2272,7 @@ static netdev_features_t xgbe_features_check(struct sk_buff *skb, netdev_features_t features) { vlan_features_check(skb, &features); - features = vxlan_features_check(skb, 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 5f67a9a..fad43c3 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -12908,7 +12908,8 @@ static netdev_features_t bnx2x_features_check(struct sk_buff *skb, features &= ~NETIF_F_GSO_MASK;
vlan_features_check(skb, &features); - return vxlan_features_check(skb, features); + vxlan_features_check(skb, &features); + return features; }
static int __bnx2x_vlan_configure_vid(struct bnx2x *bp, u16 vid, bool add) diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c index d0a8f71..033b9de 100644 --- a/drivers/net/ethernet/cisco/enic/enic_main.c +++ b/drivers/net/ethernet/cisco/enic/enic_main.c @@ -253,7 +253,7 @@ static netdev_features_t enic_features_check(struct sk_buff *skb, if (!skb->encapsulation) return features;
- features = vxlan_features_check(skb, features); + vxlan_features_check(skb, &features);
switch (vlan_get_protocol(skb)) { case htons(ETH_P_IPV6): diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index c51bd5d..941d2d45 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c @@ -2665,7 +2665,7 @@ static netdev_features_t mlx4_en_features_check(struct sk_buff *skb, netdev_features_t features) { vlan_features_check(skb, &features); - features = vxlan_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 diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 6c0fc8d..3deb65b 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -3821,7 +3821,7 @@ netdev_features_t mlx5e_features_check(struct sk_buff *skb, struct mlx5e_priv *priv = netdev_priv(netdev);
vlan_features_check(skb, &features); - features = vxlan_features_check(skb, features); + vxlan_features_check(skb, &features);
/* Validate if the tunneled packet is being offloaded by HW */ if (skb->encapsulation && diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index 4b13db3..93a94a0 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -497,7 +497,8 @@ static netdev_features_t qlcnic_features_check(struct sk_buff *skb, netdev_features_t features) { vlan_features_check(skb, &features); - return vxlan_features_check(skb, features); + vxlan_features_check(skb, &features); + return features; }
static const struct net_device_ops qlcnic_netdev_ops = { diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index e536d96..d9e4dde 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -3596,7 +3596,7 @@ static netdev_features_t lan78xx_features_check(struct sk_buff *skb, features &= ~NETIF_F_GSO_MASK;
vlan_features_check(skb, &features); - features = vxlan_features_check(skb, features); + vxlan_features_check(skb, &features);
return features; } diff --git a/include/net/vxlan.h b/include/net/vxlan.h index 08537aa..a801e59 100644 --- a/include/net/vxlan.h +++ b/include/net/vxlan.h @@ -296,13 +296,13 @@ struct vxlan_dev { struct net_device *vxlan_dev_create(struct net *net, const char *name, u8 name_assign_type, struct vxlan_config *conf);
-static inline netdev_features_t vxlan_features_check(struct sk_buff *skb, - netdev_features_t features) +static inline void vxlan_features_check(struct sk_buff *skb, + netdev_features_t *features) { u8 l4_hdr = 0;
if (!skb->encapsulation) - return features; + return;
switch (vlan_get_protocol(skb)) { case htons(ETH_P_IP): @@ -312,7 +312,7 @@ static inline netdev_features_t vxlan_features_check(struct sk_buff *skb, l4_hdr = ipv6_hdr(skb)->nexthdr; break; default: - return features; + return; }
if ((l4_hdr == IPPROTO_UDP) && @@ -321,10 +321,9 @@ static inline netdev_features_t vxlan_features_check(struct sk_buff *skb, (skb_inner_mac_header(skb) - skb_transport_header(skb) != sizeof(struct udphdr) + sizeof(struct vxlanhdr)) || (skb->ip_summed != CHECKSUM_NONE && - !can_checksum_protocol(features, inner_eth_hdr(skb)->h_proto)))) - return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK); + !can_checksum_protocol(*features, inner_eth_hdr(skb)->h_proto)))) + *features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
- return features; }
/* IP header + UDP + VXLAN + Ethernet header */