For the origin type for netdev_features_t would be changed to be unsigned long * from u64, so changes the prototype of gso_features_check for adaption.
Signed-off-by: Jian Shen shenjian15@huawei.com --- net/core/dev.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c index 9dd7421..4e553d4 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3485,18 +3485,21 @@ static netdev_features_t dflt_features_check(struct sk_buff *skb, return vlan_features_check(skb, features); }
-static netdev_features_t gso_features_check(const struct sk_buff *skb, - struct net_device *dev, - netdev_features_t features) +static void gso_features_check(const struct sk_buff *skb, + struct net_device *dev, + netdev_features_t *features) { u16 gso_segs = skb_shinfo(skb)->gso_segs;
- if (gso_segs > dev->gso_max_segs) - return features & ~NETIF_F_GSO_MASK; + if (gso_segs > dev->gso_max_segs) { + *features &= ~NETIF_F_GSO_MASK; + return; + }
if (!skb_shinfo(skb)->gso_type) { skb_warn_bad_offload(skb); - return features & ~NETIF_F_GSO_MASK; + *features &= ~NETIF_F_GSO_MASK; + return; }
/* Support for GSO partial features requires software @@ -3506,7 +3509,7 @@ static netdev_features_t gso_features_check(const struct sk_buff *skb, * segmented the frame. */ if (!(skb_shinfo(skb)->gso_type & SKB_GSO_PARTIAL)) - features &= ~dev->gso_partial_features; + *features &= ~dev->gso_partial_features;
/* Make sure to clear the IPv4 ID mangling feature if the * IPv4 header has the potential to be fragmented. @@ -3516,10 +3519,8 @@ static netdev_features_t gso_features_check(const struct sk_buff *skb, inner_ip_hdr(skb) : ip_hdr(skb);
if (!(iph->frag_off & htons(IP_DF))) - features &= ~NETIF_F_TSO_MANGLEID; + *features &= ~NETIF_F_TSO_MANGLEID; } - - return features; }
netdev_features_t netif_skb_features(struct sk_buff *skb) @@ -3528,7 +3529,7 @@ netdev_features_t netif_skb_features(struct sk_buff *skb) netdev_features_t features = dev->features;
if (skb_is_gso(skb)) - features = gso_features_check(skb, dev, features); + gso_features_check(skb, dev, &features);
/* If encapsulation offload request, verify we are testing * hardware encapsulation features instead of standard