[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

LWIP problem, cannot send frame smaller than 952Bytes

Posted on 2011-05-11
2
Medium Priority
?
564 Views
Last Modified: 2012-08-13
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
--------------------------------------------------------------------------------------------------------------
0
Comment
Question by:DBTechnique
  • 2
2 Comments
 

Author Comment

by:DBTechnique
ID: 35744255
please help !!
0
 

Accepted Solution

by:
DBTechnique earned 0 total points
ID: 35747255
HELP !!!!!!!!!!!!!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
LinkedIn blogging is great for networking, building up an audience, and expanding your influence as well. However, if you want to achieve these results, you need to work really hard to make your post worth liking and sharing. Here are 4 tips that ca…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month19 days, 22 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question