drivers: ethernet: eth_stm32_hal: Modify RX thread creation#77904
drivers: ethernet: eth_stm32_hal: Modify RX thread creation#77904carlescufi merged 1 commit intozephyrproject-rtos:mainfrom
Conversation
9d13a85 to
3ab5b86
Compare
|
@marwaiehm-st Thank you for you contribution. The changes are looking very clean and understandable. Also the yield is huge. Please also add following steps:
I am still fighting with some CAN bus linux driver fix matching zephyr's driver counterpart in my sparse private time :) Thus doing measurements will take me more time. But as soon as your PR changes the state there will be more people assigned, who maybe also could do network timing tests described by you. Great work. Many thanks to you. |
drivers/ethernet/eth_stm32_hal.c
Outdated
There was a problem hiding this comment.
you should probably make a separate driver kconfig for this. If you think the two configs will most likely have the same value then you could default y if NET_TC_THREAD_PREEMPTIVE
There was a problem hiding this comment.
you should probably make a separate driver kconfig for this. If you think the two configs will most likely have the same value then you could
default y if NET_TC_THREAD_PREEMPTIVE
There is already a KConfig for hal_stm32_ethernet: https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/ethernet/Kconfig.stm32_hal Thus it is not necessary I think. Proper description of the behavior in help section of KConfig would be fine.
There was a problem hiding this comment.
That's not what I'm talking about, I mean a Kconfig to say if the driver rx thread priority is preemptive, instead of coupling it to the net tc thread priority being preemptive
There was a problem hiding this comment.
Oh, I see. It makes sense. Thanks. @marwa could you please add corresponding option?
There was a problem hiding this comment.
you should probably make a separate driver kconfig for this.
I'm not sure why this would be required. ETH_STM32_HAL_RX_THREAD_PRIO is neutral.
And a STM32 specific symbol to reflect value of subsystem's one doesn't add much aside a possibility of misconfiguration.
There was a problem hiding this comment.
I think it is more about NET_TC_THREAD_PREEMPTIVE
There was a problem hiding this comment.
Does it mean adding ETH_STM32_HAL_RX_THREAD_PREEMPTIVE to drivers/ethernet/Kconfig.stm32_hal ?
config ETH_STM32_HAL_RX_THREAD_PREEMPTIVE
bool "STM32 Ethernet RX Thread Preemptive"
default y if NET_TC_THREAD_PREEMPTIVE
help
Enable preemptive scheduling for the RX thread of STM32 Ethernet....and changing the thread creation?
| IS_ENABLED(CONFIG_NET_TC_THREAD_PREEMPTIVE) | |
| IS_ENABLED(CONFIG_ETH_STM32_HAL_RX_THREAD_PREEMPTIVE) | |
There was a problem hiding this comment.
I think it is more about NET_TC_THREAD_PREEMPTIVE
Yes, my response was toward this proposal indeed.
There was a problem hiding this comment.
Does it mean adding ETH_STM32_HAL_RX_THREAD_PREEMPTIVE to drivers/ethernet/Kconfig.stm32_hal ?
config ETH_STM32_HAL_RX_THREAD_PREEMPTIVE bool "STM32 Ethernet RX Thread Preemptive" default y if NET_TC_THREAD_PREEMPTIVE help Enable preemptive scheduling for the RX thread of STM32 Ethernet....and changing the thread creation?
Suggested change
IS_ENABLED(CONFIG_NET_TC_THREAD_PREEMPTIVE) IS_ENABLED(CONFIG_ETH_STM32_HAL_RX_THREAD_PREEMPTIVE)
@decsny I think, it would be better, if you clarify it.
There was a problem hiding this comment.
yes the last comment you have with the suggestion is what I meant would probably be a good idea, as the net tc thread is not the same thread as the one being made in the ST ethernet driver, so it seems like it would make sense to have a different set of configs for that thread specifically
3ab5b86 to
3f26554
Compare
This change will allow users to configure the Ethernet RX thread according to their specific real-time requirements. Adding preemptive threading helps to reduce jitter and the impact of Ethernet traffic on real-time performance. Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
3f26554 to
af16cbd
Compare
This change will allow users to configure the Ethernet RX thread according to their specific real-time requirements.
Adding preemptive threading helps to reduce jitter and the impact of Ethernet traffic on real-time performance.