UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
10,443 Views
Registered: ‎03-13-2008

[xapp1026]Buffer size in ECHO application

Hi

I am using Socket mode TEMAC ECHO application with xilkernal.

 

BUT I have a problem in making buffer size more large. I mean buffer that we use in write and read function.

What is the problem in extending this size, and what is the limitation of buffer size. I can not exceed 1442 byte for buffer size.

 

Another question

How can i improve my bit rate in transmission, or increase the throughput of my system?

 

 

Thanks

 

Best Regards.
Hamzah A. Abdel-Aziz
0 Kudos
17 Replies
Xilinx Employee
Xilinx Employee
10,417 Views
Registered: ‎08-01-2007

Re: [xapp1026]Buffer size in ECHO application

Hamzah

 

What the error you encounter while exceed 1442bytes?

 

Try the RAW MODE to improve the performance.

0 Kudos
Scholar golson
Scholar
10,412 Views
Registered: ‎04-07-2008

Re: [xapp1026]Buffer size in ECHO application

I have seen that the packet size is hardcoded to packets around 1460 bytes in length in the lwip library code.

 

Here is a earlier post:

 

http://forums.xilinx.com/xlnx/board/message?board.id=EDK&message.id=4381&query.id=22717#M4381

 

I have managed to increase my packet size to near 7K in raw mode. And have posted a few other times

on this issue as I increased my packet size incrementally.

 

0 Kudos
Contributor
Contributor
10,398 Views
Registered: ‎03-13-2008

Re: [xapp1026]Buffer size in ECHO application

joshualu, There is no error message.But the transmission is hung up when i exceed this packet size.

How can i increase this packet size in SOCKET mode?  I don't need to convert to RAW mode, because my PC program is working under SOCKET mode.

 


golson, This  thread is distincit for RAW mode, but i am working in Socket mode.

 

Thank you for your replay.

 

Message Edited by hamzah.aaaa on 02-13-2009 09:57 AM
Best Regards.
Hamzah A. Abdel-Aziz
0 Kudos
Scholar golson
Scholar
10,395 Views
Registered: ‎04-07-2008

Re: [xapp1026]Buffer size in ECHO application

I think the lwip code that I am talking about may be shared by both Raw and Socket Mode.  That is why I referred you to this thread.

Message Edited by golson on 02-13-2009 10:33 AM
0 Kudos
Contributor
Contributor
10,334 Views
Registered: ‎03-13-2008

Re: [xapp1026]Buffer size in ECHO application

I am still have the problem after doing what you suggest in the old topic:

 

I have make this changed

 

Editing in xlltemac.h

#define XTE_DEFAULT_OPTIONS                     \
    (XTE_JUMBO_OPTION | \
    XTE_FLOW_CONTROL_OPTION |                  \
     XTE_BROADCAST_OPTION |                     \
     XTE_FCS_INSERT_OPTION |                    \
     XTE_FCS_STRIP_OPTION |                     \
     XTE_LENTYPE_ERR_OPTION |                   \
     XTE_TRANSMITTER_ENABLE_OPTION |            \
     XTE_RECEIVER_ENABLE_OPTION)

 

AND

#define XTE_MTU             3000 //1500    /* max MTU size of an Ethernet frame */

 

 

Editing in  xlltemacif.c

 

    /* maximum transfer unit */
    //netif->mtu = XTE_MAX_FRAME_SIZE;
    netif->mtu = 3100;// 1482;

 

 

This is my software platform setting

 

#ifndef __LWIPOPTS_H_
#define __LWIPOPTS_H_

#define SYS_LIGHTWEIGHT_PROT 1


#define TCPIP_THREAD_PRIO 1
#define DEFAULT_THREAD_PRIO 1

#define MEM_ALIGNMENT 8
#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 MEM_LIBC_MALLOC 1

#define MEMP_NUM_NETBUF     8
#define MEMP_NUM_NETCONN    16
#define MEMP_NUM_API_MSG    16
#define MEMP_NUM_TCPIP_MSG  64
#define MEMP_NUM_SYS_TIMEOUT 8
#define PBUF_POOL_SIZE 256
#define PBUF_POOL_BUFSIZE 3600
#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 8760
#define IP_FRAG_MAX_MTU 3100
#define IP_DEFAULT_TTL 255

#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 3000
#define TCP_SND_BUF 16384
#define TCP_WND 16384
#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 true

#define CONFIG_LINKSPEED_AUTODETECT 1

#endif
 

 

Thank you in advanced

 

Best Regards.
Hamzah A. Abdel-Aziz
0 Kudos
Scholar golson
Scholar
10,327 Views
Registered: ‎04-07-2008

Re: [xapp1026]Buffer size in ECHO application

#ifndef __LWIPOPTS_H_

#define __LWIPOPTS_H_

#define SYS_LIGHTWEIGHT_PROT 1

#define NO_SYS 1

#define MEM_ALIGNMENT 8

#define MEM_SIZE 146072

#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 MEM_LIBC_MALLOC 1

#define MEMP_NUM_SYS_TIMEOUT 8

#define PBUF_POOL_SIZE 256

#define PBUF_POOL_BUFSIZE 3000

#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 9000

#define IP_FRAG_MAX_MTU 3000

#define IP_DEFAULT_TTL 255

#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 3060

#define TCP_SND_BUF 8192

#define TCP_WND 4060

#define TCP_TTL 255

#define TCP_MAXRTX 12

#define TCP_SYNMAXRTX 4

#define TCP_QUEUE_OOSEQ 1

#define CHECKSUM_GEN_TCP 1

#define CHECKSUM_CHECK_TCP 1

#define LWIP_DHCP 0

#define DHCP_DOES_ARP_CHECK true

#define CONFIG_LINKSPEED_AUTODETECT 1

#endif

 

 

 

 

0 Kudos
Scholar golson
Scholar
10,326 Views
Registered: ‎04-07-2008

Re: [xapp1026]Buffer size in ECHO application

Code should be added to the following directories:

 

C:\Xilinx\10.1\EDK\sw\ThirdParty\sw_services\lwip_v3_00_a\src\contrib\ports\xilinx\include\netif

C:\Xilinx\10.1\EDK\sw\ThirdParty\sw_services\lwip_v3_00_a\src\contrib\ports\xilinx\netif

 

 

 

Message Edited by golson on 02-17-2009 07:07 AM
0 Kudos
Scholar golson
Scholar
10,323 Views
Registered: ‎04-07-2008

Re: [xapp1026]Buffer size in ECHO application

Good luck.  Hope this will help.
0 Kudos
Contributor
Contributor
10,322 Views
Registered: ‎03-13-2008

Re: [xapp1026]Buffer size in ECHO application

 Many thanks for your support golson.

But this director C:\Xilinx\10.1\EDK\sw\ThirdParty\sw_services\lwip_v3_00_a\src\contrib\ports\xilinx\include\netif doesn't include the xlltemac.h file to be edited.

Shoud i add the whole file in this location.

 

Thanks

 

Message Edited by hamzah.aaaa on 02-17-2009 07:20 AM
Best Regards.
Hamzah A. Abdel-Aziz
0 Kudos
Scholar golson
Scholar
7,762 Views
Registered: ‎04-07-2008

Re: [xapp1026]Buffer size in ECHO application

Please change the file located at

 

C:\Xilinx\10.1\EDK\sw\XilinxProcessorIPLib\drivers\lltemac_v1_00_b\src

xlltemac.h

 

I included my latest version for you to look at. But I would not use it I was targeting bigger packets with it.

 

0 Kudos
Contributor
Contributor
7,718 Views
Registered: ‎03-13-2008

Re: [xapp1026]Buffer size in ECHO application

Actually that i do before, but my temac driver is lltemac_v1_00_a, I do not have lltemac_v1_00_b in my driver folder Even i am using EDK 10.1.

Is the old driver version -lltemac_v1_00_a -  is the main cause of this problem, because i replace the attached file, and nothing habben.

 

Thanks

 

Best Regards.
Hamzah A. Abdel-Aziz
0 Kudos
Scholar golson
Scholar
7,715 Views
Registered: ‎04-07-2008

Re: [xapp1026]Buffer size in ECHO application

Yes You may be using the lltemac version a.  You can make the changes here to see.  I would also try to use the debugger to help you see which files are being used in your

final application.  You can probably use the debugger to see which files are part of your build.  When you set a breakpoint you can choose which file you want to put

a break point in.  This is one way to debug your program and see the changes you have made to your program.  Also see which files are part of the final program.

0 Kudos
Scholar golson
Scholar
7,692 Views
Registered: ‎04-07-2008

Re: [xapp1026]Buffer size in ECHO application

Just thought of something.  Try clicking on Generate board support packages to see if it will update your driver file after making

changes in the Xilinx EDK directory.

 

Alternatively I think that  under your Project directory is a directory that holds the drivers used in your project.  I think it is

simply called drivers.  look for the lltemac driver directory under it.

 

Then change the file in this location too (in your local project as well as in the Xilinx EDK SW Third Party area) so that the change is in your (local) project as well.

 

Then Try to recomplile your project so that the changes are in your machine code.

 

 

Message Edited by golson on 02-19-2009 07:32 PM
0 Kudos
Contributor
Contributor
7,551 Views
Registered: ‎03-13-2008

Re: [xapp1026]Buffer size in ECHO application

Hello

I think this error occure because i am using DMA with TEMAC. because when i use FIFO with TEMAC. there is no problem in increasing packet size.

What are you using DMA, or FIFO?

 

thanks

Best Regards.
Hamzah A. Abdel-Aziz
0 Kudos
Scholar golson
Scholar
7,545 Views
Registered: ‎04-07-2008

Re: [xapp1026]Buffer size in ECHO application

I was using a ML505 board which requires the DMA/RAM interface.
0 Kudos
Scholar golson
Scholar
7,141 Views
Registered: ‎04-07-2008

Re: [xapp1026]Buffer size in ECHO application

The MSS File is also needs to be modified or else files not found errors will occur during Software Compiling.  Here is my MSS File:

 

 

 

0 Kudos
Contributor
Contributor
7,115 Views
Registered: ‎03-13-2008

Re: [xapp1026]Buffer size in ECHO application

Thank you for your response.

 

Actually i had update my software file. I am using the fifo interface which allow me to increase my packet size properly without any significant error.

Also I had used RAW mode that allow me to transfer with 8K packet size. i seem to be great

 

 

:) :)

Best Regards.
Hamzah A. Abdel-Aziz
0 Kudos