Wendel Assis | 1 Sep 19:17 2014
Picon

question about using master/head instead of 1.4.1

Hi all,

   I´ve started working with lwIP some weeks ago and one thing that called my attention was that the latest stable version is two years old and that we have almost 200 commits since them. I know this seems an odd question, but what the community suggests? pick the stable or the master version for a new integration? I could see that many commits were related to ipv6 and ppp, but I'm not sure if critical bugs were fixed in between.

Best Regards,
Wendel
_______________________________________________
lwip-users mailing list
lwip-users@...
https://lists.nongnu.org/mailman/listinfo/lwip-users
Ivan Delamer | 29 Aug 22:38 2014

Re: ppp-new threading question

Ok, that's what I thought. I will have to re-implement sio_write().

What I'm concerned also is, sio_write() is meant to block until all 
data is pushed out. This can be more than a second in a slow 9600bps 
connection (still used sometimes!!!). Will PPP try to do something 
during this time like try to re-send the packet or think it was lost? 
I'm not familiar with the internal ppp timer processes.

It also means more dynamic memory allocation since a reference to pbuf 
is not passed to sio_write().

Just thinking out loud I guess :-)

Cheers
Ivan

> Date: Fri, 29 Aug 2014 22:29:17 +0200
> From: Sylvain Rochet <gradator@...>
> To: Mailing list for lwIP users <lwip-users@...>
> Subject: Re: [lwip-users] ppp-new threading question
> Message-ID: <20140829202917.GA29946@...>
> Content-Type: text/plain; charset="utf-8"
> 
> Hi Ivan,
> 
> 
> On Fri, Aug 29, 2014 at 10:16:04AM -0600, Ivan Delamer wrote:
>> I feel almost embarrassed asking this but I haven't completely
>> figured it out yet.
>> 
>> In ppp-new, are packets sent to sio_write() from tcpip thread, or
>> from the RX process thread? Or both?
> 
> tcpip thread only.
> 
> (The stack owned RX process thread does not exist anymore, this was
> broken by design).
> 
> 
>> I just ask because sio_write() may block for some time (at least in
>> my basic implementation) and I'm wondering if this is blocking the
>> rest of the stack.
> 
> Yes, it will, sio_write() should not block.
> 
> 
> Sylvain
Chris Maier | 29 Aug 16:32 2014
Picon

DHCP callback was removed - Correct way to obtain new address?

Hi all,
 
I am just porting my application from version 1.3.2 to the latest 1.4.2. and I was wondering why my application does not get called back from the stack when the DHCP
 
As I found out the callback was removed. My application has to know the address for displaying purposes, so do I have to poll for a new address?
 
What is the proper way to obtain a new address?
 
Regards
 
Chris

----------------------------------------------------------------
DÜRR DENTAL AG
Höpfigheimer Strasse 17
74321 Bietigheim-Bissingen Deutschland / Germany
Tel. + 49 (0) 7142 / 705-0
Fax + 49 (0) 7142 / 705-500
http://www.duerrdental.com
Join us on Facebook www.facebook.com/DuerrDentalAG

Firmensitz / Registered Office: Höpfigheimer Str. 17, 74321 Bietigheim-Bissingen Handelsregister / Register of Commerce: Amtsgericht Stuttgart HRB 727006

Vorstand / Executive Board: Martin Dürrstein (Vorsitzender / CEO), Axel Schramm Vorsitzender des Aufsichtsrates / Chairman of the Supervisory Board: Joachim Loh
_______________________________________________
lwip-users mailing list
lwip-users@...
https://lists.nongnu.org/mailman/listinfo/lwip-users
Ivan Delamer | 29 Aug 18:16 2014

ppp-new threading question

I feel almost embarrassed asking this but I haven't completely figured 
it out yet.

In ppp-new, are packets sent to sio_write() from tcpip thread, or from 
the RX process thread? Or both?

I just ask because sio_write() may block for some time (at least in my 
basic implementation) and I'm wondering if this is blocking the rest of 
the stack.

Cheers
Ivan
RedCollarPanda | 27 Aug 09:56 2014
Picon

Maximizing throughput

I have a Debian x64 machine and want to make throughput as fast as library
can.
I have application with netcon and application with sockets, but it works
really slow. 

I send a char buf[1024]  for about 1 048 576 times  and it takes more than
1000 seconds ...

this is my lwipopts.h file.

#define LWIP_DEBUG 0
#define LWIP_DISABLE_TCP_SANITY_CHECKS 1
#define LWIP_CHECKSUM_ON_COPY 1
#define LWIP_RAW 0
#define TCP_MSS 1460
#define TCP_WND 65535
#define TCP_QUEUE_OOSEQ 1
#define TCP_SND_BUF 65535
#define TCP_OVERSIZE 1460

#define TCP_SND_QUEUELEN 256
#define PBUF_POOL_BUFSIZE 2048
#define TCP_NODELAY 1

how can I make connection faster?

--
View this message in context: http://lwip.100.n7.nabble.com/Maximizing-throughput-tp23074.html
Sent from the lwip-users mailing list archive at Nabble.com.
mobin.seven | 27 Aug 09:05 2014

packets dropped ,no space: which PCB?

Hi
*My LwIP application desc.:* Lwip server receives TCP packets and starts
processing from one remote client.
*the problem :* after processing only *255 *packets (I've set counter in
recv. callback) pcb returns 'packet dropped, no space' and stops working.
while program is alive and other tasks (like xemacif_input()) are running.
*Question:* How to determine which PCB the error is returned by?
  How to flush it or restart it?
  any Ideas...
Thanks in advance. 

--
View this message in context: http://lwip.100.n7.nabble.com/packets-dropped-no-space-which-PCB-tp23073.html
Sent from the lwip-users mailing list archive at Nabble.com.
Tomas Daujotas | 26 Aug 18:17 2014
Picon

IGMP time between membership messages

Hello,
I have faced an issue, a managed switch, which sends a General Query IGMP message to the network asking for multicast devices to identify the streams they want.
Apparently LwIP sends IGMP messages around 120 seconds interval, which usually works with most of the switches, however since the messages are sent depending on LwIP timers, they get timeout as they are not synchronized to the switch requests.
The switch sends a General Query message every 125 seconds as per RFC2236 section 8.2. It also expects the device to reply within 45 seconds (this is a non-changeable setting in the switch parameters). The standard section 8.3 defines a recommended default value of 10 seconds.
Since LwIP generates the report message every +/-120 seconds and it doesn't respond to General Queries, I would like to do a workaround this issue by sending the messages every 40 seconds instead of 120 seconds. Could someone advise where should I look for this change?

My system use NO_SYS_NO_TIMERS = 1.
I have a single timer firing up every 250ms (and I don't have any other available timers), where I call tcp_tmr() and igmp_tmr().
My IGMP_TMR_INTERVAL is set to 250.

Maybe I am misinterpretting LwIP IGMP messaging idea, but seems like it works as I've described.

Thank you.

Regards
Tomas Daujotas
_______________________________________________
lwip-users mailing list
lwip-users@...
https://lists.nongnu.org/mailman/listinfo/lwip-users
Vincent Cui | 23 Aug 04:46 2014

Re: demo web refresh down

Hi:

 

I define  following to use system malloc and free

#define MEM_LIBC_MALLOC                 1

#define MEMP_MEM_MALLOC                 1

 

I found that the malloc memory is not free on time, so malloc failure in new request coming.

 

It seems to need some protect those . Am I right ?

 

Vincent


Vincent Cui
Firmware Engineer Leader

Room1106, Building A, New Caohejing Business Centre, No.391, Guiping Road, Xuhui District, Shanghai, P.R.China
T: +86 21 34612525, M: +86 13482482211
www.enlogic.com
P please consider the environment before printing this email


This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed.  If you have received this e-mail in error, please notify the sender immediately and then delete it.  If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's prior permission. We have taken precautions to minimize the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this message.  We cannot accept liability for any loss or damage caused by software viruses.  Any views and/or opinions expressed in this e-mail are of the author only and do not necessarily represent the views of Enlogic.

From: Vincent Cui
Sent: 2014
823 9:50
To: lwip-users <at> nongnu.org
Subject: demo web refresh down

 

All:

 

I use LPCXPRESSO to develop a simple demo server with NETCONN api on LPC1769

If the demo server refresh itself per 3 second, it works well.

If I refresh it by press F5 frequencely, it halt and can’t connect to host..

 

Who know the reason ?

 

Vincent

_______________________________________________
lwip-users mailing list
lwip-users@...
https://lists.nongnu.org/mailman/listinfo/lwip-users
RedCollarPanda | 22 Aug 11:12 2014
Picon

LWIP packet loss or else

Good day! 
I have lwip library test application (tcp_echo) on my machine and a netcat
server on virtual box.

ILWP tcp_echo was changed to be a client. now it looks like:

static void 
tcpecho_thread(void *arg)
{
	err_t err;
  while (1) {
      struct netconn *server_con;
      ip_addr_t ipaddr_con;
      IP4_ADDR(&ipaddr_con, 172, 17, 9, 71);
      server_con = netconn_new(NETCONN_TCP);

       bool flag = tcp_nagle_disabled(server_con->pcb.tcp);
       std::cout << "Nagle alg IS " << flag  << std::cout;
	  		
	tcp_nagle_disable(server_con->pcb.tcp);
	flag = tcp_nagle_disabled(server_con->pcb.tcp);
        std::cout << "Nagle alg_after IS " << flag  << std::cout;
				     	      	      
      netconn_bind(server_con, NULL, 8);
      err = netconn_connect(server_con, &ipaddr_con, 16958);
      if (err == ERR_OK) {
        printf("connected\n");          
        while(1) {
        printf("While 1\n");
         void *data  = "lool\n"; ;
          u16_t len;
         len = sizeof("lool\n");
         err = netconn_write(server_con, data, len, NETCONN_COPY);
         sleep(10);
      }
      } else {
        printf("tcpecho: netconn_connect: error \"%s\"\n",
lwip_strerr(err));
        /* netconn_close(newconn);*/
        netconn_delete(server_con);
      }

    }		
}

Now the trouble is - when I only WRITE to netcat - all is fine and works
great, but when I try to write from netcat to lwip several messages  I get
errors . If I send messages too often (or too fast) I get some kind of
deadlock - 

lwip sends  <at> retransmit <at>  packets and w8s for packets from netcat. Netcat does
the same.

First I thought that the problem is in Nagle's algorithm as you see - I
turned it of... (checked it).

so what's the problem? Why the the stack doesn't respond in proper time?
here is a wireshark log file

lwip.lwip <http://lwip.100.n7.nabble.com/file/n23057/lwip.lwip>  

--
View this message in context: http://lwip.100.n7.nabble.com/LWIP-packet-loss-or-else-tp23057.html
Sent from the lwip-users mailing list archive at Nabble.com.
Avi | 21 Aug 17:16 2014

Opening a TCP session, using LwIp Rev 1.4.1

Hi

I am using LwIp Rev 1.4.1, on an an embeded system, and trying to open a TCP
session against Jpref TCP test tool, running on PC, and the session is not
opened.

*The source code on my system, for opening the TCP session:*

#define TCP_TEST_PORT		( 5001 )

struct netconn *TcpTestListener, *pxNewConnection;
uint status = 0;
struct netbuf *pxRxBuffer;
char *pcRxString;
unsigned short usLength;

/* Create a new tcp connection handle */
TcpTestListener = netconn_new( NETCONN_TCP );
ZR_ASSERT(TcpTestListener != NULL);
status = netconn_bind(TcpTestListener, IP_ADDR_ANY, TCP_TEST_PORT );
ZR_ASSERT(status == TX_SUCCESS);
status = netconn_listen( TcpTestListener );
ZR_ASSERT(status == TX_SUCCESS);

/* Loop forever */
for( ;; )
{
	/* Wait for connection. */
	status = netconn_accept(TcpTestListener, &pxNewConnection);
	ZR_ASSERT(status == TX_SUCCESS);

	if((status == TX_SUCCESS) && (pxNewConnection != NULL))
	{
		/* Service connection. */

		/* We expect to immediately get data. */
		status = netconn_recv( pxNewConnection, &pxRxBuffer );
		ZR_ASSERT(status == TX_SUCCESS);

		if( pxRxBuffer != NULL )
		{
			/* Where is the data? */
			status = netbuf_data( pxRxBuffer, (void **)&pcRxString, &usLength );
			ZR_ASSERT(status == TX_SUCCESS);

			/* Write back the data */
			status = netconn_write(pxNewConnection, pcRxString, (u16_t)usLength,
NETCONN_COPY );
			ZR_ASSERT(status == TX_SUCCESS);

	    		netbuf_delete( pxRxBuffer );
		}
		status = netconn_close( pxNewConnection );
		ZR_ASSERT(status == TX_SUCCESS);

		while( netconn_delete( pxNewConnection ) != ERR_OK )
		{
			tx_thread_sleep(20000);
		}
	}
}

Do you about a problem when working against the Jpref tool, or you see a
problem in my code ?

Thanks
Avi

--
View this message in context: http://lwip.100.n7.nabble.com/Opening-a-TCP-session-using-LwIp-Rev-1-4-1-tp23056.html
Sent from the lwip-users mailing list archive at Nabble.com.
tm264 | 20 Aug 14:36 2014
Picon

mem alignment issue when updating to Rev 1.4.1

Hi

When updating lwip from 1.3.2 to 1.4.1 I see some asserts checking for alignment equal 4. They are hard coded.
Does this mean lwip can only be used with MEM_ALIGNMENT equal 4  from this Release on?

Regards Thomas

Gmane