Message ID | 20240220194444.36127-4-justin.iurman@uliege.be |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-73611-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp630038dyc; Tue, 20 Feb 2024 11:51:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVUsWCKajDBF69vqqtFDVQQ7Fs8PktgL0uc+HvjEw645MZICA7RFxMNEUhUR8/xZr7/ZDffnAziF47qMD3BtyZ0kgGroQ== X-Google-Smtp-Source: AGHT+IG5SrXEcfNdFJhfkUSHcJtXYerNMGNMMvM+/X0SKvq6spSvxYSqFT/vZfRm1hntW99BNZW/ X-Received: by 2002:aa7:da55:0:b0:564:e4ab:a82e with SMTP id w21-20020aa7da55000000b00564e4aba82emr826731eds.22.1708458693981; Tue, 20 Feb 2024 11:51:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708458693; cv=pass; d=google.com; s=arc-20160816; b=CSbAjN2+cS6feDopYw5pm+huUOs1VXD5DEG3MeL5SNsE+6o6Jx25zhz5TdJ5gsnDt5 EOLjG6jxmQ6NKD5ON94JPj/5JksR8cyYxn5tsLxSH5wch64TC9UNn3Y7MXnBu6tJKGjO YU/K6v7Idfs02GyypOs2xresjNX9wkjORxtflOZEbPahSrHhCM7gNtzB64okUt95ikAb x7F6MLG+0L16XQhBGZoX6UB1bz1g2RJx1UtEbh4n0+D+9Cm3IrYfwTf/4i3FCtQsoat0 ZLMPvEFS9poLAS5Nd++wUitOM7TyoSJbO2zas0RhPG4ottTSu6NM4EDcDZqFeOuOrUnC Z2fg== 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=Pe9EOigSbPGpF/JFfAS5gTarqG/9sPOHJ5Ve/ZtXLhA=; fh=1UEXF8WEdTRZGz3zsBPr9blJ8rxkIELeUsA6ymhnv1o=; b=yjL2Loj/QgunjHT4q3g6OyxYbLhozrToeTouMfy8uU6VrXfdr7UOlT9XAMgD0+GGQ2 irFlPcOlN20nbr3/5WZi6R4nrkS9s1t0aA1DvFMV/8WKsQYVNOFOPjeO4qgSg+YWrNY6 i3buV57BYqiljgLMXWDqtvKX+tGt46yjDuYXpkQBLVG74avUYvrGC4KFBTmhg3RtA2uK ItOefH5KUj6r3ksOJOPoZF1cqsnRb//xVHHRoBQL9NjzQjmkzZ7Pv0utq0PjRwtRN7hr k/jDACZxdMX2lBMc63OTQxSMjBOkBnKE7IKOrDe0k4KZWqPuETuBUMGIMwMwc3Y+WiCS ysqQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@uliege.be header.s=ulg20190529 header.b=DufjJbr4; 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-73611-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73611-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 cy28-20020a0564021c9c00b00560c04e1625si3535666edb.656.2024.02.20.11.51.33 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 11:51:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73611-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=DufjJbr4; 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-73611-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73611-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 D1BC11F260FB for <ouuuleilei@gmail.com>; Tue, 20 Feb 2024 19:46:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F138F14E2CA; 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="DufjJbr4" 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 C8524137C41; Tue, 20 Feb 2024 19:45:05 +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=1708458307; cv=none; b=ZiLWIUPNvPFpsb0Jqzw/gOWaPTd0bQSjQkoHFAdOj0lQdmIdWsdBUKz87cWs2PLOSq0BLlbB3bI36N/ZdbfFeYVIFWLH8BNsU/NGHK5hsOy6Ghf5HQVY2ZazaVFpOfJbzXSvikv2dOAwuBG2eblNz1QHPY7NIACYAuOkeoudGDo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708458307; c=relaxed/simple; bh=Mwj0/typD3aTrSkrgEntFoxq41yM+vCVAdUetDPy270=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PF7T06jlGZpFbNoe5NX9Q3u70jeTccB99h5QMNhEtsX0SZ2lhwXfYNHKwHqF0x3yIjhIBOn//PzNOxLgZaDIGeuIdQgt8FcnHiurxCKPilWKV9cVs9rEYTvuR9/gd8hLccd4wYdcwIn3MAJtCpxHJN9W8KcmNauuB2Gd4xiYkYQ= 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=DufjJbr4; 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 D9330200BE69; Tue, 20 Feb 2024 20:44:57 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 serv108.segi.ulg.ac.be D9330200BE69 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uliege.be; s=ulg20190529; t=1708458298; bh=Pe9EOigSbPGpF/JFfAS5gTarqG/9sPOHJ5Ve/ZtXLhA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DufjJbr4Mb6yBTitQ8EZjumKp4w2/Pw+Yk+/JobeoAwKGXo/7nWVlb6DlnU5NVxcz YpsqLHgfBZvq8iM2Ymz5PJpUfhsFpO5Y0CQbW4NiqmkpMd7yB0j+FrM6aIiNKmz/W+ aqaZ55z2obxZjIcPBVnz6t8+Nc3YXnXaZA+4H4KhGYOScqEAQ+swSDR8183982q4b4 3HVAIcxe9AQ4+IH23UvM0z4JqXZLRqmOFEYwVmIYegtuysVgRfcC5PaJ3CAnAEfET1 shPYohahtlZuHvB7TkEfMqf3gb33qj9wQ+UKCpbnqsihdRZpYVvEyDaa3eMYRIWxMI lEjnr94y5EzXQ== From: Justin Iurman <justin.iurman@uliege.be> 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 3/3] net: exthdrs: ioam6: send trace event Date: Tue, 20 Feb 2024 20:44:44 +0100 Message-Id: <20240220194444.36127-4-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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791448783416724941 X-GMAIL-MSGID: 1791448783416724941 |
Series |
multicast event support for ioam6
|
|
Commit Message
Justin Iurman
Feb. 20, 2024, 7:44 p.m. UTC
If we're processing an IOAM Pre-allocated Trace Option-Type (the only
one supported currently), and if we're the destination, then send the
trace as an ioam6 event to the multicast group. This way, user space
apps will be able to collect IOAM data (for a trace, it only makes sense
to send events if we're the destination).
Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
---
net/ipv6/exthdrs.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 4952ae792450..d1f96a28e190 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c @@ -50,6 +50,7 @@ #endif #include <net/rpl.h> #include <linux/ioam6.h> +#include <linux/ioam6_genl.h> #include <net/ioam6.h> #include <net/dst_metadata.h> @@ -944,6 +945,10 @@ static bool ipv6_hop_ioam(struct sk_buff *skb, int optoff) ip6_route_input(skb); ioam6_fill_trace_data(skb, ns, trace, true); + + if (skb_dst(skb)->dev->flags & IFF_LOOPBACK) + ioam6_event(IOAM6_EVENT_TRACE, dev_net(skb->dev), + GFP_ATOMIC, (void *)trace, hdr->opt_len-2); break; default: break;