summaryrefslogtreecommitdiffstats
path: root/VNFs/vFW/pipeline
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2018-06-03 03:36:25 +0530
committerDeepak S <deepak.s@linux.intel.com>2018-06-29 17:47:56 +0530
commit0b9315e16642bc554427d47f20ee9ba8590fe625 (patch)
tree832992fdfb014c7e2aacb6875209a6e2a7cfa637 /VNFs/vFW/pipeline
parent56abe2d0604c519a911b91ec43e87889a2990361 (diff)
Temp Fix for vFW perf issue
Change-Id: I324fcac7a65c0d221d5d422f419deb9c0f864172 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Diffstat (limited to 'VNFs/vFW/pipeline')
-rw-r--r--VNFs/vFW/pipeline/pipeline_vfw_be.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/VNFs/vFW/pipeline/pipeline_vfw_be.c b/VNFs/vFW/pipeline/pipeline_vfw_be.c
index 71fd5cde..23e2aa04 100644
--- a/VNFs/vFW/pipeline/pipeline_vfw_be.c
+++ b/VNFs/vFW/pipeline/pipeline_vfw_be.c
@@ -1163,7 +1163,13 @@ static void vfw_fwd_pkts_ipv4(struct rte_mbuf **pkts, uint64_t *pkts_mask,
src_phy_port = pkt->port;
uint32_t dst_phy_port = INVALID_DESTIF;
- if(is_gateway()){
+ if(is_phy_port_privte(src_phy_port))
+ dst_phy_port = prv_to_pub_map[src_phy_port];
+ else
+ dst_phy_port = pub_to_prv_map[src_phy_port];
+
+
+ if(likely(is_gateway())){
struct ipv4_hdr *ipv4hdr = (struct ipv4_hdr *)
RTE_MBUF_METADATA_UINT32_PTR(pkt, IP_START);
@@ -1174,13 +1180,13 @@ static void vfw_fwd_pkts_ipv4(struct rte_mbuf **pkts, uint64_t *pkts_mask,
uint32_t nhip = 0;
uint32_t dst_ip_addr = rte_bswap32(ipv4hdr->dst_addr);
- gw_get_nh_port_ipv4(dst_ip_addr, &dst_phy_port, &nhip);
+ gw_get_route_nh_port_ipv4(dst_ip_addr, &dst_phy_port, &nhip, dst_phy_port);
ret_arp_data = get_dest_mac_addr_ipv4(nhip, dst_phy_port, &dst_mac);
/* Gateway Proc Ends */
- if (arp_cache_dest_mac_present(dst_phy_port)) {
+ if (likely(arp_cache_dest_mac_present(dst_phy_port))) {
ether_addr_copy(&dst_mac, &ehdr->d_addr);
ether_addr_copy(get_link_hw_addr(dst_phy_port), &ehdr->s_addr);
@@ -1221,11 +1227,6 @@ static void vfw_fwd_pkts_ipv4(struct rte_mbuf **pkts, uint64_t *pkts_mask,
}
} else {
/* IP Pkt forwarding based on pub/prv mapping */
- if(is_phy_port_privte(src_phy_port))
- dst_phy_port = prv_to_pub_map[src_phy_port];
- else
- dst_phy_port = pub_to_prv_map[src_phy_port];
-
meta_data_addr->output_port = vfw_pipe->outport_id[dst_phy_port];
if(VFW_DEBUG) {