On 2024-07-10 10:59 p.m., Paul Menzel wrote:
Dear Ahmed, dear Junfeng,
Thank you for the patch.
Am 10.07.24 um 22:40 schrieb Ahmed Zaki:
From: Junfeng Guo <junfeng....@intel.com>
The SWAP Flag in the FDIR Programming Descriptor doesn't work properly,
it is always set and cannot be unset (hardware bug).
Please document the datasheet/errata.
Unfortunately, I don't think this is in any docs or errata.
Thus, add a method
to effectively disable the FDIR SWAP option by setting the FDSWAP instead
of FDINSET registers.
Please paste the new debug messages.
What debug messages? If you mean the ones logged by ice_debug() in this
patch, please note fvw_num = 48 for the parser. So that's 96 lines of:
swap wr(%d, %d): 0x%x = 0x%08x
inset wr(%d, %d): 0x%x = 0x%08x
Reviewed-by: Marcin Szycik <marcin.szy...@linux.intel.com>
Signed-off-by: Junfeng Guo <junfeng....@intel.com>
Signed-off-by: Ahmed Zaki <ahmed.z...@intel.com>
---
.../net/ethernet/intel/ice/ice_flex_pipe.c | 52 ++++++++++++++++++-
.../net/ethernet/intel/ice/ice_flex_pipe.h | 4 +-
drivers/net/ethernet/intel/ice/ice_flow.c | 2 +-
3 files changed, 54 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
b/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
index 20d5db88c99f..a750d7e1edd8 100644
--- a/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
+++ b/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
@@ -2981,6 +2981,51 @@ ice_add_prof_attrib(struct ice_prof_map *prof,
u8 ptg, u16 ptype,
}
/**
+ * ice_disable_fd_swap - set register appropriately to disable FD swap
Below you write SWAP all uppercase.
Will fix.
+ * @hw: pointer to the HW struct
+ * @prof_id: profile ID
+ *
+ * Return: Void.
+ */
+static void
+ice_disable_fd_swap(struct ice_hw *hw, u8 prof_id)
+{
+ u16 swap_val, i, fvw_num;
Try to use non-fixed-width types, where possible.
Sure, will fix i and j here.
+
+ swap_val = ICE_SWAP_VALID;
+ fvw_num = hw->blk[ICE_BLK_FD].es.fvw / ICE_FDIR_REG_SET_SIZE;
+
+ /* Since the SWAP Flag in the Programming Desc doesn't work,
+ * here add method to disable the SWAP Option via setting
+ * certain SWAP and INSET register sets.
+ */
+ for (i = 0; i < fvw_num ; i++) {
+ u32 raw_swap, raw_in;
+ u8 j;
unsigned int
Thanks.