Thread (17 messages) 17 messages, 4 authors, 1d ago

Re: [PATCH net-next 04/11] igb: prepare for RSS key get/set support

From: Tony Nguyen <anthony.l.nguyen@intel.com>
Date: 2026-07-09 17:52:11

On 7/1/2026 2:02 PM, Tony Nguyen wrote:
From: Takashi Kozu <redacted>
...
+/**
+ * igb_write_rss_key - Program the RSS key into device registers
+ * @adapter: board private structure
+ *
+ * Write the RSS key stored in adapter->rss_key to the E1000 hardware registers.
+ * Each 32-bit chunk of the key is read using get_unaligned_le32() and written
+ * to the appropriate register.
+ */
+void igb_write_rss_key(struct igb_adapter *adapter)
+{
+	struct e1000_hw *hw = &adapter->hw;
+
+	ASSERT_RTNL();
Hi Takashi-san,

Sashiko flags this for the power management path.

"
Will the new ASSERT_RTNL() in igb_write_rss_key() trigger a false-positive
kernel warning during runtime power management resume?
When the device undergoes runtime PM suspend and then wakes up,
igb_runtime_resume() is called. This passes rpm=true to __igb_resume(), 
which
explicitly skips acquiring the rtnl_lock() to avoid deadlocks.
__igb_resume() then calls __igb_open(), which cascades to igb_configure(),
igb_setup_mrqc(), and finally igb_write_rss_key(). Because the lock is
intentionally not held on this path, the ASSERT_RTNL() will fail and 
trigger a
WARN_ONCE.
Is it possible to remove this assertion or adjust it to account for the
runtime PM resume path?
"

Kohei-san's version in igc did not have this and it does share similar 
flows with igc. I'm not sure if you added this for a specific reason but 
would you be able to send a follow up patch to adjust or remove this?

Thanks,
Tony
+
+	for (int i = 0; i < IGB_RSS_KEY_SIZE / 4; i++) {
+		u32 val = get_unaligned_le32(&adapter->rss_key[i * 4]);
+
+		wr32(E1000_RSSRK(i), val);
+	}
+}
+
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help