Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock LWIP before p-net linkoutput call #550

Merged
merged 1 commit into from
May 22, 2023

Conversation

VictorSkoglund
Copy link

Bug fix for xemacps descriptor queues becomeing corrupt, due to both lwip and p-net using the same driver but p-net does not check if the driver is busy. To resolve the issue, the LWIP core needs to be locked before it is called by p-net.

@hefloryd
Copy link
Collaborator

Also mention that this PR fixes #548. Looks great otherwise!

@VictorSkoglund VictorSkoglund force-pushed the lock_tcpip branch 2 times, most recently from 1e109f8 to 2a3c1c3 Compare May 22, 2023 09:01
@@ -12,9 +12,6 @@ stack:
- Fix SNMP ifDescr in ifTable.
- Discard invalid UDP packets.
- VLAN tag support.
- Lock mutex while handling received frame
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not remove this. LWIP_TCPIP_CORE_LOCKING_INPUT is still being set.

Should however remove "Lock mutex for Tx..." for dwmac1000.c and dwgmac1000.c as it has been removed.

This commit fixes rtlabs-com#548. The xemacps descriptor queues are becoming
corrupt, due to both lwip and p-net using the same driver but p-net
does not check if the driver is busy. To resolve the issue, the LWIP
core needs to be locked before it is called by p-net.
@hefloryd hefloryd merged commit c1bd7ca into rtlabs-com:master May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants