net/i40e: fix disabling flex payload selection rule
When setting up the flexible paylaod selection rules, the value NONUSE_FLX_PIT_DEST_OFF (== 63) is meant to disable the rule. However, since the MK_FLX_PIT macro always added on an additional offset of I40E_FLX_OFFSET_IN_FIELD_VECTOR (== 50) to the value passed the functionality to disable the rule was broken. This patch fixes this by checking for the disable value and not adding the offset in that case. Fixes: d8b90c4eabe9 ("i40e: take flow director flexible payload configuration") Reported-by: Michael Habibi <mikehabibi@gmail.com> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com> Acked-by: Zhe Tao <zhe.tao@intel.com>
This commit is contained in:
parent
ca7e599d45
commit
19fec29373
@ -94,7 +94,9 @@
|
||||
I40E_PRTQF_FLX_PIT_SOURCE_OFF_MASK) | \
|
||||
(((fsize) << I40E_PRTQF_FLX_PIT_FSIZE_SHIFT) & \
|
||||
I40E_PRTQF_FLX_PIT_FSIZE_MASK) | \
|
||||
((((dst_offset) + I40E_FLX_OFFSET_IN_FIELD_VECTOR) << \
|
||||
((((dst_offset) == NONUSE_FLX_PIT_DEST_OFF ? \
|
||||
NONUSE_FLX_PIT_DEST_OFF : \
|
||||
((dst_offset) + I40E_FLX_OFFSET_IN_FIELD_VECTOR)) << \
|
||||
I40E_PRTQF_FLX_PIT_DEST_OFF_SHIFT) & \
|
||||
I40E_PRTQF_FLX_PIT_DEST_OFF_MASK))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user