Netdev List
 help / color / mirror / Atom feed
* [PATCH net v2 0/2] netlink: specs: fixes for conntrack dump filtering
@ 2026-08-26 22:01 Ilya Maximets
  2026-08-26 22:01 ` [PATCH net v2 1/2] netlink: specs: fix the conntrack filter type Ilya Maximets
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ilya Maximets @ 2026-08-26 22:01 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Donald Hunter, Remy D. Farley,
	Matthieu Baerts (NGI0), Florian Westphal, linux-kernel,
	netfilter-devel, Asbjørn Sloth Tønnesen, Ilya Maximets

Version 2:
 - Also added missing tuple attributes for the dump request.
 - Converted into a set by adding the patch 2.

Version 1:
 - https://lore.kernel.org/r/20260825155832.3685714-1-i.maximets@ovn.org

Ilya Maximets (2):
  netlink: specs: fix the conntrack filter type
  netlink: specs: add missing mask attributes for conntrack dump

 Documentation/netlink/specs/conntrack.yaml | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH net v2 1/2] netlink: specs: fix the conntrack filter type
  2026-08-26 22:01 [PATCH net v2 0/2] netlink: specs: fixes for conntrack dump filtering Ilya Maximets
@ 2026-08-26 22:01 ` Ilya Maximets
  2026-08-27 11:04   ` Asbjørn Sloth Tønnesen
  2026-08-26 22:01 ` [PATCH net v2 2/2] netlink: specs: add missing mask attributes for conntrack dump Ilya Maximets
  2026-08-28 23:00 ` [PATCH net v2 0/2] netlink: specs: fixes for conntrack dump filtering patchwork-bot+netdevbpf
  2 siblings, 1 reply; 6+ messages in thread
From: Ilya Maximets @ 2026-08-26 22:01 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Donald Hunter, Remy D. Farley,
	Matthieu Baerts (NGI0), Florian Westphal, linux-kernel,
	netfilter-devel, Asbjørn Sloth Tønnesen, Ilya Maximets,
	stable

The CTA_FILTER doesn't contain nested tuple attributes, instead it
contains bit masks that specify which tuple attributes to filter on.
The values for filtering are taken from the top-level CTA_TUPLE_ORIG
and CTA_TUPLE_REPLY, which are also missing in the attribute list
for the dump request.

The bits themselves somehow are not in the public headers, so not
defining them in the spec either for now.  Once they are public in
uAPI, they can be added here with enum-as-flags.

Fixes: 23fc9311a526 ("netlink: specs: add conntrack dump and stats dump support")
Cc: stable@vger.kernel.org
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
---
 Documentation/netlink/specs/conntrack.yaml | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/Documentation/netlink/specs/conntrack.yaml b/Documentation/netlink/specs/conntrack.yaml
index db7cddcda50a..6ba28cb1c2ab 100644
--- a/Documentation/netlink/specs/conntrack.yaml
+++ b/Documentation/netlink/specs/conntrack.yaml
@@ -360,6 +360,17 @@ attribute-sets:
         name: tsoff
         type: u32
         byte-order: big-endian
+  -
+    name: filter-attrs
+    attributes:
+      -
+        name: orig-flags
+        type: u32
+        doc: bitmask of tuple fields to filter on, original direction
+      -
+        name: reply-flags
+        type: u32
+        doc: bitmask of tuple fields to filter on, reply direction
   -
     name: conntrack-attrs
     attributes:
@@ -466,7 +477,7 @@ attribute-sets:
       -
         name: filter
         type: nest
-        nested-attributes: tuple-attrs
+        nested-attributes: filter-attrs
       -
         name: status-mask
         type: u32
@@ -591,6 +602,8 @@ operations:
         request:
           value: 0x101
           attributes:
+            - tuple-orig
+            - tuple-reply
             - mark
             - filter
             - status
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net v2 2/2] netlink: specs: add missing mask attributes for conntrack dump
  2026-08-26 22:01 [PATCH net v2 0/2] netlink: specs: fixes for conntrack dump filtering Ilya Maximets
  2026-08-26 22:01 ` [PATCH net v2 1/2] netlink: specs: fix the conntrack filter type Ilya Maximets
@ 2026-08-26 22:01 ` Ilya Maximets
  2026-08-27 11:04   ` Asbjørn Sloth Tønnesen
  2026-08-28 23:00 ` [PATCH net v2 0/2] netlink: specs: fixes for conntrack dump filtering patchwork-bot+netdevbpf
  2 siblings, 1 reply; 6+ messages in thread
From: Ilya Maximets @ 2026-08-26 22:01 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Donald Hunter, Remy D. Farley,
	Matthieu Baerts (NGI0), Florian Westphal, linux-kernel,
	netfilter-devel, Asbjørn Sloth Tønnesen, Ilya Maximets,
	stable

'mark-mask' and 'status-mask' are defined and supported by the
conntrack dump, but missing from the list of arguments.

While at it, the order of the arguments should follow the order of
their definition in the enum ctattr_type.  That appears to be a common
convention for other spec files.

Fixes: 23fc9311a526 ("netlink: specs: add conntrack dump and stats dump support")
Cc: stable@vger.kernel.org
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
---
 Documentation/netlink/specs/conntrack.yaml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/netlink/specs/conntrack.yaml b/Documentation/netlink/specs/conntrack.yaml
index 6ba28cb1c2ab..b1eb102ab843 100644
--- a/Documentation/netlink/specs/conntrack.yaml
+++ b/Documentation/netlink/specs/conntrack.yaml
@@ -604,10 +604,12 @@ operations:
           attributes:
             - tuple-orig
             - tuple-reply
-            - mark
-            - filter
             - status
+            - mark
             - zone
+            - mark-mask
+            - filter
+            - status-mask
         reply:
           value: 0x100
           attributes:
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net v2 1/2] netlink: specs: fix the conntrack filter type
  2026-08-26 22:01 ` [PATCH net v2 1/2] netlink: specs: fix the conntrack filter type Ilya Maximets
@ 2026-08-27 11:04   ` Asbjørn Sloth Tønnesen
  0 siblings, 0 replies; 6+ messages in thread
From: Asbjørn Sloth Tønnesen @ 2026-08-27 11:04 UTC (permalink / raw)
  To: Ilya Maximets, netdev
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Donald Hunter, Remy D. Farley,
	Matthieu Baerts (NGI0), Florian Westphal, linux-kernel,
	netfilter-devel, stable

On 8/26/26 10:01 PM, Ilya Maximets wrote:
> The CTA_FILTER doesn't contain nested tuple attributes, instead it
> contains bit masks that specify which tuple attributes to filter on.
> The values for filtering are taken from the top-level CTA_TUPLE_ORIG
> and CTA_TUPLE_REPLY, which are also missing in the attribute list
> for the dump request.
> 
> The bits themselves somehow are not in the public headers, so not
> defining them in the spec either for now.  Once they are public in
> uAPI, they can be added here with enum-as-flags.
> 
> Fixes: 23fc9311a526 ("netlink: specs: add conntrack dump and stats dump support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>

LGTM, thanks.

Reviewed-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net v2 2/2] netlink: specs: add missing mask attributes for conntrack dump
  2026-08-26 22:01 ` [PATCH net v2 2/2] netlink: specs: add missing mask attributes for conntrack dump Ilya Maximets
@ 2026-08-27 11:04   ` Asbjørn Sloth Tønnesen
  0 siblings, 0 replies; 6+ messages in thread
From: Asbjørn Sloth Tønnesen @ 2026-08-27 11:04 UTC (permalink / raw)
  To: Ilya Maximets, netdev
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Donald Hunter, Remy D. Farley,
	Matthieu Baerts (NGI0), Florian Westphal, linux-kernel,
	netfilter-devel, stable

On 8/26/26 10:01 PM, Ilya Maximets wrote:
> 'mark-mask' and 'status-mask' are defined and supported by the
> conntrack dump, but missing from the list of arguments.
> 
> While at it, the order of the arguments should follow the order of
> their definition in the enum ctattr_type.  That appears to be a common
> convention for other spec files.
> 
> Fixes: 23fc9311a526 ("netlink: specs: add conntrack dump and stats dump support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>

LGTM, thanks.

Reviewed-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net v2 0/2] netlink: specs: fixes for conntrack dump filtering
  2026-08-26 22:01 [PATCH net v2 0/2] netlink: specs: fixes for conntrack dump filtering Ilya Maximets
  2026-08-26 22:01 ` [PATCH net v2 1/2] netlink: specs: fix the conntrack filter type Ilya Maximets
  2026-08-26 22:01 ` [PATCH net v2 2/2] netlink: specs: add missing mask attributes for conntrack dump Ilya Maximets
@ 2026-08-28 23:00 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-08-28 23:00 UTC (permalink / raw)
  To: Ilya Maximets
  Cc: netdev, davem, edumazet, kuba, pabeni, horms, donald.hunter,
	one-d-wide, matttbe, fw, linux-kernel, netfilter-devel, ast

Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 27 Aug 2026 00:01:10 +0200 you wrote:
> Version 2:
>  - Also added missing tuple attributes for the dump request.
>  - Converted into a set by adding the patch 2.
> 
> Version 1:
>  - https://lore.kernel.org/r/20260825155832.3685714-1-i.maximets@ovn.org
> 
> [...]

Here is the summary with links:
  - [net,v2,1/2] netlink: specs: fix the conntrack filter type
    https://git.kernel.org/netdev/net/c/2a004bfb62bd
  - [net,v2,2/2] netlink: specs: add missing mask attributes for conntrack dump
    https://git.kernel.org/netdev/net/c/8b348496cbec

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-08-28 23:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-26 22:01 [PATCH net v2 0/2] netlink: specs: fixes for conntrack dump filtering Ilya Maximets
2026-08-26 22:01 ` [PATCH net v2 1/2] netlink: specs: fix the conntrack filter type Ilya Maximets
2026-08-27 11:04   ` Asbjørn Sloth Tønnesen
2026-08-26 22:01 ` [PATCH net v2 2/2] netlink: specs: add missing mask attributes for conntrack dump Ilya Maximets
2026-08-27 11:04   ` Asbjørn Sloth Tønnesen
2026-08-28 23:00 ` [PATCH net v2 0/2] netlink: specs: fixes for conntrack dump filtering patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox