Changeset 31844


Ignore:
Timestamp:
2012-05-23T23:05:23+02:00 (6 years ago)
Author:
juhosg
Message:

ramips: Add byte queue limits support to net/ethernet/ramips_main.c

Add byte queue limits support to net/ethernet/ramips_main.c

"Byte queue limits are a mechanism to limit the size of the transmit
hardware queue on a NIC by number of bytes. The goal of these byte
limits is too reduce latency (HOL blocking) caused by excessive
queuing in hardware (aka buffer bloat) without sacrificing
throughput."

Signed-off-by: Tobias Diedrich <ranma+openwrt@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ramips/files/drivers/net/ethernet/ramips/ramips_main.c

    r30733 r31844  
    178178                } 
    179179        } 
     180 
     181        netdev_reset_queue(re->netdev); 
    180182} 
    181183 
     
    700702        dev->stats.tx_bytes += skb->len; 
    701703        ramips_fe_wr(tx_next, RAMIPS_TX_CTX_IDX0); 
     704        netdev_sent_queue(dev, skb->len); 
    702705        spin_unlock(&re->page_lock); 
    703706        return NETDEV_TX_OK; 
     
    781784        struct net_device *dev = (struct net_device*)ptr; 
    782785        struct raeth_priv *re = netdev_priv(dev); 
     786        unsigned int bytes_compl = 0, pkts_compl = 0; 
    783787 
    784788        spin_lock(&re->page_lock); 
     
    792796                if (!(txd->txd2 & TX_DMA_DONE) || !(txi->tx_skb)) 
    793797                        break; 
     798 
     799                pkts_compl++; 
     800                bytes_compl += txi->tx_skb->len; 
    794801 
    795802                dev_kfree_skb_irq(txi->tx_skb); 
     
    799806                        re->skb_free_idx = 0; 
    800807        } 
     808        netdev_completed_queue(dev, pkts_compl, bytes_compl); 
    801809        spin_unlock(&re->page_lock); 
    802810 
Note: See TracChangeset for help on using the changeset viewer.