Hello
I´m just playing with ethernet with zedboard. I made simple design with only PS part of Zynq and reworked SDK lwip raw tcp echo example to udp. Everything works fine but I would like to ask some questions.
Performance:
I have measured transmit output with Jperf (GUI version of iperf utility). UDP payload size was 500B with achieved circa 400Mbit/s and for 1000B payload I got around 700Mbit/s bandwidth performance. Bigger payload per datagram is irrelevant for me because of app layer protocol what I'm gonna use.
In XAPP1026 document there is the chapter about measured performance (page 23 - lwip performance). As you can see...about 900Mbit/s can be achieved with raw TCP (!!!) on the board ZC702.
Did I overlook something? ZC702 have same cpu (666MHz) like zedboard and similar PHY ethernet chip (marvell).
Here is sample of my code:
void myudp_client_init(void)
{
ip_addr_t DestIPaddr;
err_t err;
upcb = udp_new();
if (upcb!=NULL)
{
IP4_ADDR( &DestIPaddr, DEST_IP_ADDR0, DEST_IP_ADDR1, DEST_IP_ADDR2, DEST_IP_ADDR3 );
err= udp_connect(upcb, &DestIPaddr, UDP_SERVER_PORT);
if (err == ERR_OK)
{
/* Set a receive callback */
udp_recv(upcb, udp_receive_callback, NULL);
}
}
}
static void myudp_client_send(void)
{
struct pbuf *p;
static int counter = 0;
sprintf((char*)data, "counter>%d", counter++); //for evaluation of received datagrams
p = pbuf_alloc(PBUF_TRANSPORT,PAYLOAD_SIZE, PBUF_POOL);
if (p != NULL)
{
pbuf_take(p, (char*)data, PAYLOAD_SIZE); //PAYLOAD_SIZE tried from 200B to 1000B
udp_send(upcb, p);
pbuf_free(p);
}
}
I just call myudp_client_send() while button is pushed. Received datagrams are checked in Wireshark.
General question about lwip raw mode:
While I was reading various documentation and example codes of RAW mode for different platforms (Atmel, NXP, STM32...) I always find necessity of calling sys_check_timeouts function in while(1) next to variation of function ethernetif_input (it's called xemacif_input in Xilinx lwip port ). Why is it not in xilinx LWIP examples? Are timers timeouts handled implicitly?