Skip to content

Commit ee4a338

Browse files
danieldegrassecarlescufi
authored andcommitted
drivers: eth_mcux: move intermediate driver buffers into DTCM
move intermediate driver buffers into DTCM, to reduce copy latency Performance change (as tested with iperf on RT1050) TCP RX: 48.6Mbps->49.1Mbps TCP TX: 40.7Mbps->40.8Mbps Signed-off-by: Daniel DeGrasse <[email protected]>
1 parent 5dd5fab commit ee4a338

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/ethernet/eth_mcux.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,12 +1523,15 @@ static void eth_mcux_err_isr(const struct device *dev)
15231523
/* Use DTCM for hardware DMA buffers */
15241524
#define _mcux_dma_desc __dtcm_bss_section
15251525
#define _mcux_dma_buffer __dtcm_noinit_section
1526+
#define _mcux_driver_buffer __dtcm_noinit_section
15261527
#elif defined(CONFIG_NOCACHE_MEMORY)
15271528
#define _mcux_dma_desc __nocache
15281529
#define _mcux_dma_buffer __nocache
1530+
#define _mcux_driver_buffer
15291531
#else
15301532
#define _mcux_dma_desc
15311533
#define _mcux_dma_buffer
1534+
#define _mcux_driver_buffer
15321535
#endif
15331536

15341537
#if defined(CONFIG_ETH_MCUX_PHY_RESET)
@@ -1545,9 +1548,9 @@ static void eth_mcux_err_isr(const struct device *dev)
15451548
ETH_MCUX_PINCTRL_DEFINE(n) \
15461549
\
15471550
static void eth##n##_config_func(void); \
1548-
static uint8_t \
1551+
static _mcux_driver_buffer uint8_t \
15491552
tx_enet_frame_##n##_buf[NET_ETH_MAX_FRAME_SIZE]; \
1550-
static uint8_t \
1553+
static _mcux_driver_buffer uint8_t \
15511554
rx_enet_frame_##n##_buf[NET_ETH_MAX_FRAME_SIZE]; \
15521555
\
15531556
static mdio_handle_t eth##n##_mdio_handle = { \

0 commit comments

Comments
 (0)