@danielchen thank u so much for the quick response.
If I call struct netif * netif_get_by_index(u8_t idex) from my task the execution gets aborted at sys_assert. Same is the case with netif_find. Exception occurs from LWIP_ASSERT_CORE_LOCKED();
I can use below APIs
unsigned int
lwip_if_nametoindex(const char *ifname)
char *
lwip_if_indextoname(unsigned int ifindex, char *ifname)