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 6075D1B87F2; Tue, 12 Aug 2025 18:15:17 +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=1755022517; cv=none; b=UlpuJEMijQFTnr8FXUwQKfX/HOhvPprE4lwollwBj1h6J5L0VZPyqOdEvA4qYRJ4gWdMW3cZ+p/nGzRgw7NqsaDJKuvq/Ov0Lw6AX0fUCg91vuCKUp7Q5bwrBYNh2VxHyshvj6Zphfpzsd2HdOsOfpGyu6L854GTsww+mUlnh7U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755022517; c=relaxed/simple; bh=QouSgZ350FXJpZf6MzUhgjY60WCDtqW5VgrHQzk0ylQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Nd+Z4p31jlShkpjt30T6tHFQu1aErHyjBOv6yIYrsS67fJfaik34/csyENSjlwfFlC7haGKT+Tvamo300ghRcR6+gXIJo9M9fOsiCMOz3mUOY4dmghkvlzjYKM0YrmFi4bldJo3AekI+OJLuZV6jCM2s28nQcz2V+fGr4t1si60= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bw/H44yV; 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="bw/H44yV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3BE0C4CEF0; Tue, 12 Aug 2025 18:15:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755022517; bh=QouSgZ350FXJpZf6MzUhgjY60WCDtqW5VgrHQzk0ylQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bw/H44yVTijx6YjqdXtrSGCwPjGgv9VZ9Kz6k7mvaoSDuOZ+1GbmHmiYcVX8XdtpV 9ToPvYl7aDTZ3OoJsL2kYPMD6jFLRfZBCvN45j9WAanJ4rOL6UhGyzyXKRFjHR2MEu BZ+tnNvhJ5HHbxlhOvgboPn7qvQyPPekg9BbX0pk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Xiumei Mu , Shannon Nelson , Hangbin Liu , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.12 144/369] selftests: rtnetlink.sh: remove esp4_offload after test Date: Tue, 12 Aug 2025 19:27:21 +0200 Message-ID: <20250812173020.199364360@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250812173014.736537091@linuxfoundation.org> References: <20250812173014.736537091@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.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Xiumei Mu [ Upstream commit 5b32321fdaf3fd1a92ec726af18765e225b0ee2b ] The esp4_offload module, loaded during IPsec offload tests, should be reset to its default settings after testing. Otherwise, leaving it enabled could unintentionally affect subsequence test cases by keeping offload active. Without this fix: $ lsmod | grep offload; ./rtnetlink.sh -t kci_test_ipsec_offload ; lsmod | grep offload; PASS: ipsec_offload esp4_offload 12288 0 esp4 32768 1 esp4_offload With this fix: $ lsmod | grep offload; ./rtnetlink.sh -t kci_test_ipsec_offload ; lsmod | grep offload; PASS: ipsec_offload Fixes: 2766a11161cc ("selftests: rtnetlink: add ipsec offload API test") Signed-off-by: Xiumei Mu Reviewed-by: Shannon Nelson Reviewed-by: Hangbin Liu Link: https://patch.msgid.link/6d3a1d777c4de4eb0ca94ced9e77be8d48c5b12f.1753415428.git.xmu@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- tools/testing/selftests/net/rtnetlink.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh index 87dce3efe31e..8a92432177d3 100755 --- a/tools/testing/selftests/net/rtnetlink.sh +++ b/tools/testing/selftests/net/rtnetlink.sh @@ -738,6 +738,11 @@ kci_test_ipsec_offload() sysfsf=$sysfsd/ipsec sysfsnet=/sys/bus/netdevsim/devices/netdevsim0/net/ probed=false + esp4_offload_probed_default=false + + if lsmod | grep -q esp4_offload; then + esp4_offload_probed_default=true + fi if ! mount | grep -q debugfs; then mount -t debugfs none /sys/kernel/debug/ &> /dev/null @@ -831,6 +836,7 @@ EOF fi # clean up any leftovers + ! "$esp4_offload_probed_default" && lsmod | grep -q esp4_offload && rmmod esp4_offload echo 0 > /sys/bus/netdevsim/del_device $probed && rmmod netdevsim -- 2.39.5