|
@@ -6667,8 +6667,6 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
|
|
|
struct ixgbe_adapter *adapter,
|
|
|
struct ixgbe_ring *tx_ring)
|
|
|
{
|
|
|
- struct net_device *netdev = tx_ring->netdev;
|
|
|
- struct netdev_queue *txq;
|
|
|
unsigned int first;
|
|
|
unsigned int tx_flags = 0;
|
|
|
u8 hdr_len = 0;
|
|
@@ -6765,9 +6763,6 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
|
|
|
/* add the ATR filter if ATR is on */
|
|
|
if (test_bit(__IXGBE_TX_FDIR_INIT_DONE, &tx_ring->state))
|
|
|
ixgbe_atr(tx_ring, skb, tx_flags, protocol);
|
|
|
- txq = netdev_get_tx_queue(netdev, tx_ring->queue_index);
|
|
|
- txq->tx_bytes += skb->len;
|
|
|
- txq->tx_packets++;
|
|
|
ixgbe_tx_queue(tx_ring, tx_flags, count, skb->len, hdr_len);
|
|
|
ixgbe_maybe_stop_tx(tx_ring, DESC_NEEDED);
|
|
|
|
|
@@ -6925,8 +6920,6 @@ static struct rtnl_link_stats64 *ixgbe_get_stats64(struct net_device *netdev,
|
|
|
struct ixgbe_adapter *adapter = netdev_priv(netdev);
|
|
|
int i;
|
|
|
|
|
|
- /* accurate rx/tx bytes/packets stats */
|
|
|
- dev_txq_stats_fold(netdev, stats);
|
|
|
rcu_read_lock();
|
|
|
for (i = 0; i < adapter->num_rx_queues; i++) {
|
|
|
struct ixgbe_ring *ring = ACCESS_ONCE(adapter->rx_ring[i]);
|
|
@@ -6943,6 +6936,22 @@ static struct rtnl_link_stats64 *ixgbe_get_stats64(struct net_device *netdev,
|
|
|
stats->rx_bytes += bytes;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ for (i = 0; i < adapter->num_tx_queues; i++) {
|
|
|
+ struct ixgbe_ring *ring = ACCESS_ONCE(adapter->tx_ring[i]);
|
|
|
+ u64 bytes, packets;
|
|
|
+ unsigned int start;
|
|
|
+
|
|
|
+ if (ring) {
|
|
|
+ do {
|
|
|
+ start = u64_stats_fetch_begin_bh(&ring->syncp);
|
|
|
+ packets = ring->stats.packets;
|
|
|
+ bytes = ring->stats.bytes;
|
|
|
+ } while (u64_stats_fetch_retry_bh(&ring->syncp, start));
|
|
|
+ stats->tx_packets += packets;
|
|
|
+ stats->tx_bytes += bytes;
|
|
|
+ }
|
|
|
+ }
|
|
|
rcu_read_unlock();
|
|
|
/* following stats updated by ixgbe_watchdog_task() */
|
|
|
stats->multicast = netdev->stats.multicast;
|