Commit 3ace873f authored by David S. Miller's avatar David S. Miller

[NET]: Uninline netif_rx_ni().

It expands to a lot of code when SMP or PREEMPT is
enabled.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 32889b39
......@@ -677,6 +677,7 @@ static inline void dev_kfree_skb_any(struct sk_buff *skb)
#define HAVE_NETIF_RX 1
extern int netif_rx(struct sk_buff *skb);
extern int netif_rx_ni(struct sk_buff *skb);
#define HAVE_NETIF_RECEIVE_SKB 1
extern int netif_receive_skb(struct sk_buff *skb);
extern int dev_ioctl(unsigned int cmd, void __user *);
......@@ -691,21 +692,6 @@ extern void dev_init(void);
extern int netdev_nit;
/* Post buffer to the network code from _non interrupt_ context.
* see net/core/dev.c for netif_rx description.
*/
static inline int netif_rx_ni(struct sk_buff *skb)
{
int err = netif_rx(skb);
preempt_disable();
if (softirq_pending(smp_processor_id()))
do_softirq();
preempt_enable();
return err;
}
/* Called by rtnetlink.c:rtnl_unlock() */
extern void netdev_run_todo(void);
......
......@@ -1587,6 +1587,20 @@ int netif_rx(struct sk_buff *skb)
return NET_RX_DROP;
}
int netif_rx_ni(struct sk_buff *skb)
{
int err = netif_rx(skb);
preempt_disable();
if (softirq_pending(smp_processor_id()))
do_softirq();
preempt_enable();
return err;
}
EXPORT_SYMBOL(netif_rx_ni);
static __inline__ void skb_bond(struct sk_buff *skb)
{
struct net_device *dev = skb->dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment