Kinetis EMAC: Make number of buffers configurable

16 RX buffers and 8 TX buffers is probably excessive. Nanostack
version of driver successfully used 4+4, and data pump should be
broadly equivalent.

This means that switching K64F devices from Nanostack to EMAC increases
base heap usage by 18K - observed in Nanostack border router builds.

Add a config option to make it possible to lower the number of buffers.
Defer consideration of lowering the default to later.
pull/7141/head
Kevin Bracey 2018-06-06 13:13:19 +03:00
parent 5d8570be39
commit 30e68f3201
2 changed files with 9 additions and 2 deletions

View File

@ -32,8 +32,8 @@
#include "fsl_enet.h" #include "fsl_enet.h"
#define ENET_RX_RING_LEN (16) #define ENET_RX_RING_LEN MBED_CONF_KINETIS_EMAC_RX_RING_LEN
#define ENET_TX_RING_LEN (8) #define ENET_TX_RING_LEN MBED_CONF_KINETIS_EMAC_TX_RING_LEN
#define ENET_ETH_MAX_FLEN (1522) // recommended size for a VLAN frame #define ENET_ETH_MAX_FLEN (1522) // recommended size for a VLAN frame

View File

@ -0,0 +1,7 @@
{
"name": "kinetis-emac",
"config": {
"rx-ring-len": 16,
"tx-ring-len": 8
}
}