Hi, I tried to add bql support to mv643xx_eth. Is this the correct way to add it? It compiles fine and the kernel works, but I'm unsure how to test it really.
Signed-off-by: Martin Mueller <[email protected]> Index: target/linux/kirkwood/patches/301-mv643xx-bql.patch =================================================================== --- target/linux/kirkwood/patches/301-mv643xx-bql.patch (revision 0) +++ target/linux/kirkwood/patches/301-mv643xx-bql.patch (revision 0) @@ -0,0 +1,47 @@ +--- a/drivers/net/ethernet/marvell/mv643xx_eth.c ++++ b/drivers/net/ethernet/marvell/mv643xx_eth.c +@@ -902,6 +902,8 @@ static netdev_tx_t mv643xx_eth_xmit(stru + netif_tx_stop_queue(nq); + } + ++ netdev_tx_sent_queue(nq, length); ++ + return NETDEV_TX_OK; + } + +@@ -937,6 +939,7 @@ static int txq_reclaim(struct tx_queue * + struct mv643xx_eth_private *mp = txq_to_mp(txq); + struct netdev_queue *nq = netdev_get_tx_queue(mp->dev, txq->index); + int reclaimed; ++ unsigned int pkts_compl = 0, bytes_compl = 0; + + __netif_tx_lock(nq, smp_processor_id()); + +@@ -982,6 +985,9 @@ static int txq_reclaim(struct tx_queue * + } + + if (skb != NULL) { ++ pkts_compl++; ++ bytes_compl += skb->len; ++ + if (skb_queue_len(&mp->rx_recycle) < + mp->rx_ring_size && + skb_recycle_check(skb, mp->skb_size)) +@@ -991,6 +997,7 @@ static int txq_reclaim(struct tx_queue * + } + } + ++ netdev_tx_completed_queue(nq, pkts_compl, bytes_compl); + __netif_tx_unlock(nq); + + if (reclaimed < budget) +@@ -2014,7 +2021,9 @@ static int txq_init(struct mv643xx_eth_p + static void txq_deinit(struct tx_queue *txq) + { + struct mv643xx_eth_private *mp = txq_to_mp(txq); ++ struct netdev_queue *nq = netdev_get_tx_queue(mp->dev, txq->index); + ++ netdev_tx_reset_queue(nq); + txq_disable(txq); + txq_reclaim(txq, txq->tx_ring_size, 1); + bye MM -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
