--- zzzz-none-000/linux-2.6.32.61/include/net/sock.h 2013-06-10 09:43:48.000000000 +0000 +++ ar9-7330-650/linux-2.6.32.61/include/net/sock.h 2015-07-15 12:46:14.000000000 +0000 @@ -293,7 +293,7 @@ void *sk_security; #endif __u32 sk_mark; - /* XXX 4 bytes hole on 64 bit */ + unsigned long sk_tc_index; void (*sk_state_change)(struct sock *sk); void (*sk_data_ready)(struct sock *sk, int bytes); void (*sk_write_space)(struct sock *sk); @@ -1330,6 +1330,9 @@ skb_orphan(skb); skb->sk = sk; skb->destructor = sock_wfree; +#ifdef CONFIG_NET_SCHED + skb->tc_index = sk->sk_tc_index; +#endif /* * We used to take a refcount on sk, but following operation * is enough to guarantee sk_free() wont free this sock until @@ -1512,7 +1515,7 @@ __skb_queue_tail(&sk->sk_async_wait_queue, skb); } #else -static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early) +static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early __attribute__((unused))) { __skb_unlink(skb, &sk->sk_receive_queue); __kfree_skb(skb); @@ -1520,7 +1523,10 @@ #endif static inline -struct net *sock_net(const struct sock *sk) +struct net *sock_net(const struct sock *sk +#ifndef CONFIG_NET_NS + __attribute__((unused))) +#endif { #ifdef CONFIG_NET_NS return sk->sk_net; @@ -1530,7 +1536,15 @@ } static inline -void sock_net_set(struct sock *sk, struct net *net) +void sock_net_set(struct sock *sk +#ifndef CONFIG_NET_NS + __attribute__((unused)) +#endif + , struct net *net +#ifndef CONFIG_NET_NS + __attribute__((unused)) +#endif + ) { #ifdef CONFIG_NET_NS sk->sk_net = net;