[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250102123556.GC3344@breakpoint.cc>
Date: Thu, 2 Jan 2025 13:35:56 +0100
From: Florian Westphal <fw@...len.de>
To: Szőke Benjamin <egyszeregy@...email.hu>
Cc: Florian Westphal <fw@...len.de>, pablo@...filter.org,
lorenzo@...nel.org, daniel@...earbox.net, leitao@...ian.org,
amiculas@...co.com, kadlec@...filter.org, davem@...emloft.net,
dsahern@...nel.org, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, horms@...nel.org,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] netfilter: uapi: Merge xt_*.h/c and ipt_*.h which has
same name.
Szőke Benjamin <egyszeregy@...email.hu> wrote:
> 2025. 01. 01. 23:46 keltezéssel, Florian Westphal írta:
> > egyszeregy@...email.hu <egyszeregy@...email.hu> wrote:
> > > /* match info */
> > > -struct xt_dscp_info {
> > > +struct xt_dscp_match_info {
> >
> > To add to what Jan already pointed out, such renames
> > break UAPI, please don't do this.
> >
> > It could be done with compat ifdef'ry but I think its rather ugly,
> > better to keep all uapi structure names as-is.
>
> If i keep the original, maybe one of them will be in conflict between
> "match" and "target" structs name if i remember well (they go the same
> text).
Did not find an example. Can you please point me to one?
> By the way original structs name are absolutely not following any
> good clean coding, they will be still ugly and they are hard to understand
> quickly in the code, what goes for "target" and what goes fot "match" codes.
> Why is it bad to step forward and accept a breaking change to gets a better
> clean code?
Breaking changes are not acceptable.
> > > MODULE_LICENSE("GPL");
> > > MODULE_AUTHOR("Marc Boucher <marc@...i.ca>");
> > > -MODULE_DESCRIPTION("Xtables: TCP MSS match");
> > > +MODULE_DESCRIPTION("Xtables: TCP Maximum Segment Size (MSS) adjustment/match");
> > > MODULE_ALIAS("ipt_tcpmss");
> > > MODULE_ALIAS("ip6t_tcpmss");
> > > +MODULE_ALIAS("ipt_TCPMSS");
> > > +MODULE_ALIAS("ip6t_TCPMSS");
> >
> > I think you should add MODULE_ALIAS("xt_TCPMSS") just in case, same
> > for all other merged (== 'removed') module names, to the respective
> > match (preserved) modules.
>
> Do you mean in all of xt_*.c source, it can be appended by its own
> MODULE_ALIAS("xt_TCPMSS"), MODULE_ALIAS("xt_RATEEST") ... and so on? Can be
> kept old MODULE_ALIAS() names or they can be removed?
'modprobe xt_FOO' should continue to work, so if xt_FOO was merged into
xt_foo, then 'modprobe xt_FOO' should load xt_foo.
Makes sense?
Same reason as why we have the ipt_tcpmss etc. aliases, it should load
the xt_ module which does provide the relevant functionality.
So yes, please keep all existing aliases.
Powered by blists - more mailing lists