Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1295472rbb; Mon, 26 Feb 2024 05:15:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV0hZV5smJdMd5qzi3oJ7DQz56zPqw7bm/n+QMm82DuVGZ/GdlEclq8FDM2/XPW8k+3xOzK2ifKxbhX/mV01hSSRvGtfDzE5hWM9KChIw== X-Google-Smtp-Source: AGHT+IGOjGR8R/MSBju1KHR7nVyRIGeGORLyg1f1oOyvkNa9iZ6GpaE8rAN/1GWzlU+gKCRTBUcy X-Received: by 2002:a05:6214:f6f:b0:68f:45f9:a21a with SMTP id iy15-20020a0562140f6f00b0068f45f9a21amr9128317qvb.10.1708953300072; Mon, 26 Feb 2024 05:15:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708953300; cv=pass; d=google.com; s=arc-20160816; b=CHHN+IPh+vxVarx0i69QTh4DeEPHWzzQoGnx/jEReFPUestcQaCJcY8iKu+64bB9rJ xofdTin94dlWCK5FHECPyoyEWvxlL5EgwlGyBZCdYaUFkRmBMl29thNaiA4zZA3BSHYS qCCHg8Il200/HawDvC9KAm1BUsqpWhQ5bSFU5eJnpNMk6vw3sBV5khvvWgZMnvwpyI2c 4twRcVaNscS+yo1403yEgkwPgAdrezYND17WzBo1y/MFHzKnz01B33k9uuJLCEjgVaoV H/XWVuRlFxiqB3bsZKkrHvW/FW9cTaNRnkd4dQG5fvEI60f+IqPM4+pDNA1+ak2h3EyO q/oA== 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=xQqygCkowYJ0wbpEt85TCJ7aXSvzWcfLImX4V5j/zn4=; fh=1UEXF8WEdTRZGz3zsBPr9blJ8rxkIELeUsA6ymhnv1o=; b=UmCG22TEzjxVeeZWlNu10gbE9TwqXD6+shcEuG1C3O2gcrMviNvu6UQGNqaXjKGU/2 wYXH2F6cRxkZS86MXxu7X6att+pq/zreOVszkWnl5qDC5IBRMb+0RnqRURrh4KKNR1SW g0bgVb5FF/KepoM/LgqpuFnfUuOOPDWCriAnqN4P2ZgKpaNGRXPKIpcEX1B+crrL5ckp y8DDYBEA5SrgeKUHBhVrqVInM4Ddh/tFLPinW1CFP1nPhQb6GXY7hMyRmQ+hMpJF0Ip8 uFIJVjaMI7nmZNFWbl3xZdSPQaPoiqIV6k30MvKPmQ7prpB/iEnEVCQXvldAQxjoAk// SZMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@uliege.be header.s=ulg20190529 header.b=227SmRAF; 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-81460-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81460-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=uliege.be Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id gi8-20020a056214248800b0069008ac1110si2379386qvb.146.2024.02.26.05.14.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 05:15:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81460-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@uliege.be header.s=ulg20190529 header.b=227SmRAF; 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-81460-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81460-linux.lists.archive=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id A6E941C2896F for ; Mon, 26 Feb 2024 13:14:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E7EA127B75; Mon, 26 Feb 2024 13:14:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=uliege.be header.i=@uliege.be header.b="227SmRAF" 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 BE9D68562F; Mon, 26 Feb 2024 13:14:35 +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=1708953277; cv=none; b=YdGfQnZq8WAOyobuC6hWMZ3TWJZimsPx6JEEXCYJOOUqUyEs9wKTWCCbyX2Gob5hn+9yDrIBeZiVuMnTPeoB5cASZ4T4a99dmTq54FEMk1PUUE+k9VLK2ZOn0VAfklKdXn+9onmLS5S/8aEMoRmwHSeVtq+P0N26kVRBmu+lZg0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708953277; c=relaxed/simple; bh=4NXsgau3XXoMd95i2zOqL+DzcwfteHD/zed72UuBEEM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=eZoS+qiqKsMdsbu4xF0GdhzpZRT6dFOueE/vACND6C/M62RzTgCLifOBOhULuvr1eK60v6PDdrweswM7CDmTJxVYs488t7nvGWf1PKON0SNCt65GWuLXWvo6GKgfPOQTzhB6/GzsUvldO0bt8U8eBx87FdSrHKeSQwe+iEDompU= 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=227SmRAF; 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 D5765200F80B; Mon, 26 Feb 2024 14:14:33 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 serv108.segi.ulg.ac.be D5765200F80B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uliege.be; s=ulg20190529; t=1708953274; bh=xQqygCkowYJ0wbpEt85TCJ7aXSvzWcfLImX4V5j/zn4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=227SmRAF4jHqwHwxtSJS94Gs7S22S4mmG7HJ5Hod42N5LnNWtznnqE7AXWDrCLtUJ i/bXjZ91HN/oPzABcL8QJQiQR8Rj0N1tghKAwxbgeLU0k4DODr6XYVshzhXK5ezqgm /zyFhDxRoiefcJ7TXVjvS+hJ6uz4bIFKpoe7twKfL6sYcZFtMZ5O0PedE/lLmuKtyN lBnBgWo+aiZNRjnOaBdZ5BehKzyxSv3ewBfXReTZMlSJiZLZ9ZfArN8VISONeMniZJ 5Ght9LyV9D5f8knLOk4FUWZTiSjERw+IyVxb3KTk6U6WiJ6HY4o8fD2LolYCCkm9aR 8Jgorqo2I/HcA== 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 v5 3/3] net: exthdrs: ioam6: send trace event Date: Mon, 26 Feb 2024 14:14:12 +0100 Message-Id: <20240226131412.10214-4-justin.iurman@uliege.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240226131412.10214-1-justin.iurman@uliege.be> References: <20240226131412.10214-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 Content-Transfer-Encoding: 8bit If we're processing an IOAM Pre-allocated Trace Option-Type (the only one supported currently), then send the trace as an ioam6 event to the netlink multicast group. This way, user space apps will be able to collect IOAM data. Reviewed-by: David Ahern Signed-off-by: Justin Iurman --- net/ipv6/exthdrs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 02e9ffb63af1..727792907d6c 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c @@ -50,6 +50,7 @@ #endif #include #include +#include #include #include @@ -954,6 +955,9 @@ static bool ipv6_hop_ioam(struct sk_buff *skb, int optoff) + optoff + sizeof(*hdr)); ioam6_fill_trace_data(skb, ns, trace, true); + + ioam6_event(IOAM6_EVENT_TRACE, dev_net(skb->dev), + GFP_ATOMIC, (void *)trace, hdr->opt_len - 2); break; default: break; -- 2.34.1