diff options
author | imarom <imarom@cisco.com> | 2015-08-09 23:36:58 -0400 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2015-08-09 23:36:58 -0400 |
commit | a4766207c7cf1822730e2b5c7a233b27b9f8c0f5 (patch) | |
tree | 8579e29171fa3a846ca04249c1049c03561bef5b /src | |
parent | b77e4ab7fc3845efe0769723cadb007c3577ae1e (diff) |
added support for C++ 2011
this includes refactoring the flags and adding for c++ the flag std=c++0x
Diffstat (limited to 'src')
-rwxr-xr-x | src/main_dpdk.cpp | 29 | ||||
-rwxr-xr-x | src/pal/linux_dpdk/dpdk180/rte_config.h | 3 |
2 files changed, 17 insertions, 15 deletions
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp index a0258ef1..cafea343 100755 --- a/src/main_dpdk.cpp +++ b/src/main_dpdk.cpp @@ -4575,7 +4575,6 @@ void CTRexExtendedDriverBase1G::update_global_config_fdir(port_cfg_t * cfg){ cfg->update_global_config_fdir_10g_1g(); } - int CTRexExtendedDriverBase1G::configure_rx_filter_rules(CPhyEthIF * _if){ uint16_t hops = get_rx_check_hops(); @@ -4587,15 +4586,15 @@ int CTRexExtendedDriverBase1G::configure_rx_filter_rules(CPhyEthIF * _if){ int i; // IPv4: bytes being compared are {TTL, Protocol} uint16_t ff_rules_v4[4]={ - 0xFF06 - v4_hops, - 0xFE11 - v4_hops, - 0xFF11 - v4_hops, - 0xFE06 - v4_hops, + (uint16_t)(0xFF06 - v4_hops), + (uint16_t)(0xFE11 - v4_hops), + (uint16_t)(0xFF11 - v4_hops), + (uint16_t)(0xFE06 - v4_hops), } ; // IPv6: bytes being compared are {NextHdr, HopLimit} uint16_t ff_rules_v6[2]={ - 0x3CFF - hops, - 0x3CFE - hops, + (uint16_t)(0x3CFF - hops), + (uint16_t)(0x3CFE - hops), } ; uint16_t *ff_rules; uint16_t num_rules; @@ -4733,17 +4732,17 @@ int CTRexExtendedDriverBase10G::configure_rx_filter_rules(CPhyEthIF * _if){ // IPv4: bytes being compared are {TTL, Protocol} uint16_t ff_rules_v4[4]={ - 0xFF11 - v4_hops, - 0xFE11 - v4_hops, - 0xFF06 - v4_hops, - 0xFE06 - v4_hops, + (uint16_t)(0xFF11 - v4_hops), + (uint16_t)(0xFE11 - v4_hops), + (uint16_t)(0xFF06 - v4_hops), + (uint16_t)(0xFE06 - v4_hops), } ; // IPv6: bytes being compared are {NextHdr, HopLimit} uint16_t ff_rules_v6[4]={ - 0x3CFF - hops, - 0x3CFE - hops, - 0x3CFF - hops, - 0x3CFE - hops, + (uint16_t)(0x3CFF - hops), + (uint16_t)(0x3CFE - hops), + (uint16_t)(0x3CFF - hops), + (uint16_t)(0x3CFE - hops), } ; const rte_l4type ff_rules_type[4]={ RTE_FDIR_L4TYPE_UDP, diff --git a/src/pal/linux_dpdk/dpdk180/rte_config.h b/src/pal/linux_dpdk/dpdk180/rte_config.h index 68dd7a7b..0603ed06 100755 --- a/src/pal/linux_dpdk/dpdk180/rte_config.h +++ b/src/pal/linux_dpdk/dpdk180/rte_config.h @@ -1,5 +1,8 @@ #ifndef __RTE_CONFIG_H #define __RTE_CONFIG_H + +#define typeof __typeof__ + #undef RTE_EXEC_ENV #define RTE_EXEC_ENV "linuxapp" #undef RTE_EXEC_ENV_LINUXAPP |