> -----Original Message----- > From: dev <[email protected]> On Behalf Of David Marchand > Sent: Friday, April 22, 2022 5:55 PM > To: [email protected] > Cc: [email protected] > Subject: [ovs-dev] [PATCH] 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: 3b1fb0779b87 ("netdev-dpdk: Don't call rte_dev_stop() in > update_flags().") > Signed-off-by: David Marchand <[email protected]> > --- > lib/netdev-dpdk.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index > c9ef2be855..42aa6b188d 100644 > --- a/lib/netdev-dpdk.c > +++ b/lib/netdev-dpdk.c > @@ -2843,6 +2843,9 @@ netdev_dpdk_send__(struct netdev_dpdk *dev, int qid, > bool concurrent_txq) { > 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; > } > -- > 2.23.0
LGTM, Acked-by: Sunil Pai G <[email protected]> _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
