mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
netdev-dpdk: add support for rx_multicast_packets counter
This patch enables already implemented ifInMulticastPkts counter in sFlow for DPDK interfaces. Metric is retrieved from DPDK by using extended statistic API and stored in 'multicast' member of netdev_stats structure, which represents number of incoming packets that were addressed to a multicast address. Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
committed by
Ben Pfaff
parent
1859876c04
commit
d57f777f5d
@@ -118,6 +118,7 @@ BUILD_ASSERT_DECL((MAX_NB_MBUF / ROUND_DOWN_POW2(MAX_NB_MBUF/MIN_NB_MBUF))
|
||||
#define XSTAT_TX_1024_TO_1522_PACKETS "tx_size_1024_to_1522_packets"
|
||||
#define XSTAT_TX_1523_TO_MAX_PACKETS "tx_size_1523_to_max_packets"
|
||||
|
||||
#define XSTAT_RX_MULTICAST_PACKETS "rx_multicast_packets"
|
||||
#define XSTAT_TX_MULTICAST_PACKETS "tx_multicast_packets"
|
||||
#define XSTAT_RX_BROADCAST_PACKETS "rx_broadcast_packets"
|
||||
#define XSTAT_TX_BROADCAST_PACKETS "tx_broadcast_packets"
|
||||
@@ -1998,6 +1999,8 @@ netdev_dpdk_convert_xstats(struct netdev_stats *stats,
|
||||
stats->tx_1024_to_1522_packets = xstats[i].value;
|
||||
} else if (strcmp(XSTAT_TX_1523_TO_MAX_PACKETS, names[i].name) == 0) {
|
||||
stats->tx_1523_to_max_packets = xstats[i].value;
|
||||
} else if (strcmp(XSTAT_RX_MULTICAST_PACKETS, names[i].name) == 0) {
|
||||
stats->multicast = xstats[i].value;
|
||||
} else if (strcmp(XSTAT_TX_MULTICAST_PACKETS, names[i].name) == 0) {
|
||||
stats->tx_multicast_packets = xstats[i].value;
|
||||
} else if (strcmp(XSTAT_RX_BROADCAST_PACKETS, names[i].name) == 0) {
|
||||
|
Reference in New Issue
Block a user