summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/prox_compat.h
AgeCommit message (Collapse)AuthorFilesLines
2022-12-28Fix tons of deprecation warningsXavier Simonart1-10/+374
reported since DPDK 20.11, 21.05, 21.11 and 22.03, and turned into undeclared symbol errors with DPDK 22.11. Signed-off-by: Xavier Simonart <simonartxavier@gmail.com> Signed-off-by: Patrice Buriez <patrice.buriez@chenapan.org> Change-Id: Ice9a0f662ee057211984f799010701cd81e5a4d0
2022-12-26Add initial support for DPDK 21.11Xavier Simonart1-1/+10
Note that this patch simplistically removes some PROX features, because they are not directly supported anymore by DPDK, since rte_eth_devices is now private: - reading and writing NIC register through PROX command line - querying ixgbe HW statistics instead of getting them from DPDK Also adjusted to following DPDK changes: * struct rte_ether_hdr fields renamed: - d_addr -> dst_addr - s_addr -> src_addr * struct rte_eth_rxmode field renamed: - max_rx_pkt_len -> mtu * --master-lcore -> --main-lcore Signed-off-by: Xavier Simonart <simonartxavier@gmail.com> Signed-off-by: Patrice Buriez <patrice.buriez@chenapan.org> Change-Id: I08445b3dd0f7fe471d9bc7cfb557bd3aeb2f50be
2020-05-29Fix compilation issues on old DPDKXavier Simonart1-1/+23
Also fixed minor issues such as - prevent using vdev on DPDK <= 17.05 as not supported - potential segmentation fault after panic (if panic thrown early in prox initialization) Change-Id: I49a1962e95a4a44dddadd1fdd906e1b3b232465c Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2020-05-29Added initial support for NDP (IPv6)Xavier Simonart1-11/+2
Following messages are now handled by PROX - router_solicitation - neighbour_solicitation - router_advertisement - neighbour_advertisement The following parameters are supported (through the PROX config file) - sub mode=ndp This will enable handling of router and neighbour solicitation and advertisement. - local ipv6=xxxx:xxxx:xxxxx:xxxx:xxxx:xxxx:xxxx:xxxx This will configure the local IPv6 address of the port. This parameter is optional. If not specified, the local IPv6 will be calculated from the EUI. - global ipv6=xxxx:xxxx:xxxxx:xxxx:xxxx:xxxx:xxxx:xxxx This will configure the global IPv6 address of the port. This parameter is optional. If not specified, the global IPv6 will be calculated from the EUI and the router prefix received from the router. - ipv6 router=yes This will cause the core to behave as an IPv6 router i.e. it will generate Router Advertisement messages This is only useful in back to back cases, when no real IPv6 router is present in the setup. - router prefix=xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx The router prefix usedin the router advertisement The prefix will be used by the node to build an IPv6 global address in cases none were configured. "Unsollicited NA" parameter has been added within the core/task section. If set to yes (Unsollicited NA=yes), then an unsollicited neighbour Advertisement is sent at startup A same core/task cannot support both l3 and ndp mode. Those messages will be generated or handled when submode is set to "ndp": - neighbour sollicitation - neighbour advertisement - router sollicitation - router advertisement An example configuration is provided: config/ipv6.cfg in which port 0 / core 1 plays the role of the generator and port 1 / core 2 plays the role of the swap. Change-Id: Id0ab32d384448b4cf767fb4a1c486fc023f4f395 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2020-05-29Added initial support for BGPXavier Simonart1-0/+6
Through this commit BGP messages are forwarded to tap device Netlink messages are enabled to receive route Updates. In addition, generating tasks can also specify a routing table which will be used when sending packets The routes initialized by the routing table can be changed through the reception of BGP messages Change-Id: I187ba9a921885cbc9b209aae5fb654309e3388b8 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2020-05-29Added support for netlinkXavier Simonart1-1/+9
Through this commit ARP and ICMP messages are forwarded to the kernel when vdev tap devices are enabled, as well as PROX l3 mode. ICMP support has also been added to master (i.e. PROX L3 mode) and to swap (so when L3 submode is not enabled). Change-Id: Ie6bf52cbae7171bfca041ff18651d4ec866f44cd Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2020-04-20Added support for DPDK 19.11Xavier Simonart1-0/+6
Change-Id: I58fa7a0ab7aaa27e9f9383f7995bb71bf0952618 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2020-01-29Added support for DPDK 19.08Xavier Simonart1-2/+38
Change-Id: I090bf8f1cd5a5d2dfa4f336bc66c46cc03d6c5bb Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2020-01-29Prepare for DPDK 19.08 supportXavier Simonart1-1/+27
This commit prepares PROX for supporting changes from DPDK 19.08 Mainly, the "sed" listed below were run. In addition, - some forward definition have been removed, - prox_compat.h has been updated - prox_compat.h has been included where necessary. Hence such a commit is rather easy to review and to reapply on other branches if necessary. sed -i 's/struct ether_hdr/prox_rte_ether_hdr/g' *.h sed -i 's/struct ether_hdr/prox_rte_ether_hdr/g' *.c sed -i 's/struct ether_addr/prox_rte_ether_addr/g' *.c sed -i 's/struct ether_addr/prox_rte_ether_addr/g' *.h sed -i 's/prox_rte_ether_addr_port/struct ether_addr_port/g' *.c sed -i 's/prox_rte_ether_addr_port/struct ether_addr_port/g' *.h sed -i 's/struct vlan_hdr/prox_rte_vlan_hdr/g' *.c sed -i 's/struct vlan_hdr/prox_rte_vlan_hdr/g' *.h sed -i 's/struct ipv4_hdr/prox_rte_ipv4_hdr/g' *.h sed -i 's/struct ipv4_hdr/prox_rte_ipv4_hdr/g' *.c sed -i 's/struct ipv6_hdr/prox_rte_ipv6_hdr/g' *.c sed -i 's/struct ipv6_hdr/prox_rte_ipv6_hdr/g' *.h sed -i 's/struct udp_hdr/prox_rte_udp_hdr/g' *.c sed -i 's/struct udp_hdr/prox_rte_udp_hdr/g' *.h sed -i 's/struct tcp_hdr/prox_rte_tcp_hdr/g' *.c sed -i 's/struct tcp_hdr/prox_rte_tcp_hdr/g' *.h sed -i 's/struct prox_rte_ether_addr_copy/ether_addr_copy/g' *.c sed -i 's/struct prox_rte_ether_addr_copy/ether_addr_copy/g' *.h sed -i 's/struct prox_rte_ether_addr_copy/prox_rte_ether_addr_copy/g' *.c sed -i 's/struct prox_rte_ether_addr_copy/ether_addr_copy/g' *.h sed -i 's/prox_rte_ether_addr_copy/ether_addr_copy/g' *.h sed -i 's/prox_rte_ether_addr_copy/ether_addr_copy/g' *.c sed -i 's/ether_addr_copy/prox_rte_ether_addr_copy/g' *.c sed -i 's/ether_addr_copy/prox_rte_ether_addr_copy/g' *.h sed -i 's/prox_rte_ether_hdr_arp/struct ether_hdr_arp/g' *.h sed -i 's/prox_rte_ether_hdr_arp/struct ether_hdr_arp/g' *.c sed -i 's/struct vxlan_gpe_hdr/prox_rte_vxlan_gpe_hdr/g' *.h sed -i 's/struct vxlan_gpe_hdr/prox_rte_vxlan_gpe_hdr/g' *.c sed -i 's/eth_random_addr/prox_rte_eth_random_addr/g' *.c sed -i 's/eth_random_addr/prox_rte_eth_random_addr/g' *.h sed -i 's/ETHER_CRC_LEN/PROX_RTE_ETHER_CRC_LEN/g' *.c sed -i 's/ETHER_CRC_LEN/PROX_RTE_ETHER_CRC_LEN/g' *.h sed -i 's/ETHER_HDR_LEN/PROX_RTE_ETHER_HDR_LEN/g' *.c sed -i 's/ETHER_HDR_LEN/PROX_RTE_ETHER_HDR_LEN/g' *.h sed -i 's/ETHER_MAX_LEN/PROX_RTE_ETHER_MAX_LEN/g' *.c sed -i 's/ETHER_MAX_LEN/PROX_RTE_ETHER_MAX_LEN/g' *.h sed -i 's/ETHER_MIN_LEN/PROX_RTE_ETHER_MIN_LEN/g' *.c sed -i 's/ETHER_MIN_LEN/PROX_RTE_ETHER_MIN_LEN/g' *.h sed -i 's/TCP_SYN_FLAG/PROX_RTE_TCP_SYN_FLAG/g' *.c sed -i 's/TCP_RST_FLAG/PROX_RTE_TCP_RST_FLAG/g' *.c sed -i 's/TCP_FIN_FLAG/PROX_RTE_TCP_FIN_FLAG/g' *.c sed -i 's/TCP_ACK_FLAG/PROX_RTE_TCP_ACK_FLAG/g' *.c Change-Id: I4dfe8be68e618c94dcaae28754579fbeb571bb00 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-10-23Added support for DPDK 19.05 / IPSecXavier Simonart1-0/+32
Note that since 6073b359 (April 2018) IPsec PROX support requires at least DPDK 17.11. Hence README has been updated. Change-Id: I34b7a968c16db5c3a3fc7bb6af111fdb49ad6b91 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-10-17Fix support for old DPDK (such as 16.04)Xavier Simonart1-0/+6
When support for DPDK 18.05 was added it prevented supporting some much older DPDK such as 16.04. This has been fixed. Change-Id: Idd7ddd7e485c54c41def0540b8c126c097a05941 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-10-10Update PROX to CRC STRIP default bahavior change in DPDKXavier Simonart1-3/+0
Change-Id: I7c3e2981692d823c86787b77d61190327d6448e4 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2019-10-09Added support for DPDK 19.02 and 19.05Xavier Simonart1-0/+17
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>
2019-10-08Fix compatibility with GCC 6 and earlierXavier Simonart1-0/+1
fb0c44a fixed compilation on GCC 8 by using: 1) #pragma GCC diagnostic ignored "-Wstringop-truncation" 2) __attribute__ ((fallthrough)); However, -Wstringop-truncation has only been introduced in GCC 8 and __attribute__ ((fallthrough)) has only been introduced in GCC 7. Hence they caused Warnings/Errors on earlier versions. Comments about fallthough (see https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/) can be used on GCC 8 to prevent fall through warnings Signed-off-by: Xavier Simonart <xavier.simonart@intel.com> Change-Id: I6f22e023191bbf22d8b01f1812061795a6494134
2019-10-08Support for recent GCC compilerXavier Simonart1-0/+11
This is required for instance on gcc (GCC) 8.2.1 20180905 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com> Change-Id: Id86de5d39d77c5cbf168cc51434f436f84376a4c
2018-10-31Support for DPDK 18.05 and DPDK 18.08Xavier Simonart1-0/+11
Improve DPDK 18.05 support introduced by 3e532aca. Support for DPDK 18.08. Change-Id: Ide712ee94254b506a0ad88c95a7e01b789f99d48 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2018-01-04Add support for DPDK 17.11Xavier Simonart1-0/+119
Change-Id: I5611ead4b61b23d6c1c983852e8c75619e08ecf9 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>