Skip to content

Commit 0261a7d

Browse files
ParthibanI17164fabiobaltieri
authored andcommitted
ethernet: eth_sam_gmac: enable multiple TX pkt support for max throughput
This change enables GMAC_MULTIPLE_TX_PACKETS to allow multiple TX packets to be pushed to the DMA engine, improving transmit performance. Previously, older Zephyr versions (pre-v2.6.0) lacked thread-safe handling in net_pkt and net_buf, making multiple TX enqueuing unreliable. Issue #32564 ("net_buf reference count not protected") was fixed in v2.6.0, providing proper thread safety. The changes have been tested on SAME54 Curiosity Ultra with EVB-LAN8670-RMII and KSZ8061 PHY daughter card, and the expected performance of 9.5Mbps at 10Mbps PHY link speed was observed. Signed-off-by: Parthiban Veerasooran <[email protected]>
1 parent 9a948dc commit 0261a7d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/ethernet/eth_sam_gmac_priv.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@
1616
#define ATMEL_OUI_B1 0x04
1717
#define ATMEL_OUI_B2 0x25
1818

19-
/* This option enables support to push multiple packets to the DMA engine.
20-
* This currently doesn't work given the current version of net_pkt or
21-
* net_buf does not allowed access from multiple threads. This option is
22-
* therefore currently disabled.
23-
*/
24-
#define GMAC_MULTIPLE_TX_PACKETS 0
19+
/* This option enables support to push multiple packets to the DMA engine. */
20+
#define GMAC_MULTIPLE_TX_PACKETS 1
2521

2622
#define GMAC_MTU NET_ETH_MTU
2723
#define GMAC_FRAME_SIZE_MAX (GMAC_MTU + 18)

0 commit comments

Comments
 (0)