Changeset 40592


Ignore:
Timestamp:
2014-04-29T17:52:12+02:00 (4 years ago)
Author:
nbd
Message:

cns3xxx: ethernet - revert: clean up tx descs only when needed

This reverts commit 0772ab938c0aedd7f4cc7127059d6ce8cf929dfa.

Trying to optimize calls to eth_complete_tx in this fasion causes a regression
where when sending only the tx queue can get disabled until a packet is
received. This original call to eth_schedule_poll() is scheduled so it
should not cause a performance issue.

Signed-off-by: Tim Harvey <tharvey@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c

    r39762 r40592  
    584584} 
    585585 
    586 static int eth_complete_tx(struct sw *sw) 
     586static void eth_complete_tx(struct sw *sw) 
    587587{ 
    588588        struct _tx_ring *tx_ring = &sw->tx_ring; 
     
    616616        tx_ring->num_used -= i; 
    617617        eth_check_num_used(tx_ring); 
    618  
    619         return TX_DESCS - tx_ring->num_used; 
    620618} 
    621619 
     
    779777                nr_desc++; 
    780778 
     779        eth_schedule_poll(sw); 
    781780        spin_lock_bh(&tx_lock); 
    782781        if ((tx_ring->num_used + nr_desc + 1) >= TX_DESCS) { 
    783                 /* clean up tx descriptors when needed */ 
    784                 if (eth_complete_tx(sw) < nr_desc) { 
    785                         spin_unlock_bh(&tx_lock); 
    786                         return NETDEV_TX_BUSY; 
    787                 } 
     782                spin_unlock_bh(&tx_lock); 
     783                return NETDEV_TX_BUSY; 
    788784        } 
    789785 
Note: See TracChangeset for help on using the changeset viewer.