8000 Fix for issue 685 by Dscano · Pull Request #690 · p4lang/tutorials · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix for issue 685 #690

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fix for issue 685 #690

wants to merge 3 commits into from

Conversation

Dscano
Copy link
Contributor
@Dscano Dscano commented Jun 26, 2025

This code fix the #685.

Dscano added 2 commits June 26, 2025 17:37
Signed-off-by: Dscano <d.scano89@gmail.com>
Signed-off-by: Dscano <d.scano89@gmail.com>
def deleteFlowRule(notif):
notif["sw"].DeleteTableEntry(notif["idle"].table_entry[0])
table_entry = global_data['p4info_helper'].buildTableEntry(
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is just a guess at this point, but when I tried this and saw error messages, I added some debug print statements to deleteFlowRule and addFlowRule that showed all of these things:
(a) the switch name
(b) the protocol
(c) source IP address
(d) dest IP address

I saw that it seemed to be trying to delete the same rule (with the same key fields) from the same switch multiple times. It should definitely cause some kind of error to be returned from the network device to the controller if the controller attempts to delete an entry that is not in the table, but I do not know if that is the root cause of the error I am seeing.

If this is what is happening, I am also not yet certain why. My best guess would be that there is some kind of a race where the controller receives the first entry timeout notification, but before the switch receives the first delete command, the switch sends a second entry timeout notification for the same entry. Since such races are probably unavoidable in general, it seems like it would be a good idea for the controller to somehow correctly process error responses for attempted entry delete commands, in case they occur.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I proposed a fix, as the multiple deletions of the same flow rule cause the gRPC error.

…le deletions

Signed-off-by: Dscano <d.scano89@gmail.com>
@Dscano
Copy link
Contributor Author
Dscano commented Jul 9, 2025

Once the proposed code is approved, I need to update the README.

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
0