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 7331C33439F; Tue, 26 Aug 2025 14:31:50 +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=1756218710; cv=none; b=i4PD5HsDg3amuLcxiXWVoFc/U/uxW8ngWEq2uFPPb6rSsiNypyC/2W7Ws/hWYHAQBryZ7V5bZbukuP2fXzRtxHLzWsR6JjjBeVLB7HtVqVrB1aRarqS6RRVWW+2At6yKwHDShEmd9GhHRcTxsDSrj5n3qa9gZZYrk+/Z6ZTMQ5w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756218710; c=relaxed/simple; bh=iNVnPpeLyjWxUFRcD77VubNvgyl3A3lJYyE3r6ripgg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CW933XV3SvMMWhzhCS4qAXaKnQ/vsaPR7R+yeDo6kcKCUPfIUz/FOER1FFQD/YTWgoluWF6D45PVFCpkQyaSTLaduy7lxdsUPWNs3CGAKqLdDp0G5Hvh0WemdDr4axdWu7C1R3SFg1x5PMdyDkdHL5m7Kfyan05JOBO8Aevw0aI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VW81LEbN; 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="VW81LEbN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 054D8C4CEF1; Tue, 26 Aug 2025 14:31:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756218710; bh=iNVnPpeLyjWxUFRcD77VubNvgyl3A3lJYyE3r6ripgg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VW81LEbNhgLgo7umiuTeZ/4tkBp7xcKpBV3gZ3v2ZyfzqQRQKIG4UdEpM10diUj2U Qb5CEvWRDF3zg24K+4D07y7d3IPcVvUcFmLzHJzc8VJ9PtUWwh80B1vGb1qu62fm1G mLmQ8rGFkETPmLewYBVYkfLcQYVEuyLDvHCXa5t8= 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 5.4 103/403] selftests: rtnetlink.sh: remove esp4_offload after test Date: Tue, 26 Aug 2025 13:07:09 +0200 Message-ID: <20250826110909.523858324@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250826110905.607690791@linuxfoundation.org> References: <20250826110905.607690791@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 5.4-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 3b929e031f59..0c343954a17b 100755 --- a/tools/testing/selftests/net/rtnetlink.sh +++ b/tools/testing/selftests/net/rtnetlink.sh @@ -744,6 +744,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 # setup netdevsim since dummydev doesn't have offload support if [ ! -w /sys/bus/netdevsim/new_device ] ; then @@ -833,6 +838,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