From patchwork Sat Feb 24 09:04:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 13570318 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 B876717731 for ; Sat, 24 Feb 2024 09:04:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708765486; cv=none; b=q5dSY93zDz701IG5uNf1PJRYzLm628wkrmdBFE7LXt778zJ3eIUOhPmBHaYqPzxJAwxMNQf0QvUu3HkjpQrugRdukmsOsTH0DxdlE/Owtn0EP3fU1LIov31EFVjhkinCchffIxKjFOrZm+gUEYOzAUWrwl/6x2Q0rZjXQ6xkulY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708765486; c=relaxed/simple; bh=2bvz0RaABemvB2mAnUI+y9KXZ+nJBiW2+3XKY5GafdE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=ajregrXzLOoE6bmPhokuDvo5Wa8VB8S2Ykl/b1nu6uQA1Q/52icaUUwiS5p9zzqXGK0oCF4n4LiiQfrdZEMoZZoD+Jw7LSfKY8ypuihnwuyj8ySPBOYaN8vs97d4UxUeD65FTmW+0XDVcn/ywUGwaeUHVFBB54nr5FxrBkCsiZw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=arista.com; spf=pass smtp.mailfrom=arista.com; dkim=pass (2048-bit key) header.d=arista.com header.i=@arista.com header.b=Y548vkAX; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=arista.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arista.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arista.com header.i=@arista.com header.b="Y548vkAX" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4129e978a5fso773515e9.0 for ; Sat, 24 Feb 2024 01:04:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=google; t=1708765482; x=1709370282; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Y9oap1u4maFj8x6QB6Yv5BBkUdae4vegOH6+ONA60ss=; b=Y548vkAXhubs8Z/ze6bQEzkKASCNo93gyEsT+0s9GIxzq/KL1q9hMtmWnHCPzXIP28 kqQ+u3RMfxCkJXsOF9zF87r+VDTCSz+K56ZxMS3IunmHfct0Aa1npsrWdDFi1TCZbHC2 /KIJHrohkamm9HdpalxaX5NwdG+Y7nrhwcMxtaJRseYm99++aX34Lo75QNYa4qaWyJRH j1bkoYHUWYxT6R2rpBhWhue1jAf02CP4Q2O448rP0dCwuHMIv3aVJDeQOvhphJOgDMVZ wRhmGGgYfEV/ICw9Q0rFEjhQdeEXG7D01IFTENx++zW42bWU+95s4S3JUG0PSqc2AeQg hlzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708765482; x=1709370282; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Y9oap1u4maFj8x6QB6Yv5BBkUdae4vegOH6+ONA60ss=; b=brdyKNu26DPxDqowvhEwm8AwCHcVbcq1LjCqHmGRR8W4pzv139tmUOAX0BBppJ2cyb lZKE9ywa3gl5BVjzhciS3SWUAOmKDBS0PYzfH80ggtm8W55tGtz6Bdja22dkDyM8gJnu 62kKEttv0Cwa0LYZcMjD7psJ5/hVUr4M0+QCXK9K7ry7A0keb7iaynnMj+FuHSdQ+Tuu zopYnVCUHhh3UxA7MFzPwr2Yx/tAv9dflyKWLk7AQyZ3uSFq+REz9HzmPiVwXo3H+YlR mMAIPM7fx3JjeQRDoxzeys41Jf9e89TWw0fTgLLEERhw9ODhhtI2nxQ98CAhZ9hAPZ2s U/MA== X-Forwarded-Encrypted: i=1; AJvYcCWN29pXyF+klGRC4tJTe/+B0uLat4l9mvflZmzLC6R5wjNHjeGIqU+Cp+scdfMT4nNkqMvpOsiWy0Pa5bviYyq1uNNwT6xN X-Gm-Message-State: AOJu0YwTbYjVVvupdF5MCd5FiUz7v36UvlpcDvcKzI97L0GJKVf1oaf0 vXOmTxsF9TBCLrqwvDUzo6aVo1KyBUucWSkqZTrt1zPadVc4RvI6gGaY38zNJw== X-Google-Smtp-Source: AGHT+IEcyO8NJxp+wsPVPxwvDnVNJrMpXXH3Qo40PN1JaIPl7oWt3xo4EP5Ts6f9gNiSH8Hq5NdeBw== X-Received: by 2002:a05:600c:5023:b0:411:eb73:243b with SMTP id n35-20020a05600c502300b00411eb73243bmr1255421wmr.5.1708765482074; Sat, 24 Feb 2024 01:04:42 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id m6-20020a7bce06000000b00410bca333b7sm5320593wmc.27.2024.02.24.01.04.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 01:04:41 -0800 (PST) From: Dmitry Safonov To: Eric Dumazet , "David S. Miller" , Jakub Kicinski , Paolo Abeni , David Ahern , Shuah Khan , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers Cc: Dmitry Safonov , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Dmitry Safonov <0x7f454c46@gmail.com> Subject: [PATCH net-next 00/10] net/tcp: TCP-AO and TCP-MD5 tracepoints Date: Sat, 24 Feb 2024 09:04:08 +0000 Message-ID: <20240224-tcp-ao-tracepoints-v1-0-15f31b7f30a7@arista.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mailer: b4 0.13-dev-b6b4b X-Developer-Signature: v=1; a=ed25519-sha256; t=1708765347; l=2977; i=dima@arista.com; s=20231212; h=from:subject:message-id; bh=lLZCReK3ZzYvXtLqDF+R0iwQ1yaEauus+KvH0+vWic8=; b=NugEbW75fCKkDgfn3+AcpEDu+0iEc0KVHGPrv1p3Os/iJMBhc+JXO8gFuW0FLA47yz2UET5GM WFA4lYfgHGlAbGlH144UecbPi9h9XBX2QkDHrzHPXMwxBJOvBO8pKkn X-Developer-Key: i=dima@arista.com; a=ed25519; pk=hXINUhX25b0D/zWBKvd6zkvH7W2rcwh/CH6cjEa3OTk= X-Patchwork-Delegate: kuba@kernel.org I tried to split it a bit, maybe I could even go further and split by TRACE_EVENT_CLASS() changes, but not sure if it adds any value. But at least all preparation patches are separate. I wasn't sure if I should just remove tcp_hash_fail() as I did in this version, or rather put it under CONFIG_TCP_..., making it disabled by default and with a warning of deprecated, scheduled for removal. Maybe this won't cause any problems for anybody and I'm just too cautious of breaking others. Anyways, version 1, thanks for any reviews! Signed-off-by: Dmitry Safonov --- Dmitry Safonov (10): net/tcp: Use static_branch_tcp_{md5,ao} to drop ifdefs net/tcp: Add a helper tcp_ao_hdr_maclen() net/tcp: Move tcp_inbound_hash() from headers net/tcp: Add tcp-md5 and tcp-ao tracepoints net/tcp: Remove tcp_hash_fail() selftests/net: Clean-up double assignment selftests/net: Provide test_snprintf() helper selftests/net: Be consistnat in kconfig checks selftests/net: Don't forget to close nsfd after switch_save_ns() selftest/net: Add trace events matching to tcp_ao include/net/tcp.h | 79 +- include/net/tcp_ao.h | 42 +- include/trace/events/tcp.h | 317 ++++++++ net/ipv4/tcp.c | 86 ++- net/ipv4/tcp_ao.c | 24 +- net/ipv4/tcp_input.c | 8 +- net/ipv4/tcp_ipv4.c | 8 +- net/ipv4/tcp_output.c | 2 + tools/testing/selftests/net/tcp_ao/Makefile | 2 +- tools/testing/selftests/net/tcp_ao/bench-lookups.c | 2 +- tools/testing/selftests/net/tcp_ao/connect-deny.c | 18 +- tools/testing/selftests/net/tcp_ao/connect.c | 2 +- tools/testing/selftests/net/tcp_ao/icmps-discard.c | 2 +- .../testing/selftests/net/tcp_ao/key-management.c | 18 +- tools/testing/selftests/net/tcp_ao/lib/aolib.h | 150 +++- tools/testing/selftests/net/tcp_ao/lib/ftrace.c | 846 +++++++++++++++++++++ tools/testing/selftests/net/tcp_ao/lib/kconfig.c | 31 +- tools/testing/selftests/net/tcp_ao/lib/setup.c | 15 +- tools/testing/selftests/net/tcp_ao/lib/sock.c | 1 - tools/testing/selftests/net/tcp_ao/lib/utils.c | 26 + tools/testing/selftests/net/tcp_ao/restore.c | 18 +- tools/testing/selftests/net/tcp_ao/rst.c | 2 +- tools/testing/selftests/net/tcp_ao/self-connect.c | 19 +- tools/testing/selftests/net/tcp_ao/seq-ext.c | 10 +- .../selftests/net/tcp_ao/setsockopt-closed.c | 2 +- tools/testing/selftests/net/tcp_ao/unsigned-md5.c | 28 +- 26 files changed, 1576 insertions(+), 182 deletions(-) --- base-commit: d662c5b3ce6dbed9d0991bc83001bbcc4a9bc2f8 change-id: 20240224-tcp-ao-tracepoints-0ea8ba11467a Best regards,