Changeset 18927


Ignore:
Timestamp:
04/05/12 15:30:33 (14 months ago)
Author:
BrainSlayer
Message:

reduce irq load

Location:
src/linux/universal
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-3.2/drivers/net/ppp/ppp_generic.c

    r18761 r18927  
    236236static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf, 
    237237                        struct file *file, unsigned int cmd, unsigned long arg); 
    238 static void ppp_xmit_process(struct ppp *ppp); 
     238static int ppp_xmit_process(struct ppp *ppp); 
    239239static void ppp_send_frame(struct ppp *ppp, struct sk_buff *skb); 
    240240static void ppp_push(struct ppp *ppp); 
     
    969969        put_unaligned_be16(proto, pp); 
    970970 
    971         netif_stop_queue(dev); 
    972971        skb_queue_tail(&ppp->file.xq, skb); 
    973         ppp_xmit_process(ppp); 
     972        if (!ppp_xmit_process(ppp)) 
     973                netif_stop_queue(dev); 
    974974        return NETDEV_TX_OK; 
    975975 
     
    10491049 * that can now be done. 
    10501050 */ 
    1051 static void 
     1051static int 
    10521052ppp_xmit_process(struct ppp *ppp) 
    10531053{ 
    10541054        struct sk_buff *skb; 
     1055        int ret = 0; 
    10551056 
    10561057        ppp_xmit_lock(ppp); 
     
    10621063                /* If there's no work left to do, tell the core net 
    10631064                   code that we can accept some more. */ 
    1064                 if (!ppp->xmit_pending && !skb_peek(&ppp->file.xq)) 
     1065                if (!ppp->xmit_pending && !skb_peek(&ppp->file.xq)) { 
    10651066                        netif_wake_queue(ppp->dev); 
     1067                        ret = 1; 
     1068                } 
    10661069        } 
    10671070        ppp_xmit_unlock(ppp); 
     1071        return ret; 
    10681072} 
    10691073 
  • src/linux/universal/linux-3.3/drivers/net/ppp/ppp_generic.c

    r18778 r18927  
    236236static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf, 
    237237                        struct file *file, unsigned int cmd, unsigned long arg); 
    238 static void ppp_xmit_process(struct ppp *ppp); 
     238static int ppp_xmit_process(struct ppp *ppp); 
    239239static void ppp_send_frame(struct ppp *ppp, struct sk_buff *skb); 
    240240static void ppp_push(struct ppp *ppp); 
     
    969969        put_unaligned_be16(proto, pp); 
    970970 
    971         netif_stop_queue(dev); 
    972971        skb_queue_tail(&ppp->file.xq, skb); 
    973         ppp_xmit_process(ppp); 
     972        if (!ppp_xmit_process(ppp)) 
     973                netif_stop_queue(dev); 
    974974        return NETDEV_TX_OK; 
    975975 
     
    10491049 * that can now be done. 
    10501050 */ 
    1051 static void 
     1051static int 
    10521052ppp_xmit_process(struct ppp *ppp) 
    10531053{ 
    10541054        struct sk_buff *skb; 
     1055        int ret = 0; 
    10551056 
    10561057        ppp_xmit_lock(ppp); 
     
    10621063                /* If there's no work left to do, tell the core net 
    10631064                   code that we can accept some more. */ 
    1064                 if (!ppp->xmit_pending && !skb_peek(&ppp->file.xq)) 
     1065                if (!ppp->xmit_pending && !skb_peek(&ppp->file.xq)) { 
    10651066                        netif_wake_queue(ppp->dev); 
     1067                        ret = 1; 
     1068                } 
    10661069        } 
    10671070        ppp_xmit_unlock(ppp); 
     1071        return ret; 
    10681072} 
    10691073 
Note: See TracChangeset for help on using the changeset viewer.