From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A9C02D9790; Tue, 8 Jul 2025 16:27:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751992038; cv=none; b=doIo3gexx0VgeWhyP5zXhQBFkeNunbujK5h9YRDbx7M492erXJQKtNgWqqWv3ODDqUuxXkiHiqZqK6hbCPaQ2tmttHc9Pi4WwPNFPb8HzvuBwgoz8v3pNfp6sxYDjUd5TmGIH4L99lUQplWRR6ZFb6tpu/HmMH8Yfv0jXd7zyRU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751992038; c=relaxed/simple; bh=E4tn0P5hfNAaJxIzDzWIO7XdI2SSIQzcLfc1digfPCc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D8s5vVeKmBx+Xtq2XrjMCIvO5OGTv5Syfv0YzNNtMZO64yfOTaO+uEd+5Qo/6WKDeSka+8YVclsxE6li3FIic0UaHOztzhla0KyqzGl5WVK2Pga3pgNATS3/LFKsxNqjGMICldqOqqQf/q6Eaz0BFGHILaNd3WoravrJqrDHRXo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JmE+oG+0; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="JmE+oG+0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18EACC4CEED; Tue, 8 Jul 2025 16:27:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751992038; bh=E4tn0P5hfNAaJxIzDzWIO7XdI2SSIQzcLfc1digfPCc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JmE+oG+0zJpeNEesh8pootPqn2cFrK9Y3rju1O8RRJ4tYtr04fh+T183K+KTZGNT1 Q4vQjpmgXp/Mll9KrnZDhlrFRvL7q4U9SrEB39TszzFaJtWzkqDvTofpMkVifqMvaT 7k0bRuJ8ednDIhGmvaiD2BKaT1GSdgSfuHCIXTH8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alok Tiwari , John Daley , Simon Horman , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.1 39/81] enic: fix incorrect MTU comparison in enic_change_mtu() Date: Tue, 8 Jul 2025 18:23:31 +0200 Message-ID: <20250708162226.226906803@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250708162224.795155912@linuxfoundation.org> References: <20250708162224.795155912@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alok Tiwari [ 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 Acked-by: John Daley Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250628145612.476096-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/cisco/enic/enic_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c index 2065c26f394db..c76a91f85dac4 100644 --- a/drivers/net/ethernet/cisco/enic/enic_main.c +++ b/drivers/net/ethernet/cisco/enic/enic_main.c @@ -2058,10 +2058,10 @@ static int enic_change_mtu(struct net_device *netdev, int new_mtu) if (enic_is_dynamic(enic) || enic_is_sriov_vf(enic)) return -EOPNOTSUPP; - if (netdev->mtu > enic->port_mtu) + if (new_mtu > enic->port_mtu) netdev_warn(netdev, "interface MTU (%d) set higher than port MTU (%d)\n", - netdev->mtu, enic->port_mtu); + new_mtu, enic->port_mtu); return _enic_change_mtu(netdev, new_mtu); } -- 2.39.5