summaryrefslogtreecommitdiffstats
path: root/VNFs/vCGNAPT
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2018-06-29 06:53:05 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-06-29 06:53:05 +0000
commit95b73fd50f4a5bbd095c5e7291057a639e057716 (patch)
treed08016ae3ebdb62996890f5adbfe6986ad4a93b4 /VNFs/vCGNAPT
parentf9b2f62739b38b65195ff44e4a47ac310407ac49 (diff)
parent0b35af460f2ebb480fa1cdc46c69956be117cfa7 (diff)
Merge "TempFix: vCGNAPT/vACL ipv4 perf issue"
Diffstat (limited to 'VNFs/vCGNAPT')
-rw-r--r--VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c40
1 files changed, 25 insertions, 15 deletions
diff --git a/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c b/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c
index a1779aa0..a5f9e4ef 100644
--- a/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c
+++ b/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c
@@ -1972,8 +1972,9 @@ static int cgnapt_in_port_ah_mix(struct rte_pipeline *rte_p,
struct arp_entry_data *ret_arp_data = NULL;
uint32_t src_phy_port = *src_port;
- gw_get_nh_port_ipv4(dest_address,
- &dest_if, &nhip);
+ dest_if = prv_to_pub_map[src_phy_port];
+ gw_get_route_nh_port_ipv4(dest_address,
+ &dest_if, &nhip, dest_if);
if (dest_if == INVALID_DESTIF) {
p_nat->invalid_packets |=
@@ -2218,9 +2219,9 @@ static int cgnapt_in_port_ah_mix(struct rte_pipeline *rte_p,
struct arp_entry_data *ret_arp_data = NULL;
dest_if = INVALID_DESTIF;
uint32_t src_phy_port = *src_port;
-
- gw_get_nh_port_ipv4(dest_address,
- &dest_if, &nhip);
+ dest_if = pub_to_prv_map[src_phy_port];
+ gw_get_route_nh_port_ipv4(dest_address,
+ &dest_if, &nhip, dest_if);
if (dest_if == INVALID_DESTIF) {
p_nat->invalid_packets |=
@@ -3728,8 +3729,9 @@ pkt_work_cgnapt_ipv4_prv(
struct arp_entry_data *ret_arp_data = NULL;
uint32_t src_phy_port = *src_port;
-
- gw_get_nh_port_ipv4(dest_address, &dest_if, &nhip);
+ dest_if = prv_to_pub_map[src_phy_port];
+ gw_get_route_nh_port_ipv4(dest_address,
+ &dest_if, &nhip, dest_if);
ret_arp_data = get_dest_mac_addr_ipv4(nhip, dest_if,
(struct ether_addr *)eth_dest);
@@ -4082,7 +4084,10 @@ pkt_work_cgnapt_ipv4_pub(
uint32_t src_phy_port = *src_port;
- gw_get_nh_port_ipv4(dest_address, &dest_if, &nhip);
+
+ dest_if = pub_to_prv_map[src_phy_port];
+ gw_get_route_nh_port_ipv4(dest_address,
+ &dest_if, &nhip, dest_if);
ret_arp_data = get_dest_mac_addr_ipv4(nhip, dest_if,
(struct ether_addr *)eth_dest);
@@ -4530,8 +4535,9 @@ pkt4_work_cgnapt_ipv4_prv(
struct arp_entry_data *ret_arp_data = NULL;
uint64_t start, end;
uint32_t src_phy_port = *src_port;
-
- gw_get_nh_port_ipv4(dest_address, &dest_if, &nhip);
+ dest_if = prv_to_pub_map[src_phy_port];
+ gw_get_route_nh_port_ipv4(dest_address,
+ &dest_if, &nhip, dest_if);
ret_arp_data = get_dest_mac_addr_ipv4(nhip, dest_if,
(struct ether_addr *)eth_dest);
@@ -4900,8 +4906,9 @@ pkt4_work_cgnapt_ipv4_pub(
dest_address = entry->data.u.prv_ip;
struct arp_entry_data *ret_arp_data = NULL;
uint32_t src_phy_port = *src_port;
-
- gw_get_nh_port_ipv4(dest_address, &dest_if, &nhip);
+ dest_if = pub_to_prv_map[src_phy_port];
+ gw_get_route_nh_port_ipv4(dest_address,
+ &dest_if, &nhip, dest_if);
ret_arp_data = get_dest_mac_addr_ipv4(nhip, dest_if,
(struct ether_addr *)eth_dest);
@@ -6080,7 +6087,9 @@ pkt_work_cgnapt_ipv6_prv(
uint32_t src_phy_port = *src_port;
- gw_get_nh_port_ipv4(dest_address, &dest_if, &nhip);
+ dest_if = prv_to_pub_map[src_phy_port];
+ gw_get_route_nh_port_ipv4(dest_address,
+ &dest_if, &nhip, dest_if);
ret_arp_data = get_dest_mac_addr_ipv4(nhip, dest_if,
(struct ether_addr *)eth_dest);
@@ -6570,8 +6579,9 @@ pkt4_work_cgnapt_ipv6_prv(
{
struct arp_entry_data *ret_arp_data;
uint32_t src_phy_port = *src_port;
-
- gw_get_nh_port_ipv4(dest_address, &dest_if, &nhip);
+ dest_if = prv_to_pub_map[src_phy_port];
+ gw_get_route_nh_port_ipv4(dest_address,
+ &dest_if, &nhip, dest_if);
ret_arp_data = get_dest_mac_addr_ipv4(nhip, dest_if,
(struct ether_addr *)eth_dest);