diff --git a/lib/mqnic/.gitignore b/lib/mqnic/.gitignore new file mode 100644 index 000000000..36f087857 --- /dev/null +++ b/lib/mqnic/.gitignore @@ -0,0 +1 @@ +libmqnic.a diff --git a/modules/mqnic/mqnic_netdev.c b/modules/mqnic/mqnic_netdev.c index cc09bd27a..916024236 100644 --- a/modules/mqnic/mqnic_netdev.c +++ b/modules/mqnic/mqnic_netdev.c @@ -354,35 +354,42 @@ void mqnic_update_stats(struct net_device *ndev) struct radix_tree_iter iter; void **slot; unsigned long packets, bytes; + unsigned long dropped; if (unlikely(!priv->port_up)) return; packets = 0; bytes = 0; + dropped = 0; down_read(&priv->rxq_table_sem); radix_tree_for_each_slot(slot, &priv->rxq_table, &iter, 0) { const struct mqnic_ring *q = (struct mqnic_ring *)*slot; packets += READ_ONCE(q->packets); bytes += READ_ONCE(q->bytes); + dropped += READ_ONCE(q->dropped_packets); } up_read(&priv->rxq_table_sem); ndev->stats.rx_packets = packets; ndev->stats.rx_bytes = bytes; + ndev->stats.rx_dropped = dropped; packets = 0; bytes = 0; + dropped = 0; down_read(&priv->txq_table_sem); radix_tree_for_each_slot(slot, &priv->txq_table, &iter, 0) { const struct mqnic_ring *q = (struct mqnic_ring *)*slot; packets += READ_ONCE(q->packets); bytes += READ_ONCE(q->bytes); + dropped += READ_ONCE(q->dropped_packets); } up_read(&priv->txq_table_sem); ndev->stats.tx_packets = packets; ndev->stats.tx_bytes = bytes; + ndev->stats.tx_dropped = dropped; } static void mqnic_get_stats64(struct net_device *ndev, diff --git a/utils/.gitignore b/utils/.gitignore index 5554eb4e9..dde5a2302 100644 --- a/utils/.gitignore +++ b/utils/.gitignore @@ -2,4 +2,5 @@ mqnic-config mqnic-bmc mqnic-dump mqnic-fw +mqnic-xcvr perout diff --git a/utils/Makefile b/utils/Makefile index ba95285a8..0fe8f4469 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -59,6 +59,7 @@ clean: rm -f $(BIN) rm -f *.o rm -f .*.d + $(MAKE) -C $(dir $(LIBMQNIC))/ $@ -include $(wildcard .*.d)