@@ -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;
}
@@ -12857,7 +12857,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)
@@ -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):
@@ -2679,7 +2679,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
@@ -3911,7 +3911,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 &&
@@ -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 = {
@@ -3984,7 +3984,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;
}
@@ -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 */
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(-)