Fixing IPv4/IPv6 flow distribution over LAG

- CRs-Fixed: 670013
- Adding a check in bridge post routing hook to correctly set
  'is_routed' flag when ingress physical interface is LAG slave.
- Using source and destination MAC addresses directly
  in case of bridged flows when constructing interface hierarchy.
- Adding ECM API to lookup ethernet interfaces based on MAC address and
  interface index set by operating system. This takes care of situations where
  multiple interfaces have same MAC address such as LAG slaves.

Change-Id: I5f414d1ace50b2d023e3b2fa38cd9d3f1fabdc04
Signed-off-by: Tushar Mathur <tushar@codeaurora.org>
diff --git a/ecm_db.h b/ecm_db.h
index 053a552..5d11529 100644
--- a/ecm_db.h
+++ b/ecm_db.h
@@ -120,7 +120,7 @@
 void ecm_db_iface_pppoe_session_info_get(struct ecm_db_iface_instance *ii, struct ecm_db_interface_info_pppoe *pppoe_info);
 void ecm_db_iface_vlan_info_get(struct ecm_db_iface_instance *ii, struct ecm_db_interface_info_vlan *vlan_info);
 
-struct ecm_db_iface_instance *ecm_db_iface_find_and_ref_ethernet(uint8_t *address);
+struct ecm_db_iface_instance *ecm_db_iface_ifidx_find_and_ref_ethernet(uint8_t *address, int32_t idx);
 struct ecm_db_iface_instance *ecm_db_iface_find_and_ref_lag(uint8_t *address);
 struct ecm_db_iface_instance *ecm_db_iface_find_and_ref_vlan(uint8_t *address, uint16_t vlan_tag, uint16_t vlan_tpid);
 struct ecm_db_iface_instance *ecm_db_iface_find_and_ref_bridge(uint8_t *address);