[dpdk-dev] Bug in i40e PMD for flexible payload
Michael Habibi
mikehabibi at gmail.com
Wed Mar 23 19:44:46 CET 2016
We are using the i40 implementation to configure flow director with
flexible payload rules. When setting up rules, it allows you to set a value
to 63 to disable the rule (NONUSE_FLX_PIT_DEST_OFF). However, the macro in
question is always adding an offset value 50
(I40E_FLX_OFFSET_IN_FIELD_VECTOR). This doesn't work when you use it in
conjunction with NONUSE_FLX_PIT_DEST_OFF to disable it, because instead of
taking 63 as is, it does 63 + 50 and breaks the functionality.
We used the following fix and it appears to work. Just sharing with the
DPDK team in case they want to bring it in.
Index: i40e_fdir.c
===================================================================
--- i40e_fdir.c (revision 30006)
+++ i40e_fdir.c (working copy)
@@ -90,7 +90,8 @@
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) + ((dst_offset < NONUSE_FLX_PIT_DEST_OFF) ? \
+ I40E_FLX_OFFSET_IN_FIELD_VECTOR : 0)) << \
I40E_PRTQF_FLX_PIT_DEST_OFF_SHIFT) & \
I40E_PRTQF_FLX_PIT_DEST_OFF_MASK))
More information about the dev
mailing list