[lwip-users] How much connects can I create? Now, I only can creat 16 connects .

0 views
Skip to first unread message

geckook Xu

unread,
Feb 9, 2007, 3:11:33 AM2/9/07
to lwip-...@nongnu.org
When I create the 17th connect, It is lag.

I use the socket.c API.

What can I do in the next step?

Arm7
I did not found the mem err and the program block in the lwip_read()
or lwip_write method.


_______________________________________________
lwip-users mailing list
lwip-...@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users

Kieran Mansley

unread,
Feb 9, 2007, 3:14:25 PM2/9/07
to Mailing list for lwIP users
On Fri, Feb 09, 2007 at 04:11:33PM +0800, geckook Xu wrote:
> When I create the 17th connect, It is lag.
>
> I use the socket.c API.
>
> What can I do in the next step?
>
> Arm7
> I did not found the mem err and the program block in the lwip_read()
> or lwip_write method.

Is this the 17th concurrent connection (i.e. do you close each
connection before opening the next one)? If you have 17 connections
open at the same time it sounds like you've got a resource limit: try
increasing the number of PCBs and other "per-connection" resources in
the lwipopts.h

Kieran

geckook Xu

unread,
Feb 10, 2007, 4:51:30 AM2/10/07
to lwip-...@nongnu.org
Yes ,there are 16 concurrent connections, and I want imporve the
lwip's ability of concurrent connecting.
There are my opt, Can you help me to point out the values which should
be increased.
I open the switch of state debug info,But I did not foung the mem error.

Yes ,I still don't know how to reply the message and let it display
just below the relative subject.
Thank you very much.


Kieran's reply:


Is this the 17th concurrent connection (i.e. do you close each
connection before opening the next one)? If you have 17 connections
open at the same time it sounds like you've got a resource limit: try
increasing the number of PCBs and other "per-connection" resources in
the lwipopts.h

Kieran


On 2/10/07, lwip-user...@nongnu.org <lwip-user...@nongnu.org> wrote:
> Send lwip-users mailing list submissions to
> lwip-...@nongnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.nongnu.org/mailman/listinfo/lwip-users
> or, via email, send a message with subject or body 'help' to
> lwip-user...@nongnu.org
>
> You can reach the person managing the list at
> lwip-use...@nongnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of lwip-users digest..."
>
>
> Today's Topics:
>
> 1. How much connects can I create? Now, I only can creat 16
> connects . (geckook Xu)
> 2. Re: tcp_receive bugfix - incoming segment is, larger than the
> old segment (Oleg Tychev)
> 3. lwip udp server (Andrea Visinoni)
> 4. Re: lwip udp server (?a?lar AKY?Z)
> 5. Hi everyone, need help on setting web server for Spartan 3E
> Starter Kit (Jian Rong @ Makoto)
> 6. Ethernet Driver (Robert Morse)
> 7. Re: tcp_receive bugfix - incoming segment is larger than the
> old segment. (Jonathan Larmour)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 9 Feb 2007 16:11:33 +0800
> From: "geckook Xu" <gec...@gmail.com>
> Subject: [lwip-users] How much connects can I create? Now, I only can
> creat 16 connects .
> To: lwip-...@nongnu.org
> Message-ID:
> <501622b60702090011o25...@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed


>
> When I create the 17th connect, It is lag.
>
> I use the socket.c API.
>
> What can I do in the next step?
>
> Arm7
> I did not found the mem err and the program block in the lwip_read()
> or lwip_write method.
>
>
>
>

> ------------------------------
>
> Message: 2
> Date: Fri, 09 Feb 2007 10:56:25 +0100
> From: Oleg Tychev <o.ty...@hima.com>
> Subject: [lwip-users] Re: tcp_receive bugfix - incoming segment is,
> larger than the old segment
> To: lwip-...@nongnu.org
> Message-ID: <45CC4549...@hima.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hello All,
>
> after review my own fix, I find out, that it was wrong:)
> There is new one.
>
> Oleg Tychev
>
> Here is patch against version lwip-1.2.0
>
>
>
>
>
> --
>
> HIMA Paul Hildebrandt GmbH + Co KG, Postfach 12 61, 68777 Bruehl bei Mannheim
> Kommanditgesellschaft, Sitz Bruehl, Deutschland - Registergericht Mannheim HRA 10 17 S
> Ust-ID: DE 144286400, St.Nr: 43038 00190
>
> Persoenlich haftende Gesellschafterin Paul Hildebrandt Verwaltungsgesellschaft mbH,
> Sitz Bruehl, Deutschland - Registergericht Mannheim HRB 05 88 S -
>
> Geschaeftsfuehrer: Dipl.-Betriebswirt Steffen Philipp, Dipl.-Kfm. Peter Swiczinsky
>
> -------------- next part --------------
> *** lwip-1.2.0/src/core/tcp_in.c Fri Aug 18 13:18:42 2006
> --- lwip-1.2.0/src/core/tcp_in_fix.c Fri Feb 9 10:41:34 2007
> ***************
> *** 1052,1073 ****
> --- 1052,1082 ----
> /* The incoming segment is larger than the old
> segment. We replace the old segment with the new
> one. */
> cseg = tcp_seg_copy(&inseg);
> if (cseg != NULL) {
> cseg->next = next->next;
> if (prev != NULL) {
> prev->next = cseg;
> } else {
> pcb->ooseq = cseg;
> }
> + tcp_seg_free(next);
> + if (cseg->next != NULL) {
> + next = cseg->next;
> + if (TCP_SEQ_GT(seqno + cseg.len, next->tcphdr->seqno)) {
> + /* We need to trim the incoming segment. */
> + cseg.len = next->tcphdr->seqno - seqno;
> + pbuf_realloc(cseg.p, cseg.len);
> + }
> + }
> }
> break;
> } else {
> /* Either the lenghts are the same or the incoming
> segment was smaller than the old one; in either
> case, we ditch the incoming segment. */
> break;
> }
> } else {
>
> ------------------------------
>
> Message: 3
> Date: Fri, 9 Feb 2007 13:41:07 +0100
> From: "Andrea Visinoni" <a.vis...@autron.it>
> Subject: [lwip-users] lwip udp server
> To: <lwip-...@nongnu.org>
> Message-ID: <000701c74c47$922d4da0$0e02000a@autron5>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
> reply-type=original
>
> Hi all,
> i'm trying to develop an udp server over an AT91SAM7X-EK board, and i've
> some problems.
> First of all, tcp is working correctly, and if i ping my board it replys,
> i've already done a tcp server and it works.
> Is there an example about udp server or udp usage?
> Thanks
> Andrea
>
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 09 Feb 2007 15:01:32 +0200
> From: ?a?lar AKY?Z <cag...@bilkon-kontrol.com.tr>
> Subject: Re: [lwip-users] lwip udp server
> To: Mailing list for lwIP users <lwip-...@nongnu.org>
> Message-ID: <45CC70A...@bilkon-kontrol.com.tr>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> Andrea Visinoni wrote:
> > Hi all,
> Hi,
> > i'm trying to develop an udp server over an AT91SAM7X-EK board, and
> > i've some problems.
> > First of all, tcp is working correctly, and if i ping my board it
> > replys, i've already done a tcp server and it works.
> > Is there an example about udp server or udp usage?
> > Thanks
> > Andrea
> Here is my working UDP server on SAM7X(on a FREERTOS port). After
> bringing up a mac interface you can init connection. In this example,
> only connections from a predefined IP address is accepted. This is not
> neccessary.
>
> Regards
> Caglar AKYUZ
>
> void init()
> {
> /* create a new UDP connection */
> listen_pc = netconn_new( NETCONN_UDP );
>
> /* set up the IP address of the remote host. This is one is
> 192.168.2.7.
> * this is not that much neccessary.
> */
> addr.addr = htonl(( 192 << 24 ) | ( 168 << 16 ) | ( 100 << 8 ) | (
> 7 << 0 ));
>
> /* connect the connection to the remote host */
> netconn_connect(listen_pc, &addr, 15000 );
>
> /* Make datagram_recved callback function and bind to the local port
> * When there is a packet recved from the network our datagram_recved
> * function will be called.
> */
> udp_recv( listen_pc->pcb.udp, datagram_recved, NULL );
> netconn_bind( listen_pc , NULL , 33333 );
>
> /* create a new netbuf. This buffer is for referencing ethernet data. */
> buf = netbuf_new();
> /* Reference the request data into net_buf */
> netbuf_ref( buf , (int *)some_data_pointer ,
> some_data_length_in_bytes );
> /* Then send the datagram */
> netconn_send( listen_pc , buf );
> }
>
> void datagram_recved(void *arg, struct udp_pcb *pcb, struct pbuf *p,
> struct ip_addr *addr, u16_t port)
> {
>
> /* Supress compiler warnings */
> ( void ) arg;
> ( void ) addr;
> ( void ) port;
>
> /* Do something with the pbuf */
>
> /* Don't forget to free buffer */
> pbuf_free(p);
> }
>
>
>
>
> ------------------------------
>
> Message: 5
> Date: Fri, 9 Feb 2007 05:08:01 -0800 (PST)
> From: "Jian Rong @ Makoto" <jianron...@yahoo.com>
> Subject: [lwip-users] Hi everyone, need help on setting web server for
> Spartan 3E Starter Kit
> To: lwip-...@nongnu.org
> Message-ID: <71659.1...@web33304.mail.mud.yahoo.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear everyone,
>
> I am currently using the Xilinx Spartan 3E Starter Kit ( equipped with Spartan 3E500 processor) to set up a web server based on the Application Design Example ( that uses Spartan 3E1600). I have actually changed the System UCF(User Constraints File) and also the System Hardware (.MHS file) according to Spartan 3E Starter Kit user guide, I could run the example so far until I could enter the IP address, Subnet Mask and Gateway. I also change the PC IP address so that it is in the same subnet as the Web Server ( the Spartan Kit). Then, the settting up of Server Netif and also the Sockets seems to be successful, and it shows the message " HTTP server receiving incoming connection on port 80". But when I tried to ping the webserver IP address, or tried to surf at the Internet browser by typing " http://xx.xx.xx.xx. (IP address of webserver), it fail to respond. I found out that the cable connecting the PC and webserver (Starter Kit) has the LED at the RJ45 unlit---
> which means my desktop could not detect a connection. I have downloaded the Files (index.html, 404.html, etc) into the StarterKit's file system (DDR memory).
>
> I have tried to run the memory test (C application generated by EDK) and peripheral test (C application), and for the memory test , the result output from the Hyperterminal seems to be ok for 32-bit, 16-bit and 8-bit. But for the peripheral test: It tested "PASSED" as a result for :
>
> The DIP switch, LED, RS232, and also it can run Polled mode Ethernet (non-interrupt), but when it comes to Ethernet Interrupt-Driven and also timer (which also has interrrupt), it jammed at the processing..... and it neither do show the "FAILURE" message.
>
> I dont know what is the problem.
>
> And also, when I tried to connect to a Laptop the Ethernet cable did lights up (the LED at the RJ45) and the Laptop can detect a connection ( Showing " Local Area Connection connected at 100Mps") even when I have not dowloaded the software files into the board. But when I connect to the Desktop that I have been using all this while, it didn't detect a connection (Still shows " Local Area Network cable unplugged" ).
>
> I am not sure , could it be the driver of my Network Card? Does it means that my network card could not support the connection?
>
> Please enlighten me . Thank you very much.
>
>
> Yours sincerely,
> Jian Rong @ Makoto
> http://www.amtfpureland.com.cn/
> http://buddha.goodweb.cn/music/music1.htm
>
>
>
>
>
>
> ---------------------------------
> TV dinner still cooling?
> Check out "Tonight's Picks" on Yahoo! TV.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.gnu.org/pipermail/lwip-users/attachments/20070209/da482898/attachment.html
>
> ------------------------------
>
> Message: 6
> Date: Fri, 9 Feb 2007 08:17:32 -0500
> From: Robert Morse <rmo...@weldtechcorp.com>
> Subject: [lwip-users] Ethernet Driver
> To: Mailing list for lwIP users <lwip-...@nongnu.org>
> Message-ID: <b615a5dfa5b5a1c0...@medar.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> Hi,
> Could anyone tell me if they have done a driver
> for a Am79C760 (lance) ethernet driver? I am looking
> at porting the LwIP to a Turbo 80186 processor with
> an embedded Am79C760 ethernet chip. Before I embark
> on such a project, I just thought I would ask if
> anyone had already done it.
>
> Robert Morse
>
>
>
>
>
> ------------------------------
>
> Message: 7
> Date: Fri, 09 Feb 2007 16:42:06 +0000
> From: Jonathan Larmour <ji...@eCosCentric.com>
> Subject: Re: [lwip-users] tcp_receive bugfix - incoming segment is
> larger than the old segment.
> To: o.ty...@hima.com
> Cc: Mailing list for lwIP users <lwip-...@nongnu.org>
> Message-ID: <45CCA45E...@eCosCentric.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> It looks like this patch hasn't been picked up. Can you submit it to
> https://savannah.nongnu.org/patch/?group=lwip please to be sure a developer
> (I'm not one) can act on it? Thanks.
>
> Jifl
>
> Oleg Tychev wrote:
> > Hello, All!
> >
> > I see on this code fragment in function tcp_receive
> > if (inseg.len > next->len) {
> > /* The incoming segment is larger than the old
> > segment. We replace the old segment with the new
> > one. */
> > cseg = tcp_seg_copy(&inseg);
> > if (cseg != NULL) {
> > cseg->next = next->next;
> > if (prev != NULL) {
> > prev->next = cseg;
> > } else {
> > pcb->ooseq = cseg;
> > }
> > }
> > break;
> > } else {
> > and think it should have free function for "next"
> >
> > if (inseg.len > next->len) {
> > /* The incoming segment is larger than the old
> > segment. We replace the old segment with the new
> > one. */
> > cseg = tcp_seg_copy(&inseg);
> > if (cseg != NULL) {
> > cseg->next = next->next;
> > tcp_seg_free(next);
> > if (prev != NULL) {
> > prev->next = cseg;
> > } else {
> > pcb->ooseq = cseg;
> > }
> > }
> > break;
> > } else {
> >
> > Poka poka
> > -------------
> > Oleg Tychev


> >
> >
> >
> >
> > _______________________________________________
> > lwip-users mailing list
> > lwip-...@nongnu.org
> > http://lists.nongnu.org/mailman/listinfo/lwip-users
> >
>
>

> --
> eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
> Visit us at Embedded World 2007, N�rnberg, Germany, 13-15 Feb, Stand 11-336
> Company legal info, address and number: http://www.ecoscentric.com/legal
> ------["The best things in life aren't things."]------ Opinions==mine
>
>
>
>
> ------------------------------


>
> _______________________________________________
> lwip-users mailing list
> lwip-...@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>

> End of lwip-users Digest, Vol 42, Issue 12
> ******************************************
>

lwipopts.h
Reply all
Reply to author
Forward
0 new messages