diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-08-18 20:34:13 +0300 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-08-18 23:46:32 +0300 |
commit | 08def8d3b3e909b9bbafcb0f4820a84ab7d522ad (patch) | |
tree | 57d87f1ec9161ae9f2f7dc841fec131c7bcd18b6 /src/main_dpdk.h | |
parent | 1069c2c1b67899515e9769aac5f23642cc85410c (diff) |
TRex argument --dump-interfaces <list of PCI> (by default will take interfaces from /etc/trex_cfg.yaml if exists, if does not exists, will show all DPDK interfaces)
get interface speed from DPDK instead of using constants per driver
add script to generate config file /etc/trex_cfg.yaml: sudo ./dpdk_setup_ports.py -c <list of PCI>
show table of interfaces in sudo ./dpdk_setup_ports.py -t
Diffstat (limited to 'src/main_dpdk.h')
-rw-r--r-- | src/main_dpdk.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main_dpdk.h b/src/main_dpdk.h index 91618071..935a27ea 100644 --- a/src/main_dpdk.h +++ b/src/main_dpdk.h @@ -90,6 +90,9 @@ class CPhyEthIF { bool is_link_up(){ return (m_link.link_status?true:false); } + void get_link_speed(uint32_t *link_speed){ + *link_speed = m_link.link_speed; + } void dump_link(FILE *fd); void disable_flow_control(); void set_promiscuous(bool enable); @@ -119,10 +122,8 @@ class CPhyEthIF { } void flush_dp_rx_queue(void); void flush_rx_queue(void); - int add_rx_flow_stat_rule(uint8_t port_id, uint16_t l3_type, uint8_t l4_proto - , uint8_t ipv6_next_h, uint16_t id) const; - int del_rx_flow_stat_rule(uint8_t port_id, uint16_t l3_type, uint8_t l4_proto - , uint8_t ipv6_next_h, uint16_t id) const; + int add_rx_flow_stat_rule(uint8_t type, uint16_t proto, uint16_t id); + int del_rx_flow_stat_rule(uint8_t type, uint16_t proto, uint16_t id); inline uint16_t tx_burst(uint16_t queue_id, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) { return rte_eth_tx_burst(m_port_id, queue_id, tx_pkts, nb_pkts); } @@ -154,9 +155,9 @@ class CPhyEthIF { const std::vector<std::pair<uint8_t, uint8_t>> & get_core_list(); private: + struct rte_eth_link m_link; uint8_t m_port_id; uint8_t m_rx_queue; - struct rte_eth_link m_link; uint64_t m_sw_try_tx_pkt; uint64_t m_sw_tx_drop_pkt; CBwMeasure m_bw_tx; |