Hi all,
I just run successful the lhttpd.lua example (http://wiki.eluaproject.net/lhttpd) on evk1100 board. Now I have to test and optimise it, in the meantime, I would like to make some comments: 1- I had an annoying problem using (as template) the "uip-conf.h" file coming from "little endian" architectures, they define UIP_CONF_BYTE_ORDER = LITTLE_ENDIAN, but the LITTLE_ENDIAN (as well the BIG_ENDIAN) doesn't exist inside uip/uipopt.h they should define UIP_CONF_BYTE_ORDER = UIP_LITTLE_ENDIAN instead. 2- I need to have an additional parameter for platform_eth_send_packet() function: eg. void platform_eth_send_packet( const void* src, u32 size, u8 endframe ) the "endframe" could be a flag that indicate the last packet for the frame. Also the device_driver_send() function should become like this: static void device_driver_send() { if( uip_len <= TOTAL_HEADER_LENGTH ) platform_eth_send_packet( uip_buf, uip_len, TRUE); else { platform_eth_send_packet( uip_buf, TOTAL_HEADER_LENGTH, FALSE ); platform_eth_send_packet( ( u8* )uip_appdata, uip_len - TOTAL_HEADER_LENGTH, TRUE ); } } Please let me know about. Best regards, nuccio _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Hi,
On Sat, Feb 19, 2011 at 4:10 PM, Nuccio Raciti <[hidden email]> wrote: > Hi all, > > I just run successful the lhttpd.lua example > (http://wiki.eluaproject.net/lhttpd) > on evk1100 board. This is very good news! EVK1100 is the second board to get networking support in eLua. Congratulations! > 1- I had an annoying problem using (as template) the "uip-conf.h" file > coming from "little endian" architectures, they define > UIP_CONF_BYTE_ORDER = LITTLE_ENDIAN, > but the LITTLE_ENDIAN (as well the BIG_ENDIAN) doesn't > exist inside uip/uipopt.h they should define > UIP_CONF_BYTE_ORDER = UIP_LITTLE_ENDIAN instead. Thanks, I'll fix this. > 2- I need to have an additional parameter for platform_eth_send_packet() > function: > eg. > void platform_eth_send_packet( const void* src, u32 size, u8 endframe ) Can you elaborate on why you need the additional parameter? Best, Bogdan _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Hi Bogdan,
the "macb" device (of the avr32) is a sophisticated hardware able to receive packets from the network directly inside a pool of buffers (through a DMA), it is also able to send a buffer (up to 2048 bytes), by automatically including CRC and padding, once the buffer is full/ready. The problem is here: static void device_driver_send() { if( uip_len <= TOTAL_HEADER_LENGTH ) platform_eth_send_packet( uip_buf, uip_len); else { /******************************** HERE *******************************/ platform_eth_send_packet( uip_buf, TOTAL_HEADER_LENGTH); platform_eth_send_packet( ( u8* )uip_appdata, uip_len - TOTAL_HEADER_LENGTH); /********************************************************************/ } } the platform_eth_send_packet() can't know which is the call related to the full/ready buffer. I hope I was clear :-/ Ciao, Nuccio Il giorno dom, 20/02/2011 alle 02.18 +0200, Bogdan Marinescu ha scritto: > Hi, > > On Sat, Feb 19, 2011 at 4:10 PM, Nuccio Raciti <[hidden email]> wrote: > > Hi all, > > > > I just run successful the lhttpd.lua example > > (http://wiki.eluaproject.net/lhttpd) > > on evk1100 board. > > This is very good news! EVK1100 is the second board to get networking > support in eLua. Congratulations! > > > 1- I had an annoying problem using (as template) the "uip-conf.h" file > > coming from "little endian" architectures, they define > > UIP_CONF_BYTE_ORDER = LITTLE_ENDIAN, > > but the LITTLE_ENDIAN (as well the BIG_ENDIAN) doesn't > > exist inside uip/uipopt.h they should define > > UIP_CONF_BYTE_ORDER = UIP_LITTLE_ENDIAN instead. > > Thanks, I'll fix this. > > > 2- I need to have an additional parameter for platform_eth_send_packet() > > function: > > eg. > > void platform_eth_send_packet( const void* src, u32 size, u8 endframe ) > > Can you elaborate on why you need the additional parameter? > > Best, > Bogdan _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
I hate 'reply all'. Forwarding ...
---------- Forwarded message ---------- From: Bogdan Marinescu <[hidden email]> Date: Mon, Feb 21, 2011 at 4:26 PM Subject: Re: [eLua-dev] network support on avr32 To: [hidden email] On Sun, Feb 20, 2011 at 2:16 PM, Nuccio Raciti <[hidden email]> wrote: > Hi Bogdan, > > the "macb" device (of the avr32) is a sophisticated hardware able to > receive packets from the network directly inside a pool of buffers > (through a DMA), it is also able to send a buffer (up to 2048 bytes), by > automatically including CRC and padding, once the buffer is full/ready. > The problem is here: > > static void device_driver_send() > { > if( uip_len <= TOTAL_HEADER_LENGTH ) > platform_eth_send_packet( uip_buf, uip_len); > else > { > /******************************** HERE *******************************/ > platform_eth_send_packet( uip_buf, TOTAL_HEADER_LENGTH); > platform_eth_send_packet( ( u8* )uip_appdata, uip_len - > TOTAL_HEADER_LENGTH); > /********************************************************************/ > } > } > > the platform_eth_send_packet() can't know which is the call related to > the full/ready buffer. > > I hope I was clear :-/ You were clear, however I rememeber that the two calls above were split for a reason. uip_appdata is actually part of uip_buf: uip_appdata = &uip_buf[UIP_IPTCPH_LEN + UIP_LLH_LEN] (src/uip/uip.c) so in theory all data could be sent in a single call. Actually the two 'platform_eth_send_packets' calls above were combined in a single call IIRC, but for some reason this actually managed to SLOW down the stack (don't ask why, I don't rememebr right now :) Something that had to do with delayed ACKs I think). This happened quite a while ago though so I'm not sure anymore. Probably some simple testing could clarify it. I _think_ that after the split was implemented one application that became much more responsive was 'telnet' (with console over TCP/IP, of course). This can be tested easily probably. Best, Bogdan > Il giorno dom, 20/02/2011 alle 02.18 +0200, Bogdan Marinescu ha > scritto: >> Hi, >> >> On Sat, Feb 19, 2011 at 4:10 PM, Nuccio Raciti <[hidden email]> wrote: >> > Hi all, >> > >> > I just run successful the lhttpd.lua example >> > (http://wiki.eluaproject.net/lhttpd) >> > on evk1100 board. >> >> This is very good news! EVK1100 is the second board to get networking >> support in eLua. Congratulations! >> >> > 1- I had an annoying problem using (as template) the "uip-conf.h" file >> > coming from "little endian" architectures, they define >> > UIP_CONF_BYTE_ORDER = LITTLE_ENDIAN, >> > but the LITTLE_ENDIAN (as well the BIG_ENDIAN) doesn't >> > exist inside uip/uipopt.h they should define >> > UIP_CONF_BYTE_ORDER = UIP_LITTLE_ENDIAN instead. >> >> Thanks, I'll fix this. >> >> > 2- I need to have an additional parameter for platform_eth_send_packet() >> > function: >> > eg. >> > void platform_eth_send_packet( const void* src, u32 size, u8 endframe ) >> >> Can you elaborate on why you need the additional parameter? >> >> Best, >> Bogdan > > > eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
In reply to this post by Nuccio Raciti
Hi Bogdan,
for avr32 (I'm trying now on a mizar32 board) a single call to platform_eth_send_packet() runs fine probably now it is a bit more fast. So we need a common approach useful for all architectures... what do you think? Ciao, Nuccio Il giorno lun, 21/02/2011 alle 16.26 +0200, Bogdan Marinescu ha scritto: > On Sun, Feb 20, 2011 at 2:16 PM, Nuccio Raciti <[hidden email]> wrote: > > Hi Bogdan, > > > > the "macb" device (of the avr32) is a sophisticated hardware able to > > receive packets from the network directly inside a pool of buffers > > (through a DMA), it is also able to send a buffer (up to 2048 bytes), by > > automatically including CRC and padding, once the buffer is full/ready. > > The problem is here: > > > > static void device_driver_send() > > { > > if( uip_len <= TOTAL_HEADER_LENGTH ) > > platform_eth_send_packet( uip_buf, uip_len); > > else > > { > > /******************************** HERE *******************************/ > > platform_eth_send_packet( uip_buf, TOTAL_HEADER_LENGTH); > > platform_eth_send_packet( ( u8* )uip_appdata, uip_len - > > TOTAL_HEADER_LENGTH); > > /********************************************************************/ > > } > > } > > > > the platform_eth_send_packet() can't know which is the call related to > > the full/ready buffer. > > > > I hope I was clear :-/ > > You were clear, however I rememeber that the two calls above were > split for a reason. uip_appdata is actually part of uip_buf: > > uip_appdata = &uip_buf[UIP_IPTCPH_LEN + UIP_LLH_LEN] (src/uip/uip.c) > > so in theory all data could be sent in a single call. Actually the two > 'platform_eth_send_packets' calls above were combined in a single call > IIRC, but for some reason this actually managed to SLOW down the stack > (don't ask why, I don't rememebr right now :) Something that had to do > with delayed ACKs I think). This happened quite a while ago though so > I'm not sure anymore. Probably some simple testing could clarify it. > I _think_ that after the split was implemented one application that > became much more responsive was 'telnet' (with console over TCP/IP, of > course). This can be tested easily probably. > > Best, > Bogdan _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Non l'ho detto, ma ovviamente, GRANDE!
Ci ho battuto la testa per un po di mesi senza capirci na minchia M _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Hi Martin,
Please don't take this the wrong way, but I'd rather keep the eLua discussion list English only :) Best, Bogdan 2011/2/22 Martin Guy <[hidden email]>: > Non l'ho detto, ma ovviamente, GRANDE! > Ci ho battuto la testa per un po di mesi senza capirci na minchia > > M > _______________________________________________ > eLua-dev mailing list > [hidden email] > https://lists.berlios.de/mailman/listinfo/elua-dev > _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Sorry, it was meant for Nuccio and Sergio only but the list got copied. U are right. Trans: i didn't say so, but [you're] GREAT! Il giorno 22/feb/2011 18.52, "Bogdan Marinescu" <[hidden email]> ha scritto:
> Hi Martin, > > Please don't take this the wrong way, but I'd rather keep the eLua > discussion list English only :) > > Best, > Bogdan > > 2011/2/22 Martin Guy <[hidden email]>: >> Non l'ho detto, ma ovviamente, GRANDE! >> Ci ho battuto la testa per un po di mesi senza capirci na minchia >> >> M >> _______________________________________________ >> eLua-dev mailing list >> [hidden email] >> https://lists.berlios.de/mailman/listinfo/elua-dev >> _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
On Tue, Feb 22, 2011 at 9:20 PM, Martin Guy <[hidden email]> wrote:
> Sorry, it was meant for Nuccio and Sergio only but the list got copied. U > are right. > > Trans: i didn't say so, but [you're] GREAT! I subscribe to that. Very good job indeed. Best, Bogdan > Il giorno 22/feb/2011 18.52, "Bogdan Marinescu" <[hidden email]> > ha scritto: >> Hi Martin, >> >> Please don't take this the wrong way, but I'd rather keep the eLua >> discussion list English only :) >> >> Best, >> Bogdan >> >> 2011/2/22 Martin Guy <[hidden email]>: >>> Non l'ho detto, ma ovviamente, GRANDE! >>> Ci ho battuto la testa per un po di mesi senza capirci na minchia >>> >>> M >>> _______________________________________________ >>> eLua-dev mailing list >>> [hidden email] >>> https://lists.berlios.de/mailman/listinfo/elua-dev >>> > eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
In reply to this post by Martin Guy
On Tue, Feb 22, 2011 at 2:20 PM, Martin Guy <[hidden email]> wrote:
> Sorry, it was meant for Nuccio and Sergio only but the list got copied. U > are right. > > Trans: i didn't say so, but [you're] GREAT! > I beat my head against it for a few months but didn't understand a thing. Google translate is not as polite. _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Free forum by Nabble | Edit this page |