mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
netdev-dpdk: Fix tx drops statistic for a down netdev.
Dropped packets were not counted as tx_dropped when a DPDK netdev is
down (like after calling netdev-dpdk/set-admin-state dpdk1 down).
Fixes: 3b1fb0779b
("netdev-dpdk: Don't call rte_dev_stop() in update_flags().")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
committed by
Ilya Maximets
parent
c896bffd8c
commit
8523ee2f8a
@@ -2817,6 +2817,9 @@ netdev_dpdk_eth_send(struct netdev *netdev, int qid,
|
||||
int cnt, dropped;
|
||||
|
||||
if (OVS_UNLIKELY(!(dev->flags & NETDEV_UP))) {
|
||||
rte_spinlock_lock(&dev->stats_lock);
|
||||
dev->stats.tx_dropped += dp_packet_batch_size(batch);
|
||||
rte_spinlock_unlock(&dev->stats_lock);
|
||||
dp_packet_delete_batch(batch, true);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user