Hi Paul,
Assuming any required hardware related locking is performed when reading and writing frames to your HW, there should be no additional locking requirements as far as lwIP is concerned. 1. The low_level_output() function is called by lwIP's tcpip thread 2. The Rx worker task eventually calls netif->input() to feed lwIP with the new frame. Assuming your call to netif_add() uses tcpip_input as its last parameter, there is no need for additional locking (the frames are simply posted into an mbox which is inherently protected) HTH. Disclaimer: I have not used lwIP in an embedded environment. I try to help where I can, but my statements are by no means definitive. On 8/12/2010 10:15, Paul Archer wrote: >> That's correct. lwIP does not check or creat the FCS, nor does it care for >> padding. Both have to be handled by the driver or hardware (as do many MACs >> I know). > Thanks for confirming this. It allowed me to be confident I had some > other problems. (I am set up sending and receiving packets now) > > I have a follow up question, now that I am sending and receiving > packets, I am wondering what sort of locking I need to provide on my > driver. Can two threads enter into the low_level() functions? (I am > running lwip with an OS, with a socket based model, and I am using an > Ethernet RX worker task that will run after an RX interrupt) > > I think this should be added to the documentation as the description > about the length of packets is rather slim. I don't mind editing the > wiki if no one has objections. > > Regards Paul > >> Simon >> -- >> Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief! >> Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail >> >> _______________________________________________ >> lwip-users mailing list >> [email protected] >> http://lists.nongnu.org/mailman/listinfo/lwip-users >> > > -- Yoav Nissim Software Engineer, Software Tools Division Jungo Software Technologies Email: [email protected] Web: http://www.jungo.com Phone: +972-74-7212138 Fax: +972-74-7212122 Mobile: +972-54-2271315 _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
