Socket Rx/Tx Buffer; Other Linux Kernel Version - Wiznet W5300 Porting Manual

Linux driver porting guide
Hide thumbs Also See for W5300:
Table of Contents

Advertisement

3.5. Socket Rx/TX buffer

The W5300 has 8 channels from 0 to 7. The channel 0 operates as MAC RAW mode and
supports the operation of conventional MAC chip. And other channels 1~7 support hardware
TCP/IP stack. The W5300 can set the Rx/Tx buffer size of each channel respectively. The total
buffer size is 128 Kbyte. Of course the more buffer size of channel, the better performance.
In the W5300 Linux driver, basic buffer setting is in the 'w5300.c' file. The buffer setting is
depended on the specific of its product.
/* FIXME: Configuring the size of basic RX/TX FIFO / It should be configured
according to the system */
const u8 w5300_rxbuf_conf[MAX_SOCK_NUM] = {32, 8, 8, 8, 8, 0, 0, 0};
const u8 w5300_txbuf_conf[MAX_SOCK_NUM] = {32, 8, 8, 8, 8, 0, 0, 0};
<Note> Since channel 0 using MAC RAW mode activated at the MAC layer, it has many received
packets. So it is strongly recommended that assigns as large size as possible to the Rx buffer
of channel 0.

3.6. Other linux kernel version

The W5300 Linux driver is based on the Linux kernel 2.6.24.4 version which is porting to
W5300E01-ARM. In case of using other Linux kernel, it should be modified some different part
according to its version.
For example, some functions about NAPI (New API) using in W5300 Linux driver are recently
introduced. So in case of using the past Linux kernel version, delete the functions about NAPI
and modify the related routine. The difference of NAPI initialize routine is as below.
/* Initialization Function of W5300 driver */
static int wiz_init(void)
{
...
/* Setting napi. Enabling to process max 16 packets at a time. */
netif_napi_add(dev, &wp->napi, wiz_rx_poll, 16);
...
}
Copyright © WIZnet All Rights Reserved
W5300 Linux Driver Porting Guide | 12 page

Advertisement

Table of Contents
loading

Table of Contents