loopif: disable checksums

This disable checksum generation and checking for the loopback netif
when LWIP_CHECKSUM_CTRL_PER_NETIF is enabled

Checksums are not needed for the loopback adapter and this will increase
performance for loopback communication
This commit is contained in:
Joel Cunningham 2018-04-27 16:54:01 -05:00
parent a445172661
commit 070e449690

View File

@ -166,6 +166,7 @@ netif_loopif_init(struct netif *netif)
#if LWIP_LOOPIF_MULTICAST
netif_set_flags(netif, NETIF_FLAG_IGMP);
#endif
NETIF_SET_CHECKSUM_CTRL(netif, NETIF_CHECKSUM_DISABLE_ALL);
return ERR_OK;
}
#endif /* LWIP_HAVE_LOOPIF */