diff options
author | Deepak S <deepak.s@linux.intel.com> | 2018-06-03 03:36:25 +0530 |
---|---|---|
committer | Deepak S <deepak.s@linux.intel.com> | 2018-06-03 03:36:41 +0530 |
commit | 552f5992678ad6a226e0c8216eafed9a795c96ee (patch) | |
tree | c147df2c02ee1dbaafe04117cc62e9679639e688 /common/VIL/gateway/gateway.c | |
parent | b18290d21a28cabbb8b7a31b9c54b7c30e62ec19 (diff) |
Temp Fix for vFW perf issue
Change-Id: I324fcac7a65c0d221d5d422f419deb9c0f864172
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Diffstat (limited to 'common/VIL/gateway/gateway.c')
-rw-r--r-- | common/VIL/gateway/gateway.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/common/VIL/gateway/gateway.c b/common/VIL/gateway/gateway.c index baf22cf5..7ec3c68f 100644 --- a/common/VIL/gateway/gateway.c +++ b/common/VIL/gateway/gateway.c @@ -122,29 +122,16 @@ uint32_t is_gateway(void) */ void gw_get_nh_port_ipv4(uint32_t dst_ip_addr, - uint32_t *dst_port, uint32_t *nhip) + uint32_t *dst_port, uint32_t *nhip) { - int i; uint32_t j; *nhip = 0; *dst_port = 0xff; - for(j = 0; j < gw_get_num_ports(); j++){ - - for (i = 0; i < p_route_data[j]->route_ent_cnt; i++) { - - if ((p_route_data[j]->route_table[i].nh_mask) == - (dst_ip_addr & - p_route_data[j]->route_table[i].mask)) { - - *dst_port = p_route_data[j]->route_table[i].port; - *nhip = p_route_data[j]->route_table[i].nh; - - lib_arp_nh_found++; - return; - } - } + for(j = 0; j < num_out_ports; j++) { + if (gw_get_route_nh_port_ipv4(dst_ip_addr, dst_port, nhip, j)) + return; } } |