Link to home
Start Free TrialLog in
Avatar of DBTechnique
DBTechnique

asked on

LWIP problem, cannot send frame smaller than 952Bytes

Hi,

 

I'm using LWIP stack with a virtex5 PPC440 and HDMA(8192 buffers of 2048 Bytes).

It's actually working pretty well (250Mbps), with frame between 952Bytes to 64KBytes.

 

My problem is that when i use the tcp_write() function, i have to put frame lenght with a multiple of 2048 bigger than 952Bytes (average).

For example :

2040 Bytes => OK

556 Bytes => BAD

4088 Bytes => 2048 + 2040 => OK

4120 Bytes => 2048 + 2048 + 24 => BAD

 

It's really strange and i don't understand at all why i cannot put the size i want. Anyway when i'm on a bad way i get a tcp_err = -4 that correspond to "#define ERR_ABRT       -4    /* Connection aborted.      */"

 

Can someone help me please !!!

Thank you so much

 

bellow my lwipopts.h:

--------------------------------------------------------------------------------------------------------------

#ifndef __LWIPOPTS_H_
#define __LWIPOPTS_H_

#define SYS_LIGHTWEIGHT_PROT 1

#define NO_SYS 1
#define LWIP_SOCKET 0
#define LWIP_COMPAT_SOCKETS 0
#define LWIP_NETCONN 0

#define MEM_ALIGNMENT 64
#define MEM_SIZE 131072
#define MEMP_NUM_PBUF 16
#define MEMP_NUM_UDP_PCB 4
#define MEMP_NUM_TCP_PCB 32
#define MEMP_NUM_TCP_PCB_LISTEN 8
#define MEMP_NUM_TCP_SEG 256
#define LWIP_USE_HEAP_FROM_INTERRUPT 1

#define MEMP_NUM_SYS_TIMEOUT 8
#define PBUF_POOL_SIZE 256
#define PBUF_POOL_BUFSIZE 1700
#define PBUF_LINK_HLEN 16

#define ARP_TABLE_SIZE 10
#define ARP_QUEUEING 1

#define ICMP_TTL 255

#define IP_OPTIONS 0
#define IP_FORWARD 0
#define IP_REASSEMBLY 1
#define IP_FRAG 1
#define IP_REASS_BUFSIZE 5760
#define IP_FRAG_MAX_MTU 1500
#define IP_DEFAULT_TTL 255
#define LWIP_CHKSUM_ALGORITHM 3

#define LWIP_UDP 1
#define UDP_TTL 255

#define LWIP_TCP 1
#define TCP_SND_QUEUELEN   16 * TCP_SND_BUF/TCP_MSS
#define TCP_MSS 1460
#define TCP_SND_BUF 8192
#define TCP_WND 2048
#define TCP_TTL 255
#define TCP_MAXRTX 12
#define TCP_SYNMAXRTX 4
#define TCP_QUEUE_OOSEQ 1
#define CHECKSUM_GEN_TCP 0
#define CHECKSUM_CHECK_TCP 0

#define LWIP_DHCP 0
#define DHCP_DOES_ARP_CHECK false

#define CONFIG_LINKSPEED_AUTODETECT 1

#endif
--------------------------------------------------------------------------------------------------------------
Avatar of DBTechnique
DBTechnique

ASKER

please help !!
ASKER CERTIFIED SOLUTION
Avatar of DBTechnique
DBTechnique

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial