Loading net/core/netpoll.c +22 −20 Original line number Diff line number Diff line Loading @@ -248,14 +248,14 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) int status; struct netpoll_info *npinfo; repeat: if (!np || !np->dev || !netif_running(np->dev)) { __kfree_skb(skb); return; } /* avoid recursion */ npinfo = np->dev->npinfo; /* avoid recursion */ if (npinfo->poll_owner == smp_processor_id() || np->dev->xmit_lock_owner == smp_processor_id()) { if (np->drop) Loading @@ -265,6 +265,7 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) return; } while (1) { spin_lock(&np->dev->xmit_lock); np->dev->xmit_lock_owner = smp_processor_id(); Loading @@ -275,19 +276,20 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) if (netif_queue_stopped(np->dev)) { np->dev->xmit_lock_owner = -1; spin_unlock(&np->dev->xmit_lock); netpoll_poll(np); goto repeat; continue; } status = np->dev->hard_start_xmit(skb, np->dev); np->dev->xmit_lock_owner = -1; spin_unlock(&np->dev->xmit_lock); /* success */ if(!status) return; /* transmit busy */ if(status) { netpoll_poll(np); goto repeat; } } Loading Loading
net/core/netpoll.c +22 −20 Original line number Diff line number Diff line Loading @@ -248,14 +248,14 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) int status; struct netpoll_info *npinfo; repeat: if (!np || !np->dev || !netif_running(np->dev)) { __kfree_skb(skb); return; } /* avoid recursion */ npinfo = np->dev->npinfo; /* avoid recursion */ if (npinfo->poll_owner == smp_processor_id() || np->dev->xmit_lock_owner == smp_processor_id()) { if (np->drop) Loading @@ -265,6 +265,7 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) return; } while (1) { spin_lock(&np->dev->xmit_lock); np->dev->xmit_lock_owner = smp_processor_id(); Loading @@ -275,19 +276,20 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) if (netif_queue_stopped(np->dev)) { np->dev->xmit_lock_owner = -1; spin_unlock(&np->dev->xmit_lock); netpoll_poll(np); goto repeat; continue; } status = np->dev->hard_start_xmit(skb, np->dev); np->dev->xmit_lock_owner = -1; spin_unlock(&np->dev->xmit_lock); /* success */ if(!status) return; /* transmit busy */ if(status) { netpoll_poll(np); goto repeat; } } Loading