#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_ethdev.h>
+#ifdef RTE_LIBRTE_I40E_PMD
#include <rte_pmd_i40e.h>
+#endif
#include <libvirt/libvirt.h>
#include "channel_monitor.h"
for (i = 0; i < pol->pkt.nb_mac_to_monitor; i++) {
RTE_ETH_FOREACH_DEV(x) {
+#ifdef RTE_LIBRTE_I40E_PMD
ret = rte_pmd_i40e_query_vfid_by_mac(x,
(struct rte_ether_addr *)&(pol->pkt.vfid[i]));
+#else
+ ret = -ENOTSUP;
+#endif
if (ret != -EINVAL) {
pol->port[i] = x;
break;
vsi_pkt_count_prev_total = 0;
double rdtsc_curr, rdtsc_diff, diff;
int x;
+#ifdef RTE_LIBRTE_I40E_PMD
struct rte_eth_stats vf_stats;
+#endif
for (x = 0; x < pol->pkt.nb_mac_to_monitor; x++) {
+#ifdef RTE_LIBRTE_I40E_PMD
/*Read vsi stats*/
if (rte_pmd_i40e_get_vf_stats(x, pol->pfid[x], &vf_stats) == 0)
vsi_pkt_count = vf_stats.ipackets;
else
vsi_pkt_count = -1;
+#else
+ vsi_pkt_count = -1;
+#endif
vsi_pkt_total += vsi_pkt_count;