staging: fix build failure in bcm driver
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 20110114173713.2d89e43c@nehalam
Quoted 28 lines · On Fri, 14 Jan 2011 17:37:13 -0800 Stephen Hemminger <[email protected]>…
Quoted 25 lines · On Fri, 14 Jan 2011 17:24:39 -0800 Andres Salomon <[email protected]> wrote:
While building, I hit the following:
CC [M]
drivers/staging/bcm/Qos.odrivers/staging/bcm/Qos.c: In function ‘PruneQueue’:drivers/staging/bcm/Qos.c:367: error: ‘struct netdev_queue’ has no member named ‘tx_dropped’drivers/staging/bcm/Qos.c: In function ‘flush_all_queues’:drivers/staging/bcm/Qos.c:416: error: ‘struct netdev_queue’ has no member named ‘tx_dropped’ make[5]: *** [drivers/staging/bcm/Qos.o] Error 1 make[4]: *** [drivers/staging/bcm] Error 2 make[3]: *** [drivers/staging] Error 2As well as:
CC [M]
drivers/staging/bcm/Transmit.odrivers/staging/bcm/Transmit.c: In function ‘SetupNextSend’:drivers/staging/bcm/Transmit.c:163: error: ‘struct netdev_queue’ has no member named ‘tx_bytes’drivers/staging/bcm/Transmit.c:164:
error: ‘struct netdev_queue’ has no member named ‘tx_packets’ make[2]: *** [drivers/staging/bcm/Transmit.o] Error 1tx_dropped/tx_bytes_tx_packets were removed in commit
1ac9ad13. This patch converts bcm to usenet_device_statsinstead ofnetdev_queue.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Andres Salomon <[email protected]>Don't think this is necessary.
What kernel version? and kernel config?
I suspect the problem is a missing dependency on multiqueue support.
Current linus git (38567333). Kernel config is attached.
Eric Dumazet
Acked-byQuoted 20 lines · Andres Salomon
While building, I hit the following:
CC [M]
drivers/staging/bcm/Qos.odrivers/staging/bcm/Qos.c: In function ‘PruneQueue’:drivers/staging/bcm/Qos.c:367: error: ‘struct netdev_queue’ has no member named ‘tx_dropped’drivers/staging/bcm/Qos.c: In function ‘flush_all_queues’:drivers/staging/bcm/Qos.c:416: error: ‘struct netdev_queue’ has no member named ‘tx_dropped’ make[5]: *** [drivers/staging/bcm/Qos.o] Error 1
make[4]: *** [drivers/staging/bcm] Error 2
make[3]: *** [drivers/staging] Error 2As well as:
CC [M]
drivers/staging/bcm/Transmit.odrivers/staging/bcm/Transmit.c: In function ‘SetupNextSend’:drivers/staging/bcm/Transmit.c:163: error: ‘struct netdev_queue’ has no member named ‘tx_bytes’drivers/staging/bcm/Transmit.c:164: error: ‘struct netdev_queue’ has no member named ‘tx_packets’ make[2]: *** [drivers/staging/bcm/Transmit.o] Error 1
Quoted 4 lines
tx_dropped/tx_bytes_tx_packets were removed in commit
1ac9ad13. This patch converts bcm to usenet_device_statsinstead ofnetdev_queue.Signed-off-by Andres Salomon <[email protected]>
BTW, chunks included in this patch have horrible codingstyle.
Is this driver planned for inclusion sometime ?
Quoted 63 lines
---
drivers/staging/bcm/Qos.c | 7 +++---- drivers/staging/bcm/Transmit.c | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-)drivers/staging/bcm/Qos.c +3
-4@@ -359,12 +359,11 @@ static VOID PruneQueue(PMINI_ADAPTER Adapter, INT iIndex)if (PacketToDrop) { -struct netdev_queue *txq =netdev_get_tx_queue (Adapter->dev, iIndex);if (netif_msg_tx_err (Adapter))pr_info (PFX "%s: tx queue %d overlimit\n" , Adapter->dev->name, iIndex); - txq->tx_dropped++; + netstats->tx_dropped++;DEQUEUEPACKET (Adapter->PackInfo[iIndex].FirstTxQueue, Adapter->PackInfo[iIndex].LastTxQueue);@@ -404,7 +403,7 @@ VOID flush_all_queues(PMINI_ADAPTER Adapter)// down(&Adapter->data_packet_queue_lock); for (iQIndex=LowPriority; iQIndex<HiPriority; iQIndex++) { -struct netdev_queue *txq =netdev_get_tx_queue (Adapter->dev, iQIndex); +struct net_device_stats *netstats = &Adapter->dev->stats;spin_lock_bh (&Adapter->PackInfo[iQIndex].SFQueueLock);while (Adapter->PackInfo[iQIndex].FirstTxQueue)@@ -413,7 +412,7 @@ VOID flush_all_queues(PMINI_ADAPTER Adapter)if (PacketToDrop) { uiTotalPacketLength = PacketToDrop->len; - txq->tx_dropped++; + netstats->tx_dropped++; }else uiTotalPacketLength =0 ;drivers/staging/bcm/Transmit.c +3
-3@@ -157,11 +157,11 @@ INT SetupNextSend(PMINI_ADAPTER Adapter, struct sk_buff *Packet, USHORT Vcid) }else { -struct netdev_queue *txq =netdev_get_tx_queue (Adapter->dev, QueueIndex); +struct net_device_stats *netstats = &Adapter->dev->stats; Adapter->PackInfo[QueueIndex].uiTotalTxBytes += Leader.PLength; - txq->tx_bytes += Leader.PLength; - ++txq->tx_packets; + netstats->tx_bytes += Leader.PLength; + ++netstats->tx_packets; Adapter->PackInfo[QueueIndex].uiCurrentTokenCount -= Leader.PLength <<3 ; Adapter->PackInfo[QueueIndex].uiSentBytes += (Packet->len);
Stephen Hemminger
Acked-byQuoted 24 lines · On Sat, 15 Jan 2011 07:51:45 +0100 Eric Dumazet <[email protected]> wrote:
Quoted 23 lines · Andres Salomon
While building, I hit the following:
CC [M]
drivers/staging/bcm/Qos.odrivers/staging/bcm/Qos.c: In function ‘PruneQueue’:drivers/staging/bcm/Qos.c:367: error: ‘struct netdev_queue’ has no member named ‘tx_dropped’drivers/staging/bcm/Qos.c: In function ‘flush_all_queues’:drivers/staging/bcm/Qos.c:416: error: ‘struct netdev_queue’ has no member named ‘tx_dropped’ make[5]: *** [drivers/staging/bcm/Qos.o] Error 1
make[4]: *** [drivers/staging/bcm] Error 2
make[3]: *** [drivers/staging] Error 2As well as:
CC [M]
drivers/staging/bcm/Transmit.odrivers/staging/bcm/Transmit.c: In function ‘SetupNextSend’:drivers/staging/bcm/Transmit.c:163: error: ‘struct netdev_queue’ has no member named ‘tx_bytes’drivers/staging/bcm/Transmit.c:164: error: ‘struct netdev_queue’ has no member named ‘tx_packets’ make[2]: *** [drivers/staging/bcm/Transmit.o] Error 1tx_dropped/tx_bytes_tx_packets were removed in commit
1ac9ad13. This patch converts bcm to usenet_device_statsinstead ofnetdev_queue.
Quoted 8 lines
Quoted 1 line
Signed-off-by Andres Salomon <[email protected]>Acked-by Eric Dumazet <[email protected]>BTW, chunks included in this patch have horrible codingstyle.
Is this driver planned for inclusion sometime ?
Looks like the "remove dev_txq_stats_fold" patch missed the staging driver(s).
The bcm driver code is gross, the driver should be rewritten see the TODO.