From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) (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 A3E9C2F8BC3 for ; Sat, 8 Aug 2026 00:57:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786150652; cv=none; b=IegC26dBPkviObvATKo3WS3IUrt24/OT6wU6GMOlFdnajeWuHKxbC0v/TakPKAQwXO+QDyl/Ky4XMBS1fL1dCzCW1YpnfHan7y++YKTpixCWj/Z6/1yaRWzkHbD0umlvKvt8bAcnY2stoG2C4kAxM/QrxoJ+8tju2FArOzfnCgE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786150652; c=relaxed/simple; bh=RXRTAXtIAvF5W4zhV9XvNk6Eqr4bA6CJDR4OTuU8uKA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Fi+j8Gg3oI8ncdUVjV/W7oQSQQXmJ5AQaAqmy6rApcalB6HMKx9sqgDsGNY81rbss/DMdtxC4lHbt7AmtiWUaa1hxL+G7dysq6oPqAZ2PA/KxTTsMBttVUvFPyWtxwioYX/dLES83NWCobYUI744cPifxKB1Zy9oLuRqp1OyUlI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=pvUFkvks; arc=none smtp.client-ip=209.85.216.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pvUFkvks" Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-384930ca5e2so129203a91.3 for ; Fri, 07 Aug 2026 17:57:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786150651; x=1786755451; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to:content-type; bh=diMA3NQ10gzHFnNLk3VwTDac6B6hmowUzo1h66c0BkU=; b=pvUFkvksPeHuKWj+IZsJ7F5QsUK+omc8El8hI3uoMdXoUrbzGN666TcVLgyvIy1d+J JPib1bvOnnwLMazUztHEOBfk40VRUt6WHaAoKzpiWumEE9MGHMX6eNBYqK/VPU+AlmBv 6Jag3WolleR5Agxewig03Ko8eazJHaLmRzSe/T4kgEld1LRmTQwiWSJsG7nxfe4Ar/1c w3xswLFdgX9novDK4vBG6tHEM614p6KC5YByy9xK32oawgaxMvD9c5fpiyXmS8xVzXHb k2nQrEKb7H1kEXkJpOZBqAgj2NaLnGh75eh5JW46fxrJ+7+6ZoC+D0U2+y1j5dUPHrBu 3dww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786150651; x=1786755451; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=diMA3NQ10gzHFnNLk3VwTDac6B6hmowUzo1h66c0BkU=; b=ZAOVVoDfJalaN2WJnUDyjRad760OzPUBS7yVKHBTN1L5B3KdDOsnHgsHZC9ovDVt/9 ryR3yr8CqJlMbcMVlxNFNzUQ+PqKU9Pm4HsT00wyYgss912xW4aPS8SM9G1muxa1dKDn tRPjQDkXyIlaGmo+8jBasf31WaGETjY0JTsZsuc5+Cv1urh4Bz03aH2cb99VxmfBVfyL 8B8Y0bV/DAA+7Rn7sXOg8F7qMl2hiKDShPaShKVnbutlis7EzIb6HLOLHb9sA1oDHb1k IhHEbbV+WSHyDAy0e7Di7YzHruvw9TyloLo17+WseMwZu9Dml4aHIPk45G/t6nknP/MB cLoQ== X-Forwarded-Encrypted: i=1; AHgh+RonXLPmoErJfnpKTYQz/dqdadekrk0Q/HO0ms8lYzmaA/5cOv6m36/f+URP9rcW1PMsbUnhZcwUgxXdt4s=@vger.kernel.org X-Gm-Message-State: AOJu0Yx0MBukrq8L1d6vu2Vk6ThDuN8AiqVy2GIhXit3Gl6z/BahZ4/s CW3f4npPlbLojBGBK96QCaWrDmAzfcojWkDoeqSxWtm7l+qo9ygyVC/D X-Gm-Gg: AR+sD11hQTGf0G+OIdtkcnEW1vUQaDqPco6SJdT3iyUI0TNdiDZBUSpf5fv1Sc0Jb8N gNzD/oSfzKkqafLDrhwLAvYMTd0sIqjo1LB98G9yhwFWossDuaJmJmWc8MY5VLmydzflvQZxSC8 vw4FUgj24ihKEFuJMMahC3BCydcZBJmFUvA/z3H9nzWKr9KycdR/thhbU6eywkBSfFH5x82iakf IR44wP5L+UK2jtwA69EQL2j72CfNUN/fADsVyEjejHMfZ3QEiK34dsaTMGw31SQQlL3hCWCeQKc GmJ1dQ6wLGfNu1x2YHvdIUJ8WsYzVy+XMMi0PwTpFDzV/S7uAkedSwgnH0/QlY4AOBZ9Jwp4Hbm +2aLsnwS9O4KAVrJOCzQ5eKsf/2UjQcMbmjCJQXuL0SGSFQOriW5/c98ezVEsGdt0Mnj/tQvCYN ElsrbUpn+TVxNEgNeaXhuH+gJT6vUzyZylfcGh9nFlw6nx2nS/B133YkU9bU/DkHsWPX6+Wqy16 soZzvLvpig+2jjGZbhb/qiP8KDmzkLNSHUxg1jLyz7UEWB/T/fpg0E7SyXdXnc= X-Received: by 2002:a17:90b:3985:b0:381:9028:5945 with SMTP id 98e67ed59e1d1-3903c58ee8emr25039098a91.14.1786150651049; Fri, 07 Aug 2026 17:57:31 -0700 (PDT) Received: from m-upc-A520M-HDV.flets-east.jp ([2400:2410:3f60:500:d7e9:6449:7464:1dfa]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3925fc6c13asm4205182a91.2.2026.08.07.17.57.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2026 17:57:30 -0700 (PDT) Sender: Yuyang Huang From: Yuyang Huang To: Yuyang Huang Cc: "David S. Miller" , Chris J Arges , Daniel Zahka , David Ahern , David Wei , Dimitri Daskalakis , Donald Hunter , Eric Dumazet , Ido Schimmel , Jakub Kicinski , Paolo Abeni , Shuah Khan , Simon Horman , Stanislav Fomichev , Willem de Bruijn , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH net-next v6 09/10] netlink: specs: rt-route: add the route deletion reason Date: Sat, 8 Aug 2026 09:56:41 +0900 Message-ID: <20260808005642.26901-10-sigefriedhyy@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260808005642.26901-1-sigefriedhyy@gmail.com> References: <20260808005642.26901-1-sigefriedhyy@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add the del-reason attribute and its enum to the route attribute set, and to the getroute reply, which the route notifications reuse. The attribute is absent from the newroute and delroute request lists. RTA_DEL_REASON is above strict_start_type in rtm_ipv6_policy, so encoding it in a request is rejected with -EINVAL. Signed-off-by: Yuyang Huang --- Documentation/netlink/specs/rt-route.yaml | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Documentation/netlink/specs/rt-route.yaml b/Documentation/netlink/specs/rt-route.yaml index 9f4a1a253676..253037ea5176 100644 --- a/Documentation/netlink/specs/rt-route.yaml +++ b/Documentation/netlink/specs/rt-route.yaml @@ -78,6 +78,27 @@ definitions: - name: rta-used type: u32 + - + name: del-reason + type: enum + name-prefix: rt-del-reason- + enum-name: rt-del-reason + doc: | + Why the kernel deleted a route. New causes may be appended. The + value space is family-agnostic, a value is never reinterpreted + per address family. + entries: + - + name: unspec + doc: The deletion path does not record a cause. + - + name: expired + doc: The RTF_EXPIRES lifetime ran out and the route was garbage + collected. + - + name: ra-withdrawn + doc: A Router Advertisement withdrew the route with a zero + lifetime. attribute-sets: - @@ -185,6 +206,18 @@ attribute-sets: type: u32 byte-order: big-endian display-hint: hex + - + name: del-reason + type: u32 + enum: del-reason + doc: | + Emitted only on RTM_DELROUTE notifications, and only when the + deletion path records a cause. An absent attribute means + either an older kernel or a deletion path that does not + record its cause, consumers must treat absent and unspec + identically. Currently only IPv6 deletion paths record a + cause. The attribute is notification-only, the kernel rejects + it in requests. - name: metrics name-prefix: rtax- @@ -299,6 +332,7 @@ operations: - dport - nh-id - flowlabel + - del-reason dump: request: value: 26 -- 2.43.0