mirror of https://gitee.com/openkylin/linux.git
bridge: Add br_netif_receive_skb remove netif_receive_skb_sk
netif_receive_skb_sk is only called once in the bridge code, replace it with a bridge specific function that calls netif_receive_skb. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f2d74cf88c
commit
04eb44890e
|
@ -2985,11 +2985,7 @@ static inline void dev_consume_skb_any(struct sk_buff *skb)
|
||||||
|
|
||||||
int netif_rx(struct sk_buff *skb);
|
int netif_rx(struct sk_buff *skb);
|
||||||
int netif_rx_ni(struct sk_buff *skb);
|
int netif_rx_ni(struct sk_buff *skb);
|
||||||
int netif_receive_skb_sk(struct sock *sk, struct sk_buff *skb);
|
int netif_receive_skb(struct sk_buff *skb);
|
||||||
static inline int netif_receive_skb(struct sk_buff *skb)
|
|
||||||
{
|
|
||||||
return netif_receive_skb_sk(skb->sk, skb);
|
|
||||||
}
|
|
||||||
gro_result_t napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb);
|
gro_result_t napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb);
|
||||||
void napi_gro_flush(struct napi_struct *napi, bool flush_old);
|
void napi_gro_flush(struct napi_struct *napi, bool flush_old);
|
||||||
struct sk_buff *napi_get_frags(struct napi_struct *napi);
|
struct sk_buff *napi_get_frags(struct napi_struct *napi);
|
||||||
|
|
|
@ -26,6 +26,11 @@
|
||||||
br_should_route_hook_t __rcu *br_should_route_hook __read_mostly;
|
br_should_route_hook_t __rcu *br_should_route_hook __read_mostly;
|
||||||
EXPORT_SYMBOL(br_should_route_hook);
|
EXPORT_SYMBOL(br_should_route_hook);
|
||||||
|
|
||||||
|
static int br_netif_receive_skb(struct sock *sk, struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
return netif_receive_skb(skb);
|
||||||
|
}
|
||||||
|
|
||||||
static int br_pass_frame_up(struct sk_buff *skb)
|
static int br_pass_frame_up(struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
struct net_device *indev, *brdev = BR_INPUT_SKB_CB(skb)->brdev;
|
struct net_device *indev, *brdev = BR_INPUT_SKB_CB(skb)->brdev;
|
||||||
|
@ -57,7 +62,7 @@ static int br_pass_frame_up(struct sk_buff *skb)
|
||||||
|
|
||||||
return NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_IN, NULL, skb,
|
return NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_IN, NULL, skb,
|
||||||
indev, NULL,
|
indev, NULL,
|
||||||
netif_receive_skb_sk);
|
br_netif_receive_skb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void br_do_proxy_arp(struct sk_buff *skb, struct net_bridge *br,
|
static void br_do_proxy_arp(struct sk_buff *skb, struct net_bridge *br,
|
||||||
|
|
|
@ -3982,13 +3982,13 @@ static int netif_receive_skb_internal(struct sk_buff *skb)
|
||||||
* NET_RX_SUCCESS: no congestion
|
* NET_RX_SUCCESS: no congestion
|
||||||
* NET_RX_DROP: packet was dropped
|
* NET_RX_DROP: packet was dropped
|
||||||
*/
|
*/
|
||||||
int netif_receive_skb_sk(struct sock *sk, struct sk_buff *skb)
|
int netif_receive_skb(struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
trace_netif_receive_skb_entry(skb);
|
trace_netif_receive_skb_entry(skb);
|
||||||
|
|
||||||
return netif_receive_skb_internal(skb);
|
return netif_receive_skb_internal(skb);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(netif_receive_skb_sk);
|
EXPORT_SYMBOL(netif_receive_skb);
|
||||||
|
|
||||||
/* Network device is going away, flush any packets still pending
|
/* Network device is going away, flush any packets still pending
|
||||||
* Called with irqs disabled.
|
* Called with irqs disabled.
|
||||||
|
|
Loading…
Reference in New Issue