From patchwork Tue Feb 20 19:44:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Iurman X-Patchwork-Id: 203782 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp630040dyc; Tue, 20 Feb 2024 11:51:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUI+245qV+BCj0kdMh3e3TgxQ/EFvlSEpuLlfXA2ahFRYzUPs9JGTmxevFu4FG1NNOjPmiGMlWHMFyGI8X5BDZOIuay0g== X-Google-Smtp-Source: AGHT+IHRq1c6kA+H9oATySVwK9fXN5js21mizdDvzW8g2o87Xyn0Jp+eRVG8r0naO2j8vlCsj2j2 X-Received: by 2002:a05:6512:308d:b0:512:a8bd:4bee with SMTP id z13-20020a056512308d00b00512a8bd4beemr5976390lfd.45.1708458694191; Tue, 20 Feb 2024 11:51:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708458694; cv=pass; d=google.com; s=arc-20160816; b=vxKEbMoNc17c9zkZRXJdlFK2UsWY79kkWefagKbvEE2x8+iFhi3MsBwzDRVehj6RBS E4gk6+qNimvxrfkOA2qTpRpmD89UMGJzaY8KNnVZMP79JDUYcEVe0rWYBWiozSkUOyef e3luU4Spf7onNeRolMsZ6SUaPOLPbK7B293g8Ke4NA4FKL/lY4wqwJlXy/0RXHW5KGRT ToVyBYgLH+7/uKtxJ6sg+NwpvJ9KCyWSCogWRImaJH7RawExpaHFt9jvJSFRRS4wETxE rNvNMaquMsWb0NuG0mdFuYnL7sptP5h1QwsQ07h3xCh8ChEzpFl/GS6mS2eWqa/FVczu jMnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-filter; bh=L6uQoWV8E36c7sTdK4YsBrJRSuQm9ELTPqyqgTvcTrg=; fh=1UEXF8WEdTRZGz3zsBPr9blJ8rxkIELeUsA6ymhnv1o=; b=QOPPl9F195JDbM7lNSM3UT6zzdoZsJHaOQziP96qxxmDSYc59OV6ph6O8JkOmIiFQY 9REdXRUYIAayFMWTG10IaYHoS8vwFdO8ZhjiKKFCY8cQSNbesKI2Se0RtSD6wH6Q/qVt 2BAQj6kbmLm36ovJsFPWTbLwgc9F/xwlvm4Rvob2yyoajIezPle3z+gDkr7NwFfjwrDv jN29XykaO6uy4UfreXSQfBcjdWfP6NHfvXver0iyLpgNzg8htYX+ijuf63pn84M12O2+ PYdjKYojFrRR0j98Di7tHgVs2xCVgIrP7gdTw2ruwppbPcGx7jdVVWCxJNRYrtVYJAuB ylzA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@uliege.be header.s=ulg20190529 header.b=EfnG1XlK; arc=pass (i=1 spf=pass spfdomain=uliege.be dkim=pass dkdomain=uliege.be dmarc=pass fromdomain=uliege.be); spf=pass (google.com: domain of linux-kernel+bounces-73610-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73610-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=uliege.be Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id bx17-20020a170906a1d100b00a3df6ba2798si3238781ejb.853.2024.02.20.11.51.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 11:51:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73610-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@uliege.be header.s=ulg20190529 header.b=EfnG1XlK; arc=pass (i=1 spf=pass spfdomain=uliege.be dkim=pass dkdomain=uliege.be dmarc=pass fromdomain=uliege.be); spf=pass (google.com: domain of linux-kernel+bounces-73610-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73610-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=uliege.be Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DE0F41F25FF5 for ; Tue, 20 Feb 2024 19:46:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 43C8814D444; Tue, 20 Feb 2024 19:45:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=uliege.be header.i=@uliege.be header.b="EfnG1XlK" Received: from serv108.segi.ulg.ac.be (serv108.segi.ulg.ac.be [139.165.32.111]) (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 7AED514A0B5; Tue, 20 Feb 2024 19:45:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=139.165.32.111 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708458306; cv=none; b=P0FY0occA5mlIHEO58qLmRSgNo5FITdswKou0WBoxK6Te+GXsUf3JNG94eXk0QvRO2YEXxwMWcsOryD2uncGneC53SZPdr7qZ1AZ0i2LrS51zAh9LEzYZiRqVK+NNiVLmpd4qnF6n2ckSvbft1ihtPdbIMrZL4vsPz+l+Oe22gY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708458306; c=relaxed/simple; bh=xDvA4NOSaHeI0LBT+9dOO/oYhDt7h7z7NwciBr/tMGU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GWHU+jqcFQOyGc66fxZhGmAHsIriWR95A8MQsvNq5+Oc9U+YKKMe2Qv8DtYZXK3Z05DWNPxn33Gm/1g4+bwvM0KMukeCQxjpFYphgpmLuft3HcDJsQHct+BbAGHlYf79LGVNAjLwEdDqhL7wQYJYtxcEqIMiWJ+nU/U5WoF9uD8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uliege.be; spf=pass smtp.mailfrom=uliege.be; dkim=pass (2048-bit key) header.d=uliege.be header.i=@uliege.be header.b=EfnG1XlK; arc=none smtp.client-ip=139.165.32.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uliege.be Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=uliege.be Received: from localhost.localdomain (125.179-65-87.adsl-dyn.isp.belgacom.be [87.65.179.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by serv108.segi.ulg.ac.be (Postfix) with ESMTPSA id 578F1200BE63; Tue, 20 Feb 2024 20:44:57 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 serv108.segi.ulg.ac.be 578F1200BE63 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uliege.be; s=ulg20190529; t=1708458297; bh=L6uQoWV8E36c7sTdK4YsBrJRSuQm9ELTPqyqgTvcTrg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EfnG1XlKxx6HJYxNkJuRa+ksJ6Mn7KjTQOi0nQGXeOQbqdbmWIP+R4yTxWdtSh7gu TJ8MEgsNVrdfeFBz+1yhkjw02j7j7eGZi0X8IxDisfsOOKZLNMLNYOuwsYTB7qH6I7 eRAmuSWjvuShTjPLEROKfjbXUsVmKH+ar8UHEnOUHJsxxAZcciivEaQGJ9xtdrGZtd +iidu+HgjmSKitYQCDOGHlTdfGPPZSl7hbJ3474wJSuquxFl3s/ZECLjBWc3tnLPlE SQLnwpNI0dRf/3TfhaINWIdzGQUvMIj50TLzHy7AxYOaD4rqqtTo4TxmXeEHDSJFwt GKJ4u+9iEQbtg== From: Justin Iurman To: netdev@vger.kernel.org Cc: davem@davemloft.net, dsahern@kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.org, justin.iurman@uliege.be Subject: [PATCH net-next 1/3] uapi: ioam6: API for netlink multicast events Date: Tue, 20 Feb 2024 20:44:42 +0100 Message-Id: <20240220194444.36127-2-justin.iurman@uliege.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240220194444.36127-1-justin.iurman@uliege.be> References: <20240220194444.36127-1-justin.iurman@uliege.be> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791448783932802009 X-GMAIL-MSGID: 1791448783932802009 Add new api to support ioam6 events for generic netlink multicast. A first "trace" event is added to the list of ioam6 events, which will represent an IOAM Trace. It provides another solution to share IOAM data with user space (an alternative to IPv6 raw sockets combined with ancillary data). Signed-off-by: Justin Iurman --- include/uapi/linux/ioam6_genl.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/uapi/linux/ioam6_genl.h b/include/uapi/linux/ioam6_genl.h index ca4b22833754..1733fbc51fb5 100644 --- a/include/uapi/linux/ioam6_genl.h +++ b/include/uapi/linux/ioam6_genl.h @@ -49,4 +49,24 @@ enum { #define IOAM6_CMD_MAX (__IOAM6_CMD_MAX - 1) +#define IOAM6_GENL_EV_GRP_NAME "ioam6_events" + +enum ioam6_event_type { + IOAM6_EVENT_UNSPEC, + IOAM6_EVENT_TRACE, +}; + +enum ioam6_event_attr { + IOAM6_EVENT_ATTR_UNSPEC, + + IOAM6_EVENT_ATTR_TRACE_NAMESPACE, /* u16 */ + IOAM6_EVENT_ATTR_TRACE_NODELEN, /* u8 */ + IOAM6_EVENT_ATTR_TRACE_TYPE, /* u32 */ + IOAM6_EVENT_ATTR_TRACE_DATA, /* Binary */ + + __IOAM6_EVENT_ATTR_MAX +}; + +#define IOAM6_EVENT_ATTR_MAX (__IOAM6_EVENT_ATTR_MAX - 1) + #endif /* _UAPI_LINUX_IOAM6_GENL_H */