mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
netdev-dpdk: Track vhost tx contention.
Add a coverage counter to help diagnose contention on the vhost txqs. This is seen as dropped packets on the physical ports for rates that are usually handled fine by OVS. Acked-by: Eelco Chaudron <echaudro@redhat.com> Signed-off-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
committed by
Ilya Maximets
parent
0c489cc54a
commit
9ff24b9c93
@@ -41,6 +41,7 @@
|
||||
#include <rte_vhost.h>
|
||||
|
||||
#include "cmap.h"
|
||||
#include "coverage.h"
|
||||
#include "dirs.h"
|
||||
#include "dp-packet.h"
|
||||
#include "dpdk.h"
|
||||
@@ -72,6 +73,8 @@ enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM};
|
||||
VLOG_DEFINE_THIS_MODULE(netdev_dpdk);
|
||||
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20);
|
||||
|
||||
COVERAGE_DEFINE(vhost_tx_contention);
|
||||
|
||||
#define DPDK_PORT_WATCHDOG_INTERVAL 5
|
||||
|
||||
#define OVS_CACHE_LINE_SIZE CACHE_LINE_SIZE
|
||||
@@ -2376,7 +2379,10 @@ __netdev_dpdk_vhost_send(struct netdev *netdev, int qid,
|
||||
goto out;
|
||||
}
|
||||
|
||||
rte_spinlock_lock(&dev->tx_q[qid].tx_lock);
|
||||
if (OVS_UNLIKELY(!rte_spinlock_trylock(&dev->tx_q[qid].tx_lock))) {
|
||||
COVERAGE_INC(vhost_tx_contention);
|
||||
rte_spinlock_lock(&dev->tx_q[qid].tx_lock);
|
||||
}
|
||||
|
||||
cnt = netdev_dpdk_filter_packet_len(dev, cur_pkts, cnt);
|
||||
/* Check has QoS has been configured for the netdev */
|
||||
|
Reference in New Issue
Block a user