lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Re: [lwip] lwIP on Gigabit Ethernet


From: James Roth
Subject: [lwip-users] Re: [lwip] lwIP on Gigabit Ethernet
Date: Thu, 09 Jan 2003 01:47:03 -0000

This is a multi-part message in MIME format.
--------------080401030201010108020908
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Leon Woestenberg wrote:

>Hello Chris,
>
>in such a case I would start some profile testing:
>1) start with the Ethernet device driver sitting in a while(1) loop
>sending out Ethernet packets.
>
>This is the maximum throughput o/t "bare hardware + bare software".
>
>2) Do the same for IP packets (checksum overhead etc.)
>3) Try the same for TCP packets (maybe you can mimick an extremely big
>receive window
>on the receiving side?)
>
>Also, how often do you call the TCP fast timer routine?
>
>I do not have "I told you so" remarks. The source code is there.
>
>Regards, Leon Woestenberg.
>
>
>----- Original Message -----
>From: "Chris Borrelli" <address@hidden>
>To: <address@hidden>
>Sent: Wednesday, June 26, 2002 11:54 PM
>Subject: [lwip] lwIP on Gigabit Ethernet
>
>
>  
>
>><snip>
>>
>>I took a look at the TCP stream.  It looks like host PC fills the window
>>(1024) of the lwIP device, and then the connection is reduced to sending
>>very very small tcp segments back and forth.
>>    
>>
    I had a small packet problem also (10Mb ethernet).  The attached 
header file is an attempt to keep the packets as large as possible. The 
lwipopts.h settings are critical for performance.

>>Does anyone have any lwIP performance numbers for their applications???
>>
>> -Chris
>>
>>[This message was sent through the lwip discussion list.]
>>
>>    
>>
>
>[This message was sent through the lwip discussion list.]
>  
>


-- 
James Roth
Shugyo Design Technologies
http://www.shugyodesign.com/



--------------080401030201010108020908
Content-Type: text/plain;
 name="lwipopts.h"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="lwipopts.h"

/*
 * Copyright (c) 2001, 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. Neither the name of the Institute nor the names of its contributors 
 *    may be used to endorse or promote products derived from this software 
 *    without specific prior written permission. 
 *
 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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 <address@hidden>
 *
 * $Id: lwipopts.h,v 1.1.1.1 2002/02/03 21:58:31 james Exp $
 */
#ifndef __LWIPOPTS_H__
#define __LWIPOPTS_H__

/* ---------- Statistics options ---------- */

#ifdef STATS
#define LINK_STATS
#define IP_STATS
#define ICMP_STATS
#define UDP_STATS
#define TCP_STATS
#define MEM_STATS
#define MEMP_STATS
#define PBUF_STATS
#define SYS_STATS
#endif /* STATS */

/* ---------- IP options ---------- */
/* Define IP_FORWARD to 1 if you wish to have the ability to forward
   IP packets across network interfaces. If you are going to run lwIP
   on a device with only one network interface, define this to
   0. */
#define IP_FORWARD              0

#define IP_OPTIONS              1
#define LWIP_DHCP               0 

/* ---------- ICMP options ---------- */
#define ICMP_TTL                255

/* ---------- UDP options ---------- */
#define UDP_TTL                 255

/* ---------- TCP options ---------- */
#define LWIP_TCP                1
#define TCP_TTL                 255

#define TCP_QUEUE_OOSEQ         1

#define KR_ETH_MAX              (1500)

/* TCP Maximum segment size. */
#define TCP_MSS                 KR_ETH_MAX


/*
 * The -40 here prevents lwIP from using the leftover buffer space
 * to send small packets.  Get rid of the lefover and use KR_ETH_MAX
 * size packets all the time.
 */
/* TCP sender buffer space (bytes). */
#define TCP_SND_BUF             ((KR_ETH_MAX - 40) * 6)

/* TCP sender buffer space (pbufs). This must be at least = 2 *
   TCP_SND_BUF/TCP_MSS for things to work. */
#define TCP_SND_QUEUELEN        (4 * TCP_SND_BUF / TCP_MSS)

/* TCP receive window. */
#define TCP_WND                 KR_ETH_MAX

/* Maximum number of retransmissions of data segments. */
#define TCP_MAXRTX              12

/* Maximum number of retransmissions of SYN segments. */
#define TCP_SYNMAXRTX           4

/* ---------- Memory options ---------- */
#define MEM_ALIGNMENT           4

#define MEM_SIZE                KR_ETH_MAX

#define MEM_RECLAIM             1
#define MEMP_RECLAIM            1

#define MEMP_NUM_PBUF           64
#define MEMP_NUM_UDP_PCB        8
#define MEMP_NUM_TCP_PCB        64
#define MEMP_NUM_TCP_PCB_LISTEN 16

#define MEMP_NUM_TCP_SEG        128
#define MEMP_NUM_NETBUF         64
#define MEMP_NUM_NETCONN        8 
#define MEMP_NUM_API_MSG        32
#define MEMP_NUM_TCPIP_MSG      32

#define MEMP_NUM_SYS_TIMEOUT    8

/* ---------- Pbuf options ---------- */

#define PBUF_POOL_SIZE          8
#define PBUF_POOL_BUFSIZE       KR_ETH_MAX

#define PBUF_LINK_HLEN          16

#define ARP_TABLE_SIZE 10  

int rod_checksum (short *address, int len);

#endif /* __LWIPOPTS_H__ */

--------------080401030201010108020908--

[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]