[v1,14/30] net/i40e/base: do not load DDP packages with reserved track ID
Checks
Commit Message
From: Artur Tyminski <arturx.tyminski@intel.com>
Packages with reserved track IDs should not be loaded, yet currently, the
driver will only check one of the reserved ID's, but not the other.
Fix the DDP package loading to also check for the other reserved track ID.
Signed-off-by: Artur Tyminski <arturx.tyminski@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@@ -8048,7 +8048,8 @@ i40e_validate_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,
u32 sec_off;
u32 i;
- if (track_id == I40E_DDP_TRACKID_INVALID) {
+ if (track_id == I40E_DDP_TRACKID_INVALID ||
+ track_id == I40E_DDP_TRACKID_RDONLY) {
i40e_debug(hw, I40E_DEBUG_PACKAGE, "Invalid track_id\n");
return I40E_NOT_SUPPORTED;
}