diff options
author | Xavier Simonart <xavier.simonart@intel.com> | 2019-05-28 15:31:43 +0200 |
---|---|---|
committer | Xavier Simonart <xavier.simonart@intel.com> | 2019-10-09 15:50:26 +0200 |
commit | 4cc4dabe80eb7d19c20920b7ec20899d6a76a1dd (patch) | |
tree | ee67e444dbc9806f1d63ba3d821788b422cb8bbf /VNFs/DPPD-PROX/prox_compat.h | |
parent | 73b79d29bc926a87e317c3881c197fc2db64e9d0 (diff) |
Added support for DPDK 19.02 and 19.05
This includes supporting following API changes
- RTE_VER_... now in rte_config.h instead of rte_version.h
- <rte_ethdev.h> now seems required by <rte_eth_ctrl.h>
- rte_sched_port_pkt_write takes extra argument
- rte_sched_port_pkt_read_tree_path takes extra argument
- enum rte_meter_color replaced by rte_color
The extra argument, sched_port, is initialized based on qos_conf parameters.
Modes such as qinq_encap4 uses sched_port when doing classification, but does
not set qos_conf params. It inherits the sched_port from QoS
Change-Id: If8312918241e7d482161a7538f53faac6c303e86
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/prox_compat.h')
-rw-r--r-- | VNFs/DPPD-PROX/prox_compat.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/prox_compat.h b/VNFs/DPPD-PROX/prox_compat.h index e1ead1d3..5191b859 100644 --- a/VNFs/DPPD-PROX/prox_compat.h +++ b/VNFs/DPPD-PROX/prox_compat.h @@ -13,6 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. */ + +#ifndef _PROX_COMPAT_H_ +#define _PROX_COMPAT_H_ #include <rte_common.h> #include <rte_table_hash.h> #include <rte_hash_crc.h> @@ -130,6 +133,19 @@ static void *prox_rte_table_create(struct prox_rte_table_params *params, int soc #define DEV_RX_OFFLOAD_JUMBO_FRAME 0x00000800 #endif +#if RTE_VERSION < RTE_VERSION_NUM(19,2,0,0) +#define RTE_COLOR_GREEN e_RTE_METER_GREEN +#define RTE_COLOR_YELLOW e_RTE_METER_YELLOW +#define RTE_COLOR_RED e_RTE_METER_RED +#define prox_rte_color rte_meter_color +#define prox_rte_sched_port_pkt_read_tree_path(A,B,C,D,E,F) rte_sched_port_pkt_read_tree_path(B,C,D,E,F) +#define prox_rte_sched_port_pkt_write(A,B,C,D,E,F,G) rte_sched_port_pkt_write(B,C,D,E,F,G); +#else +#define prox_rte_color rte_color +#define prox_rte_sched_port_pkt_read_tree_path(A,B,C,D,E,F) rte_sched_port_pkt_read_tree_path(A,B,C,D,E,F) +#define prox_rte_sched_port_pkt_write(A,B,C,D,E,F,G) rte_sched_port_pkt_write(A,B,C,D,E,F,G); +#endif + static inline char *prox_strncpy(char * dest, const char * src, size_t count) { #pragma GCC diagnostic push @@ -140,3 +156,4 @@ static inline char *prox_strncpy(char * dest, const char * src, size_t count) PROX_PANIC(dest[count - 1] != 0, "\t\tError in strncpy: buffer overrun (%lu bytes)", count); return dest; } +#endif // _PROX_COMPAT_H |