]> git.baikalelectronics.ru Git - kernel.git/commit
netdevsim: don't overwrite read only ethtool parms
authorFilip Pokryvka <fpokryvk@redhat.com>
Fri, 10 Dec 2021 17:50:32 +0000 (18:50 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 11 Dec 2021 05:23:05 +0000 (21:23 -0800)
commit8b536df5bb470482f43b113f0fd427271ebe6e59
tree75a306c280d1fc067f64cdd6a59c82c044a79eb3
parent35609e337d9ff852ca30ffb1ceda5ccb52f1139c
netdevsim: don't overwrite read only ethtool parms

Ethtool ring feature has _max_pending attributes read-only.
Set only read-write attributes in nsim_set_ringparam.

This patch is useful, if netdevsim device is set-up using NetworkManager,
because NetworkManager sends 0 as MAX values, as it is pointless to
retrieve them in extra call, because they should be read-only. Then,
the device is left in incosistent state (value > MAX).

Fixes: 49586d364166 ("netdevsim: support ethtool ring and coalesce settings")
Signed-off-by: Filip Pokryvka <fpokryvk@redhat.com>
Link: https://lore.kernel.org/r/20211210175032.411872-1-fpokryvk@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/netdevsim/ethtool.c