diff options
author | Ido Barnea <ibarnea@cisco.com> | 2016-09-25 16:58:02 +0300 |
---|---|---|
committer | Ido Barnea <ibarnea@cisco.com> | 2016-10-05 10:45:28 +0300 |
commit | a42bf7bc43e78e63c266c22cccf15ce3f4cab297 (patch) | |
tree | bf8c61d079f7aa8e94ae6f82262923da92019ced /src/bp_sim.h | |
parent | af781231f369dfcf735b499ed65b800e7d6b5537 (diff) |
pre test: Periodically send gratuitous ARP in stateful
Diffstat (limited to 'src/bp_sim.h')
-rwxr-xr-x | src/bp_sim.h | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/src/bp_sim.h b/src/bp_sim.h index 37c3e1ef..5f21ca26 100755 --- a/src/bp_sim.h +++ b/src/bp_sim.h @@ -695,7 +695,28 @@ public: } u; } __rte_cache_aligned; ; -struct CParserOption { +class CPerPortIPCfg { + public: + uint32_t get_ip() {return m_ip;} + uint32_t get_mask() {return m_mask;} + uint32_t get_def_gw() {return m_def_gw;} + uint32_t get_vlan() {return m_vlan;} + bool is_loopback() {return m_is_loopback;} + void set_ip(uint32_t val) {m_ip = val;} + void set_mask(uint32_t val) {m_mask = val;} + void set_def_gw(uint32_t val) {m_def_gw = val;} + void set_vlan(uint16_t val) {m_vlan = val;} + void set_loopback(bool val) {m_is_loopback = val;} + + private: + uint32_t m_def_gw; + uint32_t m_ip; + uint32_t m_mask; + uint16_t m_vlan; + bool m_is_loopback; +}; + +class CParserOption { public: /* Runtime flags */ @@ -757,8 +778,7 @@ public: uint16_t m_vlan_port[2]; /* vlan value */ uint16_t m_src_ipv6[6]; /* Most signficant 96-bits */ uint16_t m_dst_ipv6[6]; /* Most signficant 96-bits */ - uint32_t m_def_gw[TREX_MAX_PORTS]; - uint32_t m_ip[TREX_MAX_PORTS]; + CPerPortIPCfg m_ip_cfg[TREX_MAX_PORTS]; uint32_t m_latency_rate; /* pkt/sec for each thread/port zero disable */ uint32_t m_latency_mask; uint32_t m_latency_prev; @@ -1430,12 +1450,9 @@ public: STATELESS_PKT =5, EXIT_SCHED =6, COMMAND =7, - EXIT_PORT_SCHED =8, - PCAP_PKT =9, - - + GRAT_ARP =10, }; /* flags MASKS*/ |