]> git.proxmox.com Git - ovs.git/commit
netdev-dpdk: Fix sw stats perf drop.
authorKevin Traynor <ktraynor@redhat.com>
Tue, 17 Dec 2019 15:07:37 +0000 (15:07 +0000)
committerIlya Maximets <i.maximets@ovn.org>
Wed, 18 Dec 2019 12:06:27 +0000 (13:06 +0100)
commit6d77abf4f7ea5596ba8c4a7a27768e83e80a7e46
tree386e215d888b785ff065d0f0267492e1e378834b
parenta0152c11640c5a9c3a143eacff51d44d0b2698a8
netdev-dpdk: Fix sw stats perf drop.

Accessing the sw stats in the vhost datapath of a PVP test
can incur a performance drop of ~2%.

Most of the time these stats will just be getting zero added
to them. By checking if there is a non-zero update first, we
can avoid accessing them when they won't be updated and avoid
the performance drop.

Fixes: 2f862c712e52 ("netdev-dpdk: Detailed packet drop statistics.")
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
lib/netdev-dpdk.c