lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] TCPIP and MAC thread task priorities


From: Wayne Uroda
Subject: Re: [lwip-users] TCPIP and MAC thread task priorities
Date: Wed, 1 Mar 2017 10:09:37 +1000

Thank you Simon, and everyone else who contributed to the discussion.

I have had both tasks set at the same priority (RTOS task priority, nothing to do with the Cortex interrupt priority). I have not noticed any issues with this so I will leave it as is for now.
I don't think that the comment is accurate in my source code so I will remove it (perhaps replacing it with a link to this conversation).

Thanks again for the great work on supporting lwip.

- Wayne


On 28 February 2017 at 00:09, Simon Goldschmidt <address@hidden> wrote:
Sylvain Rochet wrote:
>> If you set your interrupt level to be higher priority than the
>> FreeRTOS timer tick that part will never Be masked and your critical
>> section will not work as expected.
>
> I don't understand any of this, portENTER_CRITICAL/portEXIT_CRITICAL
> proper implementation is to disable *ALL* interrupts


To add some confusion: that's not entirely true: at least on the Cortex-M ARMs,
you can have "fast-interrupts" that are NOT masked by ENTER/EXIT_CRICITAL.
If I remember correctly, all (Cortex-M) ports I used have been setting up the
lowest/highest interrupt priority in a way that at least some interrupts were
such fast-interrupts, so there's definitively a possibility that this happens
if you configure things wrong!


Keeping that aside and answering to the OP:
There is *no* limitation in lwIP itself that imposes the requirement of specific
task priorities. The lwIP port to your OS/system can however impose this, so
there's no way for us knowing if the comment you saw is true or not.

In the end, you'll have to know which thread is more important than others.
Given the tcpip_thread/eth_thread combination, you probably have to weight TX
against RX, but that can largely depend on your application and/or driver.


Simon

_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

[Prev in Thread] Current Thread [Next in Thread]