Message ID | 20240222134220.16698-4-justin.iurman@uliege.be |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-76619-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:aa16:b0:108:e6aa:91d0 with SMTP id by22csp259000dyb; Thu, 22 Feb 2024 05:44:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU3r0ux+gAoOZQTK5VdQ5nNH7g/+TxRmdgDKP77Q10MqVFo02v2iqC5Z3XvT3wzhonrVlmo5ptK4ov6EQaOU287KwqABA== X-Google-Smtp-Source: AGHT+IGDPZxiSVuhsdk9+5ZRpoQquMuaOsIbzukT0IYP+UtL6xDMF9M6aiH1eTbKJnWX0czXLej+ X-Received: by 2002:a0c:9c8e:0:b0:68f:c2b3:4671 with SMTP id i14-20020a0c9c8e000000b0068fc2b34671mr927841qvf.62.1708609444815; Thu, 22 Feb 2024 05:44:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708609444; cv=pass; d=google.com; s=arc-20160816; b=oLHwuYrfghejYY1VAKfPanfEILkWRPsP3DzrtS9wodj3rCo4ai7lwnJDqm/4nkWnHG SOcvSu0OTMdRGJp5ws2NXlVPHLSbuY9dnfwg9Nv4pDCRRUISnAgvt2xKca91nHNA+Abh lllSoO0kPnRexidAZNOVHTXWSR/cQorL280vJpAzjzRjDwXtIcNbiCMqQ+wjUrNF5Vs4 x9Vd3qYEMu7uJCcccO7ONHZUDLZqLa/jZRwcvCu2RIQp6E2nlYaynGumnYpBq+CeT62r XtkO2gW5VoPgF3PkTeaVNn3FjxmT4R7LezL5ar3ivvPiDRHsW6KuzuTdZxdE+BmWNiO9 MSww== 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=ohnw1X5t6/nbcUS24rw3MYJUUJQ4h7ERcV3d3m5S1+E=; fh=1UEXF8WEdTRZGz3zsBPr9blJ8rxkIELeUsA6ymhnv1o=; b=xPKQaQ6SwhT4Rcl5qIUMvVYhqwqg/m153ferIj2LZYFuAmP0UC39vk0wYwizK+x6a5 feFauhE3NRiqOS5+07L9/iAs/YCCkyKn0d58gNYOxp2QCiLb5YL2saEUPPtVbmUtHjPj 6oKiu+Uxvqv1Lh74SbH0lB2TCTmSuVJDuZ1hwCiQdPnCNgRswXKw1nj1PL7Ss1S1jeq9 16MCaAYcsppqHSTlhzAEDLm+dchFOWhjOsgL+myTWU/aAieH+bJPsHXdNMSEFiENFR1K auLWICsetf5OOrTHFrm8MOLVQdNgGXiV+JrPu5wUJEQaDA1hCI20+qMEACIfK82ZOW2P 7q8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@uliege.be header.s=ulg20190529 header.b=iisk8n9p; 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-76619-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76619-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=uliege.be Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id p13-20020a05621421ed00b0068f74b25787si8078669qvj.306.2024.02.22.05.44.04 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 05:44:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76619-ouuuleilei=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=iisk8n9p; 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-76619-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76619-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 990A41C23B91 for <ouuuleilei@gmail.com>; Thu, 22 Feb 2024 13:44:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF7E6148FF2; Thu, 22 Feb 2024 13:42:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=uliege.be header.i=@uliege.be header.b="iisk8n9p" 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 A60C9134CC2; Thu, 22 Feb 2024 13:42:45 +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=1708609367; cv=none; b=nrOoXUUadaIWHRUhNZKTtePIxu2LM6lSCXORiJc/gJkyJgPNHbTVqrdjJ+hlAD1rQGHbhHir751LSl0XS3xsRM4920eE/n3O3PkdXdcm4Csez0X+HnzTJowdcMXQ9qYmLbcY7TntDuyHQxelK8ubS7vOMTxwA8+4lwYxx2ri85Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708609367; c=relaxed/simple; bh=w7q0OZpmbQ4iJGkY22z3KyxTMX1Cmy0aLTK8x/4EEWI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RXmwjAaYWvU7l8ypgDYem2CIkqg9YyuRlGC6Gd9bbBN5BRfB4eDw2VSwNQGIOluktRkM2kJXzPE0rFqNoX/MV79WU0Wx6lXGrNS4A/f+I0CdiG1X4kswWN/iEG9stYpFm/LcnUIQJPwvMycFBZheZ9clxuXMlplEE5Dmh0drK1c= 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=iisk8n9p; 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 C0278200DF89; Thu, 22 Feb 2024 14:42:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 serv108.segi.ulg.ac.be C0278200DF89 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uliege.be; s=ulg20190529; t=1708609357; bh=ohnw1X5t6/nbcUS24rw3MYJUUJQ4h7ERcV3d3m5S1+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iisk8n9pS1HSF3c9g4DMHVKKJ3d5eaY+T4E/6zmc5LwNR8UV3FM0A23LacqY+FYFY RElvkOd88KFwQITaK0vcRozx/3P+vPYH+RbKAaS0IBM69aa8lYVmKmB1RyZk2MqIGF Uksz7mjdoPgXloV+s+jDfWPCX/v+PGdZS/3w8ZJ+RfTRJcvlDe7+yZtrvpruV85muR DyG2cVccIt+cRjlQ4vC+J20oxj1WY3ONiEfRjPRpYFRzXfeKurfPS2fKXeSJ5kygvO /nagO7TU9zg+Dvuv+TLWBesVpul5mleAAIodfNay3QXBagpnd2BStNqc43HjSKcBP7 b9BYep7N1kvOg== 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 v2 3/3] net: exthdrs: ioam6: send trace event Date: Thu, 22 Feb 2024 14:42:20 +0100 Message-Id: <20240222134220.16698-4-justin.iurman@uliege.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240222134220.16698-1-justin.iurman@uliege.be> References: <20240222134220.16698-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: 1791606857068350665 X-GMAIL-MSGID: 1791606857068350665 |
Series |
multicast event support for ioam6
|
|
Commit Message
Justin Iurman
Feb. 22, 2024, 1:42 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 | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 4952ae792450..b26dcf4d0239 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,11 @@ 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;