Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Jun 2026 22:18:48 +0200
From:      Kristof Provost <kp@FreeBSD.org>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        Ishan Agrawal <iagrawal9990@gmail.com>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 017690e50913 - main - netpfil: add PF netlink command decoding support
Message-ID:  <03F81E99-0A9B-4265-951B-0177AC8ADA80@FreeBSD.org>
In-Reply-To: <aiCJ2KLLIkQmu9Yt@cell.glebi.us>
References:  <6a2028fd.30559.3287a30@gitrepo.freebsd.org> <aiCJ2KLLIkQmu9Yt@cell.glebi.us>

index | next in thread | previous in thread | raw e-mail

On 3 Jun 2026, at 22:08, Gleb Smirnoff wrote:
> On Wed, Jun 03, 2026 at 01:15:41PM +0000, Kristof Provost wrote:
> K> The branch main has been updated by kp:
> K>
> K> URL: https://cgit.FreeBSD.org/src/commit/?id=017690e509134422dbfa80316eab56d8d3f87065
> K>
> K> commit 017690e509134422dbfa80316eab56d8d3f87065
> K> Author:     Ishan Agrawal <iagrawal9990@gmail.com>
> K> AuthorDate: 2026-06-01 12:24:05 +0000
> K> Commit:     Kristof Provost <kp@FreeBSD.org>
> K> CommitDate: 2026-06-03 08:52:06 +0000
> K>
> K>     netpfil: add PF netlink command decoding support
> K>
> K>     Convert PFNL_CMD values in pf_nl.h from an enum to #define constants,
> K>     add a pfnl_cmd table definition for mktable, and implement the
> K>     corresponding command decoding helpers in libsysdecode.
> K>
> K>     This allows mktable to generate PF netlink command lookup tables and
> K>     enables symbolic decoding of PF netlink commands.
> K>
> K>     Reviewed by:    kp
> K>     Signed-off-by:  Ishan Agrawal <iagrawal9990@gmail.com>
> K>     Sponsored by:   Google LLC (GSoC 2026)
>
> Sorry for not reviewing in time.  I got question: why does this
> require ditching the enum and regressing down to preprocessor
> defines?
>
The mktables script in libsysdecode expects to work on defines: https://github.com/freebsd/freebsd-src/blob/07d733963ecd1957999f5381b438b8c369686750/lib/libsysdecode/mktables#L76

It’s possible to change that, but this being an enum doesn’t really buy us much either, and this was the less invasive path.

Best regards,
Kristof


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?03F81E99-0A9B-4265-951B-0177AC8ADA80>