-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore original VF value when needed (#114)
This commit attempts to sort out (to some extent) how a VF configuration is restored. Until today, almost all VF configurations (except MAC) where restored to some hardcoded value. These values may not be desired by the system administrator or may be invalid for some NIC driver implementation. As an example, The behaviour of A VF where spoofchk is enabled and admin mac address is zero is not well defined and is left for the vendor driver implementors to define the behaviour. This may cause the NIC's embedded switch to block traffic from the VF, hence a POD will not be able to send traffic on that VF. Today, when a user does not specify MAC and Spoofchk values in network configuration will run into the issue described above when the VF is reused for a POD. To fix the issue, described above we take a similar approach to how Administrative MAC is saved and restored today. This commit: 1. Defines a new VF state struct which will save VF configurations to be used during configuration restoration which shall be saved together with the network confguration in cache. 2. Moves AdminMAC, EffectiveMAC attributes to the new struct 3. Saves the VF's state during CmdAdd flow 4. Conditionally restores all values to their saved state during ResetVFConfig() 5. Modifies order when restoring VF confguration to first restore spoofchk and then Administrative MAC 6. Enhances documentation under Mellanox to clarify the spoofchk and mac dependency.
- Loading branch information
1 parent
1d07d00
commit e051689
Showing
5 changed files
with
285 additions
and
101 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
Oops, something went wrong.