diff options
Diffstat (limited to 'src/dpdk22/lib')
-rw-r--r-- | src/dpdk22/lib/librte_ether/rte_eth_ctrl.h | 6 | ||||
-rw-r--r-- | src/dpdk22/lib/librte_ether/rte_ethdev.c | 17 |
2 files changed, 22 insertions, 1 deletions
diff --git a/src/dpdk22/lib/librte_ether/rte_eth_ctrl.h b/src/dpdk22/lib/librte_ether/rte_eth_ctrl.h index dc26439d..419ca90e 100644 --- a/src/dpdk22/lib/librte_ether/rte_eth_ctrl.h +++ b/src/dpdk22/lib/librte_ether/rte_eth_ctrl.h @@ -407,8 +407,9 @@ struct rte_eth_l2_flow { struct rte_eth_ipv4_flow { uint32_t src_ip; /**< IPv4 source address to match. */ uint32_t dst_ip; /**< IPv4 destination address to match. */ - // TREX_PATCH + // TREX_PATCH (ttl and ip_id) uint8_t ttl; /**< IPv4 ttl to match */ + uint16_t ip_id; /**< IPv4 IP ID to match */ uint8_t l4_protocol; /**< IPv4 l4 protocol to match */ }; @@ -575,6 +576,9 @@ struct rte_eth_fdir_action { /**< If report_status is RTE_ETH_FDIR_REPORT_ID_FLEX_4 or RTE_ETH_FDIR_REPORT_FLEX_8, flex_off specifies where the reported flex bytes start from in flexible payload. */ + // TREX_PATCH + // Index for statistics counter that will count FDIR matches. + uint16_t stat_count_index; }; /** diff --git a/src/dpdk22/lib/librte_ether/rte_ethdev.c b/src/dpdk22/lib/librte_ether/rte_ethdev.c index 43ec0265..383ad120 100644 --- a/src/dpdk22/lib/librte_ether/rte_ethdev.c +++ b/src/dpdk22/lib/librte_ether/rte_ethdev.c @@ -1445,6 +1445,23 @@ rte_eth_get_speed(uint8_t port_id, int *speed) return 0; } +// TREX_PATCH +// return in stats, statistics starting from start, for len counters. +int +rte_eth_fdir_stats_get(uint8_t port_id, uint32_t *stats, uint32_t start, uint32_t len) +{ + struct rte_eth_dev *dev; + + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL); + + dev = &rte_eth_devices[port_id]; + + // Only xl710 support this + i40e_trex_fdir_stats_get(dev, stats, start, len); + + return 0; +} + int rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats) { |