Skip to content

Commit 1012014

Browse files
jacob-kellerdavem330
authored andcommitted
fm10k: don't reinitialize RSS flow table when RXFH configured
Also print an error message incase we do have to reconfigure as this should no longer happen anymore due to ethtool changes. If it somehow does occur, user should be made aware of it. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 8bf3686 commit 1012014

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

drivers/net/ethernet/intel/fm10k/fm10k_main.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1937,15 +1937,21 @@ static void fm10k_init_reta(struct fm10k_intfc *interface)
19371937
u16 i, rss_i = interface->ring_feature[RING_F_RSS].indices;
19381938
u32 reta, base;
19391939

1940-
/* If the netdev is initialized we have to maintain table if possible */
1941-
if (interface->netdev->reg_state != NETREG_UNINITIALIZED) {
1940+
/* If the Rx flow indirection table has been configured manually, we
1941+
* need to maintain it when possible.
1942+
*/
1943+
if (netif_is_rxfh_configured(interface->netdev)) {
19421944
for (i = FM10K_RETA_SIZE; i--;) {
19431945
reta = interface->reta[i];
19441946
if ((((reta << 24) >> 24) < rss_i) &&
19451947
(((reta << 16) >> 24) < rss_i) &&
19461948
(((reta << 8) >> 24) < rss_i) &&
19471949
(((reta) >> 24) < rss_i))
19481950
continue;
1951+
1952+
/* this should never happen */
1953+
dev_err(&interface->pdev->dev,
1954+
"RSS indirection table assigned flows out of queue bounds. Reconfiguring.\n");
19491955
goto repopulate_reta;
19501956
}
19511957

0 commit comments

Comments
 (0)