Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] In commit "ice: use global queue index in TC to-queue offload",
the PF-to-global queue conversion is done only where the value is…
--
ice: use global queue index in TC to-queue offload
The patch changes the queue ID programmed for TC flower to-queue rules
from the PF-relative index to the global index. It does this by adding
hw->func_caps.common_cap.rxq_first_id in ice_add_tc_flower_adv_fltr().
Before this, rules failed on every PF except PF0.
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/intel/ice/ice_tc_lib.c b/drivers/net/ethernet/intel/ice/ice_tc_lib.c
index d20357c041273..6f49ecb4165b2 100644
--- a/drivers/net/ethernet/intel/ice/ice_tc_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_tc_lib.c
@@ -1202,7 +1202,8 @@ ice_add_tc_flower_adv_fltr(struct ice_vsi *vsi,
break;
case ICE_FWD_TO_Q:
/* HW queue number in global space */
- rule_info.sw_act.fwd_id.q_id = tc_fltr->action.fwd.q.hw_queue;
+ rule_info.sw_act.fwd_id.q_id = tc_fltr->action.fwd.q.hw_queue +
+ hw->func_caps.common_cap.rxq_first_id;
[Severity: Low]
After this change, tc_fltr->action.fwd.q.hw_queue still holds a
PF-relative value. Is the comment on that field in struct
ice_tc_flower_action still accurate?
drivers/net/ethernet/intel/ice/ice_tc_lib.h:
u16 queue; /* forward to queue */
/* To add filter in HW, absolute queue number in global
* space of queues (between 0...N) is needed
*/
u16 hw_queue;
ice_tc_forward_to_queue() still sets it from the PF-relative rxq_map,
which indexes pf->avail_rxqs:
fltr->action.fwd.q.hw_queue = vsi->rxq_map[queue];
Both dev_dbg() calls in ice_add_tc_flower_adv_fltr() that print
"(HW queue %u)" still print tc_fltr->action.fwd.q.hw_queue:
dev_dbg(dev, "add switch rule action to forward to queue:%u (HW queue %u), lkups_cnt:%u\n",
tc_fltr->action.fwd.q.queue,
tc_fltr->action.fwd.q.hw_queue, lkups_cnt);
dev_dbg(dev, "added switch rule (lkups_cnt %u, flags 0x%x), action is forward to queue: %u (HW queue %u) , rid %u, rule_id %u\n",
lkups_cnt, flags, tc_fltr->action.fwd.q.queue,
tc_fltr->action.fwd.q.hw_queue, rule_added.rid,
rule_added.rule_id);
On any PF where rxq_first_id is non-zero, these messages now show a
different queue from the one written into fwd_id.q_id.
Would it make sense to add rxq_first_id where hw_queue is assigned in
ice_tc_forward_to_queue()? That would keep the stored value, the
comment and the debug output matching what is programmed. The other
option is to update the comment and the log labels to say the value is
PF-relative.
rule_info.sw_act.vsi_handle = dest_vsi->idx;
rule_info.priority = ICE_SWITCH_FLTR_PRIO_QUEUE;
rule_info.sw_act.src = hw->pf_id;
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261113231225.1864810-1-anthony.l.nguyen%40intel.com