-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure that bmv2 targets are notified in case of config swap
In some case, the do_swap() call in simple_switch never returned 0 (because the swap was performed independently of the target), which meant that the with_queueing_metadata flag was not updated. This created an issue in the following specific scenario: * simple_switch is started with a JSON config that does not include queueing metadata fields * a JSON config swap is performed (using the runtime_CLI or P4Runtime, in the case of simple_switch_grpc), and the new config includes all queueing metadata fields * queueing metadata fields still show as 0 for all subsequent traffic To fix this, we get rid of the assumption that targets are in charge of calling do_swap() themselves, which must data back to when Packet instantiation was not guarded by a lock (thus requiring the collaboration of targets to ensure no new Packets were created as the swap if being performed). From now targets are notified using the swap_notify_() virtual method, which targets can override. Fixes #905
- Loading branch information
1 parent
49e9517
commit 498202d
Showing
6 changed files
with
44 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters