@@ -4035,11 +4035,11 @@ skb_header_pointer(const struct sk_buff *skb, int offset, int len, void *buffer)
* 2. skb is fragmented and the device does not support SG.
*/
static inline bool skb_needs_linearize(struct sk_buff *skb,
- netdev_features_t features)
+ const netdev_features_t *features)
{
return skb_is_nonlinear(skb) &&
- ((skb_has_frag_list(skb) && !(features & NETIF_F_FRAGLIST)) ||
- (skb_shinfo(skb)->nr_frags && !(features & NETIF_F_SG)));
+ ((skb_has_frag_list(skb) && !(*features & NETIF_F_FRAGLIST)) ||
+ (skb_shinfo(skb)->nr_frags && !(*features & NETIF_F_SG)));
}
static inline void skb_copy_from_linear_data(const struct sk_buff *skb,
@@ -3676,7 +3676,7 @@ static struct sk_buff *validate_xmit_skb(struct sk_buff *skb, struct net_device
skb = segs;
}
} else {
- if (skb_needs_linearize(skb, features) &&
+ if (skb_needs_linearize(skb, &features) &&
__skb_linearize(skb))
goto out_kfree_skb;
@@ -3973,7 +3973,7 @@ struct sk_buff *skb_segment_list(struct sk_buff *skb,
nskb->data - tnl_hlen,
offset + tnl_hlen);
- if (skb_needs_linearize(nskb, *features) &&
+ if (skb_needs_linearize(nskb, features) &&
__skb_linearize(nskb))
goto err_linearize;
@@ -3987,7 +3987,7 @@ struct sk_buff *skb_segment_list(struct sk_buff *skb,
skb->prev = tail;
- if (skb_needs_linearize(skb, *features) &&
+ if (skb_needs_linearize(skb, features) &&
__skb_linearize(skb))
goto err_linearize;
The function skb_needs_linearize() using netdev_features_t as parameters. For the prototype of netdev_features_t will be extended to be larger than 8 bytes, so change the prototype of the function, change the prototype of input features to 'netdev_features_t *'. Signed-off-by: Jian Shen <shenjian15@huawei.com> --- include/linux/skbuff.h | 6 +++--- net/core/dev.c | 2 +- net/core/skbuff.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)