From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B89BC423A83 for ; Tue, 31 Mar 2026 16:15:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774973741; cv=none; b=RHOFIn6xryaHMiPnY4zTIaHoDpvY+uoDIuoQVXzTbHO1Nrii4GzWeHZ37t/ECfIpGXAhz4VdeeZQjJSjvaUXnmEuWVV5jtlMgAPw6d20hzOKWWtjiNfjau78taOsrkLwf/L572Jte55yFzogAInLooQbWRYGNBzHUNCTZ7i7HMw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774973741; c=relaxed/simple; bh=hKEMFqZfvgYOMO1YrT/7Y7rOFl5qkcvC8gepax7N8Xo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=h057IwSDHH0k0y+J++hipA7V6vfEZzlPlZa8SD3MOS02zKbFZcUjtWoElNBbCe2EdDMl15t6O+XORbWRPpff4h7NNQcuNJZWQYhzcBcgpzy1FguyI8yZn/Nl1tFT3gOzS5jLfaXdXTrlik+PBO5B5VRrF273T5G8h+eH0kMmBY8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=6wind.com; spf=pass smtp.mailfrom=6wind.com; dkim=pass (2048-bit key) header.d=6wind.com header.i=@6wind.com header.b=LHShZf+M; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=6wind.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=6wind.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=6wind.com header.i=@6wind.com header.b="LHShZf+M" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-43d0292ae5aso161740f8f.0 for ; Tue, 31 Mar 2026 09:15:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; t=1774973732; x=1775578532; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:content-language :from:references:cc:to:subject:reply-to:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=xWJoAs4lXlq756+zLnymiNe5wTpOT6F6tvNtftPeNbM=; b=LHShZf+MiYc0Zvm1c2Bt9GVk9oIqswt4l0xdgVpxpP8h2BklEr5ub2i2J8g5GGbK0I GC2xKmeZmKC3PramCc8KRyDJ4qIgxf4ZOK1OChYVjnb3G5vq3NaJgsyazT9rCd0MJ2v0 ms6PTR2ZwP7LpX83t172o15EWpWzAXHRKGmh0Jgi3aKLkfAo1rLHbI5BCglolycwPP86 7kPsmm0FguAvDWKpB63Q1DihSWELi+Oe9liqzVw0yzHhIxNQOlVSubIYjWUSzdfq5Y5C 9CKUh3wlXFJX0xcF49Jncq0b1EketWE1y9fLg7Gtt9Dkx1YRwL23XYBP0qQDAJjAXw90 4epA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774973732; x=1775578532; h=content-transfer-encoding:in-reply-to:organization:content-language :from:references:cc:to:subject:reply-to:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xWJoAs4lXlq756+zLnymiNe5wTpOT6F6tvNtftPeNbM=; b=ShIbwoYzI8aEbfzRlCInidRRqYyqFMbI3GOUPsy5m+ywi2oTykWHNPhoh647iZHuu3 c0cvMm4zn8gc7d6r1imVxcN+cKPMJ2x9jXTmgwxdvLLKUAhm0w8s4sRNYoFqkEWIwRQZ RBqLuBOvGxa7fy1nDKU73GSBPvOWUgw5X316nhiJ0ONj3WmQDRSFfw0jUAUqAmonQeoP 4vg1tSP/jUjANZSeRp7MnHnfAwFWxgYgNpeaN4YiTPz2LNyd88REtqnSJQkwxPyPIVxA y+FiKmAupDT/D3aPaFM87xBv3zT+3FGXMfOlzJZHXOMMYB0aazalC9BdKTGzZpLCHRoG lFHQ== X-Forwarded-Encrypted: i=1; AJvYcCXxIC/BoT1lxU8N/rlD6/OdY/ZsNgyK95FWrL3xZVbGQ+dzQcFUwxrutREx55mkv6+MchHl1lMd2jH9+m4=@vger.kernel.org X-Gm-Message-State: AOJu0YzkXSvlzmmQ/mnTVXo+vH+HFOM4HXBaCZl8tRetQyQjcAAB8Yxh XD3Vllmk48NOhEdVdoGAoHXrIgoUkoiehTWRCIgPq1Ys0iEv98UpakTR2WWfYL3xwqs= X-Gm-Gg: ATEYQzzVA46lg/DchOvbPY3aOL3uCw+h/0PAGt2GIOQhNTz+1Hkzi7sAQAG6W9PnaHb 76d7z2Or9hN1gMlgcNGT8JGh2RjEflC0+ctbmcAJ/dyq4hCcQwhx8lBD85ZsblgvonlWN211Zyi rgYVxvm2j9G1Y4ElPfaLwAtRdk0PYTB+jgIIMvSSScq51hyCeHWHO0ab/lLZbLBwC8q42EnVPoA Z0Bdr2PimzatPJUllzC4WQhdAP6mZKEWRFebhW5h9u4BobxiEnrSpO0NVivbrYFJ+yys4POpTDk 0eg6wVi7R2W2W8Czw7HCy4xRtF0ksNSWM9EI4O+nQ02ZHfE9jUkOovkkAaV40tBaeX+hDpIE55U LXLB2Mmv/IJtsk0ijoJSc7sOkODgqXlZXsy3XyGp7IKqP4Z+pxMUTfFPVHdhEZps5RTkw2bTvAd jVRq8+NoXg5mswRa1t+2g5ucHZGYAG8Mt2E/gGrAf//+bxbMX1kbrpqtJfFI/p1TaeZEAi+9Xfm kt8 X-Received: by 2002:a05:600c:4755:b0:486:f7fd:9d7d with SMTP id 5b1f17b1804b1-48727f2ce17mr148692005e9.3.1774973731968; Tue, 31 Mar 2026 09:15:31 -0700 (PDT) Received: from ?IPV6:2a01:e0a:b41:c160:6a1d:efff:fe52:1959? ([2a01:e0a:b41:c160:6a1d:efff:fe52:1959]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43cf21e26basm26421086f8f.3.2026.03.31.09.15.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 Mar 2026 09:15:31 -0700 (PDT) Message-ID: Date: Tue, 31 Mar 2026 18:15:31 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Reply-To: nicolas.dichtel@6wind.com Subject: Re: [PATCH net 2/2] selftests: seg6: add test for dst_cache isolation in seg6 lwtunnel To: Andrea Mayer , netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, dsahern@kernel.org, david.lebrun@uclouvain.be, stefano.salsano@uniroma2.it, paolo.lungaroni@uniroma2.it, linux-kernel@vger.kernel.org, Shuah Khan , linux-kselftest@vger.kernel.org References: <20260331110755.25042-1-andrea.mayer@uniroma2.it> <20260331110755.25042-3-andrea.mayer@uniroma2.it> From: Nicolas Dichtel Content-Language: en-US Organization: 6WIND In-Reply-To: <20260331110755.25042-3-andrea.mayer@uniroma2.it> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le 31/03/2026 à 13:07, Andrea Mayer a écrit : > Add a selftest that verifies the dst_cache in seg6 lwtunnel is not > shared between the input (forwarding) and output (locally generated) > paths. > > The test creates three namespaces (ns_src, ns_router, ns_dst) > connected in a line. An SRv6 encap route on ns_router encapsulates > traffic destined to cafe::1 with SID fc00::100. The SID is > reachable only for forwarded traffic (from ns_src) via an ip rule > matching the ingress interface (iif veth-r0 lookup 100), and > blackholed in the main table. > > The test verifies that: > > 1. A packet generated locally on ns_router does not reach > ns_dst with an empty cache, since the SID is blackholed; > 2. A forwarded packet from ns_src populates the input cache > from table 100 and reaches ns_dst; > 3. A packet generated locally on ns_router still does not > reach ns_dst after the input cache is populated, > confirming the output path does not reuse the input > cache entry. > > Both the forwarded and local packets are pinned to the same CPU > with taskset, since dst_cache is per-cpu. > > Cc: Shuah Khan > Cc: linux-kselftest@vger.kernel.org > Signed-off-by: Andrea Mayer > --- [snip] > +test_cache_isolation() > +{ > + RET=0 > + > + # local ping with empty cache: must fail (SID is blackholed) > + if ip netns exec "${NS_RTR}" taskset -c 0 \ > + ping6 -c 1 -W 2 "${DEST}" &>/dev/null; then > + echo "SKIP: local ping succeeded with empty cache" Nit: maybe the same message as the forwarding case: "SKIP: local ping succeeded, topology broken" > + exit "${ksft_skip}" > + fi > + > + # forward from ns_src to populate the input cache > + if ! ip netns exec "${NS_SRC}" taskset -c 0 \ > + ping6 -c 1 -W 2 "${DEST}" &>/dev/null; then > + echo "SKIP: forwarded ping failed, topology broken" > + exit "${ksft_skip}" > + fi > + [snip] After that: Reviewed-by: Nicolas Dichtel