]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ethtool: rss: fix falsely ignoring indir table updates
authorJakub Kicinski <kuba@kernel.org>
Fri, 22 May 2026 23:06:44 +0000 (16:06 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 26 May 2026 15:17:56 +0000 (08:17 -0700)
rss_set_prep_indir() compares the new indirection table against the
current one to determine whether any update is needed. The memcmp
call passes data->indir_size as the length argument, but indir_size
is the number of u32 entries, not the byte count.

Fixes: c0ae03588bbb ("ethtool: rss: initial RSS_SET (indirection table handling)")
Link: https://patch.msgid.link/20260522230647.1705600-4-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ethtool/rss.c

index a16ee1e8e6400ac57fae7b8f7348263a15df1bf7..458a4a7907e42fb79c5f7e9ec5496703d20c966b 100644 (file)
@@ -686,7 +686,7 @@ rss_set_prep_indir(struct net_device *dev, struct genl_info *info,
                                ethtool_rxfh_indir_default(i, num_rx_rings);
        }
 
-       *mod |= memcmp(rxfh->indir, data->indir_table, data->indir_size);
+       *mod |= memcmp(rxfh->indir, data->indir_table, alloc_size);
 
        return user_size;