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, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Send lwip-users mailing list submissions to
[email protected]
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
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
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" <[EMAIL PROTECTED]>
Subject: [lwip-users] How much connects can I create? Now, I only can
creat 16 connects .
To: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>
Subject: [lwip-users] Re: tcp_receive bugfix - incoming segment is,
larger than the old segment
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
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" <[EMAIL PROTECTED]>
Subject: [lwip-users] lwip udp server
To: <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>
Subject: Re: [lwip-users] lwip udp server
To: Mailing list for lwIP users <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
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" <[EMAIL PROTECTED]>
Subject: [lwip-users] Hi everyone, need help on setting web server for
Spartan 3E Starter Kit
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>
Subject: [lwip-users] Ethernet Driver
To: Mailing list for lwIP users <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>
Subject: Re: [lwip-users] tcp_receive bugfix - incoming segment is
larger than the old segment.
To: [EMAIL PROTECTED]
Cc: Mailing list for lwIP users <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
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
> [email protected]
> 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
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users
End of lwip-users Digest, Vol 42, Issue 12
******************************************
/*
* Copyright (c) 2001, 2002 Swedish Institute of Computer Science.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY
* OF SUCH DAMAGE.
*
* This file is part of the lwIP TCP/IP stack.
*
* Author: Adam Dunkels <[EMAIL PROTECTED]>
*
*/
#ifndef __LWIPOPTS_H__
#define __LWIPOPTS_H__
#if 1
#define LWIP_DEBUG
#define DBG_MIN_LEVEL 0
#define DBG_TYPES_ON (DBG_ON | DBG_TRACE | DBG_STATE | DBG_FRESH | DBG_HALT)
#if 0
#define TCP_DEBUG DBG_OFF
#define TCP_QLEN_DEBUG DBG_OFF
#define TCP_OUTPUT_DEBUG DBG_ON
#define TCP_RTO_DEBUG DBG_ON
#define TCP_FR_DEBUG DBG_ON
#define TCP_CWND_DEBUG DBG_ON
#define TCP_WND_DEBUG DBG_ON
#define TCP_RST_DEBUG DBG_ON
#endif
#if 1
#define LINK_STATS 1
#define IP_STATS 1
#define IPFRAG_STATS 1
#define ICMP_STATS 1
#define UDP_STATS 1
#define TCP_STATS 1
#define MEM_STATS 1
#define MEMP_STATS 1
#define PBUF_STATS 1
#define SYS_STATS 1
#define RAW_STATS 1
#define LWIP_STATS_DISPLAY 1
#endif
#define MEM_DEBUG DBG_ON
#define MEMP_DEBUG DBG_ON
#if 0
#define TCP_INPUT_DEBUG DBG_ON
#define RAW_DEBUG DBG_OFF
#define PBUF_DEBUG DBG_OFF
#endif
#endif
//efine SO_REUSE 1
#define NO_SYS 0
#define LWIP_CALLBACK_API 1
#define LWIP_DHCP 0
#define SYS_LIGHTWEIGHT_PROT 1
/* #define TCP_TMR_INTERVAL 250 */
#define TCP_TMR_INTERVAL 250
/* ---------- Memory options ---------- */
/* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
byte alignment -> define MEM_ALIGNMENT to 2. */
/* tried 4 byte alignment, but that seems to cause problems with pbuf
* routines */
#define MEM_ALIGNMENT 4
/* MEM_SIZE: the size of the heap memory. If the application will send
a lot of data that needs to be copied, this should be set high. */
#define MEM_SIZE 1024*110
/* The following four are used only with the sequential API and can be
set to 0 if the application only will use the raw API. */
/* MEMP_NUM_NETBUF: the number of struct netbufs. */
#define MEMP_NUM_NETBUF 2*10
/* MEMP_NUM_NETCONN: the number of struct netconns. */
#define MEMP_NUM_NETCONN 4+14//¿ØÖÆÔÚ15¸öÁ¬½ÓÒÔÄÚ
#define MEMP_NUM_TCP_PCB 5*10
/* MEMP_NUM_APIMSG: the number of struct api_msg, used for
communication between the TCP/IP stack and the sequential
programs. */
#define MEMP_NUM_API_MSG 16
/* MEMP_NUM_TCPIPMSG: the number of struct tcpip_msg, which is used
for sequential API communication and incoming packets. Used in
src/api/tcpip.c. */
#define MEMP_NUM_TCPIP_MSG 16*10
#define MEMP_NUM_SYS_TIMEOUT 3+2
#define PBUF_POOL_SIZE 16*32
#define PBUF_POOL_BUFSIZE 128
#define PBUF_LINK_HLEN 14
#define TCP_MSS 1460
/* TCP_SND_BUF should be less than or equal to MEMP_NUM_TCP_SEG *
* TCP_MSS otherwise the system will not be able to allocate enough
* tcp_segs to transmit all the data and will return ERR_MEM when
* attempting to transmit large amounts of data. You want to guarantee
* that there are more tcp_segs than there is memory. Each segment
* is equal to TCP_MSS.
*/
#define MEMP_NUM_TCP_SEG 255
#define TCP_WND 2048
#define TCP_SND_BUF (MEMP_NUM_TCP_SEG-1) * TCP_MSS
#define LWIP_MAX_QS 20*10 /* Max. LwIP queues */
#endif /* __LWIPOPTS_H__ */
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users