Thread (33 messages) 33 messages, 6 authors, 2025-10-24

Re: [PATCH net-next v2 05/14] ice: improve TCAM priority handling for RSS profiles

From: Jacob Keller <jacob.e.keller@intel.com>
Date: 2025-10-21 20:41:55
Also in: linux-doc, lkml


On 10/20/2025 6:16 PM, Jakub Kicinski wrote:
On Thu, 16 Oct 2025 23:08:34 -0700 Jacob Keller wrote:
quoted
+/**
+ * ice_set_tcam_flags - set TCAM flag don't care mask
+ * @mask: mask for flags
+ * @dc_mask: pointer to the don't care mask
+ */
+static void ice_set_tcam_flags(u16 mask, u8 dc_mask[ICE_TCAM_KEY_VAL_SZ])
+{
+	u16 *flag_word;
+
+	/* flags are lowest u16 */
+	flag_word = (u16 *)dc_mask;
+	*flag_word = ~mask;
Please don't cast pointers to wider types, get_unaligned() exists 
for a reason. BTW endian also exists, AFAIU, this will do a different
thing on BE and LE.
quoted
 /**
  * ice_adj_prof_priorities - adjust profile based on priorities
  * @hw: pointer to the HW struct
@@ -3688,10 +3733,17 @@ ice_adj_prof_priorities(struct ice_hw *hw, enum ice_block blk, u16 vsig,
 			struct list_head *chg)
 {
 	DECLARE_BITMAP(ptgs_used, ICE_XLT1_CNT);
+	struct ice_tcam_inf **attr_used;
 	struct ice_vsig_prof *t;
-	int status;
+	u16 attr_used_cnt = 0;
+	int status = 0;
 	u16 idx;
 
+	attr_used = devm_kcalloc(ice_hw_to_dev(hw), ICE_MAX_PTG_ATTRS,
attr_used is freed before exiting this function, every time.
Why the devm_* ?
Yep this should be removed. It likely came about from old legacy code
that used devm everywhere, before we started trying to remove or avoid
it except during long-lived allocations.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help