netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Donald Hunter <donald.hunter@gmail.com>
To: Florian Westphal <fw@strlen.de>
Cc: <netdev@vger.kernel.org>,  <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH v2 net-next] netlink: specs: add conntrack dump and stats dump support
Date: Tue, 11 Feb 2025 11:11:13 +0000	[thread overview]
Message-ID: <m2cyfoohwu.fsf@gmail.com> (raw)
In-Reply-To: <20250210152159.41077-1-fw@strlen.de> (Florian Westphal's message of "Mon, 10 Feb 2025 16:21:52 +0100")

Florian Westphal <fw@strlen.de> writes:

> This adds support to dump the connection tracking table
> ("conntrack -L") and the conntrack statistics, ("conntrack -S").
>
> Example conntrack dump:
> tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/conntrack.yaml --dump get

Hi Florian,

Updates all look good, with one minor new point below.

Reviewed-by: Donald Hunter <donald.hunter@gmail.com>

> +operations:
> +  enum-model: directional
> +  list:
> +    -
> +      name: get
> +      doc: get / dump entries
> +      attribute-set: conntrack-attrs
> +      fixed-header: nfgenmsg
> +      do:
> +        request:
> +          value: 0x101
> +          attributes:
> +            - tuple-orig
> +            - tuple-reply
> +            - zone
> +        reply:
> +          value: 0x100
> +          attributes:

To avoid duplicating the attribute list in the dump reply, you can
reference this definition:

@@ -565,7 +565,7 @@ operations:
             - zone
         reply:
           value: 0x100
-          attributes:
+          attributes: &entries-attrs
             - tuple-orig
             - tuple-reply
             - status
@@ -598,28 +598,7 @@ operations:
             - zone
         reply:
           value: 0x100
-          attributes:
-            - tuple-orig
-            - tuple-reply
-            - status
-            - protoinfo
-            - help
-            - nat-src
-            - nat-dst
-            - timeout
-            - mark
-            - counter-orig
-            - counter-reply
-            - use
-            - id
-            - nat-dst
-            - tuple-master
-            - seq-adj-orig
-            - seq-adj-reply
-            - zone
-            - secctx
-            - labels
-            - synproxy
+          attributes: *entries-attrs
     -
       name: get-stats
       doc: dump pcpu conntrack stats

  parent reply	other threads:[~2025-04-01  8:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10 15:21 [PATCH v2 net-next] netlink: specs: add conntrack dump and stats dump support Florian Westphal
2025-02-10 18:39 ` Jakub Kicinski
2025-02-10 20:27   ` Florian Westphal
2025-02-10 20:54     ` Jakub Kicinski
2025-02-12 18:20       ` Simon Horman
2025-02-12 18:58         ` Jakub Kicinski
2025-02-11 11:11 ` Donald Hunter [this message]
2025-02-13  4:10 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2cyfoohwu.fsf@gmail.com \
    --to=donald.hunter@gmail.com \
    --cc=fw@strlen.de \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).