Commit Graph

9 Commits (mbed-os-5.2)

Author SHA1 Message Date
Mahadevan Mahesh 0a134b851a K64F ENET: Update to remove unused variable. This is no longer available in the updated SDK ENET driver 2016-11-18 12:18:21 +00:00
Christopher Haster 5c97ea9254 lwip - Change k64f emac layer to drop frames on buffer exhaustion
Previously, exhausting hardware buffers would begin blocking the lwip
thread. This patch changes the emac layer to simply drop ethernet
frames, leaving recovery up to a higher level protocol.

This is consistent with the behaviour of the emac layer when unable
to allocate dynamic memory.
2016-11-08 10:43:42 +00:00
Christopher Haster 14f9518709 lwip - Fixed memory leak in k64f cyclic-buffer overflow
This was actually several bugs colluding together.

1. Confusion on the buffer-semaphore paradigm used led to misuse of the
tx semaphore and potential for odd behaviour.

2. Equality tests on tx_consume_index and tx_produce_index did not
handle overflow correctly. This would allow tx_consume_index to catch
up to tx_produce_index and trick the k64f_rx_reclaim function into
forgetting about a whole buffer of pbufs.

3. On top of all of that, the ENET_BUFFDESCRIPTOR_TX_READ_MASK was not
correctly read immediately after being set due to either a compiler
optimization or hardware delays. This caused k64f_low_level_output
to eagerly overrun existing buff-descriptors before they had been
completely sent. Adopting the counting-semaphore paradigm for 1 avoided
this concern.

As pointed out by @infinnovation, the overflow only occurs in the rare
case that the 120MHz CPU can actually generate packets faster than the
ENET hardware can transmit on a 100Mbps link.
2016-11-08 10:43:40 +00:00
adustm 899acb1627 ADD NEW TARGET : NUCLEO_F756ZG, based on existing NUCLEO_F746ZG 2016-10-14 16:15:44 -05:00
adustm 283a82f23e ADD NEW TARGET : NUCLEO_F439ZI, based on existing NUCLEO_F429ZI 2016-10-14 16:15:41 -05:00
cyliangtw 0b60434327 EMAC buffer address word alignment 2016-10-14 16:15:04 -05:00
cyliangtw faae13e650 remove warnings 2016-10-14 16:14:59 -05:00
andreas.larsson 1d3c63d9bb Changed name for the target UBLOX_C029 to UBLOX_EVK_ODIN_W2 2016-10-03 12:10:50 +02:00
Christopher Haster ba99a1f31d restructure - Restructured features/net directory
features/net/network-socket -> features/netsocket
features/net/FEATURE_IPV4 -> features/FEATURE_LWIP
features/net/nanostack-binaries -> features/nanostack
features/net/FEATURE_NANOSTACK -> features/nanostack/FEATURE_NANOSTACK
2016-09-30 19:18:09 -05:00