Loading include/net/sock.h +1 −13 Original line number Diff line number Diff line Loading @@ -1075,19 +1075,7 @@ static inline int sk_can_gso(const struct sock *sk) return net_gso_ok(sk->sk_route_caps, sk->sk_gso_type); } static inline void sk_setup_caps(struct sock *sk, struct dst_entry *dst) { __sk_dst_set(sk, dst); sk->sk_route_caps = dst->dev->features; if (sk->sk_route_caps & NETIF_F_GSO) sk->sk_route_caps |= NETIF_F_GSO_MASK; if (sk_can_gso(sk)) { if (dst->header_len) sk->sk_route_caps &= ~NETIF_F_GSO_MASK; else sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM; } } extern void sk_setup_caps(struct sock *sk, struct dst_entry *dst); static inline void sk_charge_skb(struct sock *sk, struct sk_buff *skb) { Loading net/core/sock.c +15 −0 Original line number Diff line number Diff line Loading @@ -979,6 +979,21 @@ struct sock *sk_clone(const struct sock *sk, const gfp_t priority) EXPORT_SYMBOL_GPL(sk_clone); void sk_setup_caps(struct sock *sk, struct dst_entry *dst) { __sk_dst_set(sk, dst); sk->sk_route_caps = dst->dev->features; if (sk->sk_route_caps & NETIF_F_GSO) sk->sk_route_caps |= NETIF_F_GSO_MASK; if (sk_can_gso(sk)) { if (dst->header_len) sk->sk_route_caps &= ~NETIF_F_GSO_MASK; else sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM; } } EXPORT_SYMBOL_GPL(sk_setup_caps); void __init sk_init(void) { if (num_physpages <= 4096) { Loading Loading
include/net/sock.h +1 −13 Original line number Diff line number Diff line Loading @@ -1075,19 +1075,7 @@ static inline int sk_can_gso(const struct sock *sk) return net_gso_ok(sk->sk_route_caps, sk->sk_gso_type); } static inline void sk_setup_caps(struct sock *sk, struct dst_entry *dst) { __sk_dst_set(sk, dst); sk->sk_route_caps = dst->dev->features; if (sk->sk_route_caps & NETIF_F_GSO) sk->sk_route_caps |= NETIF_F_GSO_MASK; if (sk_can_gso(sk)) { if (dst->header_len) sk->sk_route_caps &= ~NETIF_F_GSO_MASK; else sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM; } } extern void sk_setup_caps(struct sock *sk, struct dst_entry *dst); static inline void sk_charge_skb(struct sock *sk, struct sk_buff *skb) { Loading
net/core/sock.c +15 −0 Original line number Diff line number Diff line Loading @@ -979,6 +979,21 @@ struct sock *sk_clone(const struct sock *sk, const gfp_t priority) EXPORT_SYMBOL_GPL(sk_clone); void sk_setup_caps(struct sock *sk, struct dst_entry *dst) { __sk_dst_set(sk, dst); sk->sk_route_caps = dst->dev->features; if (sk->sk_route_caps & NETIF_F_GSO) sk->sk_route_caps |= NETIF_F_GSO_MASK; if (sk_can_gso(sk)) { if (dst->header_len) sk->sk_route_caps &= ~NETIF_F_GSO_MASK; else sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM; } } EXPORT_SYMBOL_GPL(sk_setup_caps); void __init sk_init(void) { if (num_physpages <= 4096) { Loading