net: Replace u64_stats_fetch_begin_bh to u64_stats_fetch_begin_irq
Replace the bh safe variant with the hard irq safe variant. We need a hard irq safe variant to deal with netpoll transmitting packets from hard irq context, and we need it in most if not all of the places using the bh safe variant. Except on 32bit uni-processor the code is exactly the same so don't bother with a bh variant, just have a hard irq safe variant that everyone can use. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
85dcce7a73
commit
57a7744e09
@ -591,10 +591,10 @@ static struct rtnl_link_stats64 *be_get_stats64(struct net_device *netdev,
|
||||
for_all_rx_queues(adapter, rxo, i) {
|
||||
const struct be_rx_stats *rx_stats = rx_stats(rxo);
|
||||
do {
|
||||
start = u64_stats_fetch_begin_bh(&rx_stats->sync);
|
||||
start = u64_stats_fetch_begin_irq(&rx_stats->sync);
|
||||
pkts = rx_stats(rxo)->rx_pkts;
|
||||
bytes = rx_stats(rxo)->rx_bytes;
|
||||
} while (u64_stats_fetch_retry_bh(&rx_stats->sync, start));
|
||||
} while (u64_stats_fetch_retry_irq(&rx_stats->sync, start));
|
||||
stats->rx_packets += pkts;
|
||||
stats->rx_bytes += bytes;
|
||||
stats->multicast += rx_stats(rxo)->rx_mcast_pkts;
|
||||
@ -605,10 +605,10 @@ static struct rtnl_link_stats64 *be_get_stats64(struct net_device *netdev,
|
||||
for_all_tx_queues(adapter, txo, i) {
|
||||
const struct be_tx_stats *tx_stats = tx_stats(txo);
|
||||
do {
|
||||
start = u64_stats_fetch_begin_bh(&tx_stats->sync);
|
||||
start = u64_stats_fetch_begin_irq(&tx_stats->sync);
|
||||
pkts = tx_stats(txo)->tx_pkts;
|
||||
bytes = tx_stats(txo)->tx_bytes;
|
||||
} while (u64_stats_fetch_retry_bh(&tx_stats->sync, start));
|
||||
} while (u64_stats_fetch_retry_irq(&tx_stats->sync, start));
|
||||
stats->tx_packets += pkts;
|
||||
stats->tx_bytes += bytes;
|
||||
}
|
||||
@ -1408,15 +1408,15 @@ static void be_eqd_update(struct be_adapter *adapter)
|
||||
|
||||
rxo = &adapter->rx_obj[eqo->idx];
|
||||
do {
|
||||
start = u64_stats_fetch_begin_bh(&rxo->stats.sync);
|
||||
start = u64_stats_fetch_begin_irq(&rxo->stats.sync);
|
||||
rx_pkts = rxo->stats.rx_pkts;
|
||||
} while (u64_stats_fetch_retry_bh(&rxo->stats.sync, start));
|
||||
} while (u64_stats_fetch_retry_irq(&rxo->stats.sync, start));
|
||||
|
||||
txo = &adapter->tx_obj[eqo->idx];
|
||||
do {
|
||||
start = u64_stats_fetch_begin_bh(&txo->stats.sync);
|
||||
start = u64_stats_fetch_begin_irq(&txo->stats.sync);
|
||||
tx_pkts = txo->stats.tx_reqs;
|
||||
} while (u64_stats_fetch_retry_bh(&txo->stats.sync, start));
|
||||
} while (u64_stats_fetch_retry_irq(&txo->stats.sync, start));
|
||||
|
||||
|
||||
/* Skip, if wrapped around or first calculation */
|
||||
|
Reference in New Issue
Block a user