]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
enic: fix incorrect MTU comparison in enic_change_mtu()
authorAlok Tiwari <alok.a.tiwari@oracle.com>
Sat, 28 Jun 2025 14:56:05 +0000 (07:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jul 2025 13:57:46 +0000 (15:57 +0200)
commit1fba51f021b2512ca8e62f9455d1c18db590fa80
tree7fdc7f24dd0da27d4dc89991fdd2b3f7bf4ac39e
parent52b4b2e85e6325df8a42b5e5b364e4c07a4bf017
enic: fix incorrect MTU comparison in enic_change_mtu()

[ Upstream commit aaf2b2480375099c022a82023e1cd772bf1c6a5d ]

The comparison in enic_change_mtu() incorrectly used the current
netdev->mtu instead of the new new_mtu value when warning about
an MTU exceeding the port MTU. This could suppress valid warnings
or issue incorrect ones.

Fix the condition and log to properly reflect the new_mtu.

Fixes: ab123fe071c9 ("enic: handle mtu change for vf properly")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Acked-by: John Daley <johndale@cisco.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250628145612.476096-1-alok.a.tiwari@oracle.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/cisco/enic/enic_main.c