mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ethernet: limit rx buf num when flow ctrl enable.
This commit is contained in:
parent
7eb570b039
commit
2ea4d7fd02
@ -6,17 +6,18 @@ menuconfig ETHERNET
|
||||
|
||||
config DMA_RX_BUF_NUM
|
||||
int "Number of DMA RX buffers"
|
||||
range 1 10
|
||||
range 3 20
|
||||
default 10
|
||||
depends on ETHERNET
|
||||
help
|
||||
Number of DMA receive buffers. Each buffer is 1600 bytes.
|
||||
Buffers are allocated statically.
|
||||
Larger number of buffers increases throughput.
|
||||
If enable flow ctrl, the num must be above 9 .
|
||||
|
||||
config DMA_TX_BUF_NUM
|
||||
int "Number of DMA RX buffers"
|
||||
range 1 10
|
||||
range 3 20
|
||||
default 10
|
||||
depends on ETHERNET
|
||||
help
|
||||
|
@ -216,7 +216,14 @@ static void emac_set_user_config_data(eth_config_t *config )
|
||||
emac_config.emac_phy_check_init = config->phy_check_init;
|
||||
emac_config.emac_phy_get_speed_mode = config->phy_get_speed_mode;
|
||||
emac_config.emac_phy_get_duplex_mode = config->phy_get_duplex_mode;
|
||||
#if DMA_RX_BUF_NUM > 9
|
||||
emac_config.emac_flow_ctrl_enable = config->flow_ctrl_enable;
|
||||
#else
|
||||
if(config->flow_ctrl_enable == true) {
|
||||
ESP_LOGE(TAG, "eth flow ctrl init err!!! Please run make menuconfig and make sure DMA_RX_BUF_NUM > 9 .");
|
||||
}
|
||||
emac_config.emac_flow_ctrl_enable = false;
|
||||
#endif
|
||||
emac_config.emac_phy_get_partner_pause_enable = config->phy_get_partner_pause_enable;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user