Skip to contentSkip to conversation

igb: remove ASSERT_RTNL() from igb_write_rss_key()

PATCH In review Takashi Kozu 2 participants 2 messages Jul 11 – Jul 20

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igb: remove ASSERT_RTNL() from igb_write_rss_key()

igb_runtime_resume() calls __igb_resume() with rpm=true, which skips rtnl_lock() to avoid deadlocks. On that path __igb_open() -> igb_configure() -> igb_setup_mrqc() -> igb_write_rss_key() runs without rtnl held, so ASSERT_RTNL() fires a false-positive WARN on every runtime resume. Drop it.

Fixes dfaf57ef99cf ("igb: prepare for RSS key get/set support")
---
 drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/intel/igb/igb_ethtool.c +0 -2
index 65014a54a6d1..4eb586f9af99 100644
@@ -3031,8 +3031,6 @@ void igb_write_rss_key(struct igb_adapter *adapter)
 {
 	struct e1000_hw *hw = &adapter->hw;
 
-	ASSERT_RTNL();
-
 	for (int i = 0; i < IGB_RSS_KEY_SIZE / 4; i++) {
 		u32 val = get_unaligned_le32(&adapter->rss_key[i * 4]);
 
Signature · 1 line
2.54.0
reviewer
#1 lore raw
Quoted 5 lines · Takashi Kozu

igb_runtime_resume() calls __igb_resume() with rpm=true, which skips rtnl_lock() to avoid deadlocks. On that path __igb_open() -> igb_configure() -> igb_setup_mrqc() -> igb_write_rss_key() runs without rtnl held, so ASSERT_RTNL() fires a false-positive WARN on every runtime resume. Drop it.

Hi Takashi,

I think this patch description needs to explain why it is safe to run igb_write_rss_key() without holding RTNL.

Quoted 3 lines
Fixes dfaf57ef99cf ("igb: prepare for RSS key get/set support")

...