summaryrefslogtreecommitdiffstats
path: root/common/VIL/l2l3_stack/lib_arp.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/VIL/l2l3_stack/lib_arp.c')
-rw-r--r--common/VIL/l2l3_stack/lib_arp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/VIL/l2l3_stack/lib_arp.c b/common/VIL/l2l3_stack/lib_arp.c
index d59f4b79..90bcc064 100644
--- a/common/VIL/l2l3_stack/lib_arp.c
+++ b/common/VIL/l2l3_stack/lib_arp.c
@@ -300,9 +300,9 @@ struct arp_entry_data *get_dest_mac_addr_ipv4(const uint32_t nhip,
/* as part of optimization we store mac address in cache
* & thus can be sent without having to retrieve
*/
- if (arp_cache_dest_mac_present(phy_port)) {
+ if (likely(arp_cache_dest_mac_present(phy_port))) {
x = get_local_cache_hw_addr(phy_port, nhip);
- if (!x) {
+ if (unlikely(!x)) {
printf("local copy of address not stored\n");
return NULL;
}
@@ -2496,7 +2496,7 @@ struct ether_addr *get_local_cache_hw_addr(uint8_t out_port, uint32_t nhip)
limit = p_arp_data->arp_local_cache[out_port].num_nhip;
for (i=0; i < limit; i++) {
tmp = p_arp_data->arp_local_cache[out_port].nhip[i];
- if (tmp == nhip) {
+ if (likely(tmp == nhip)) {
x = &p_arp_data->arp_local_cache[out_port].link_hw_laddr[i];
return x;
}