> My port consists of mainly the implementation of sys_arch.c > and the interface to the ethernet chip (With a seperate rx > task, interrupt driven). After setting up the ethernet chip I > do the following operations to init lwip: > > IP4_ADDR(&gw, 192,168,1,11); > IP4_ADDR(&ipaddr, 192,168,1,34); > IP4_ADDR(&netmask, 255,255,255,0); > > sys_init(); > mem_init(); > memp_init(); > pbuf_init(); > netif_init(); > tcpip_init(NULL, NULL); > > netif_add(&nif, &ipaddr, &netmask, &gw, NULL, ethernetif_init, ip_input);
ip_input must not be used directly in multithreading environments. Because the core is not locked, it mustn't be accessed from multiple threads. Use tcpip_input() (or tcpip_ethinput() for new CVS code) instead. That makes sure RX frames are processed in tcpip_thread context, not in the context of the RX thread (or even interrupt context). > netif_set_default(&nif); > netif_set_up(&nif); > > Anything missing? Doesn't seem so. Simon _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
