From: "Szőke Benjamin" <egyszeregy@freemail.hu>
To: Jozsef Kadlecsik <kadlec@netfilter.org>
Cc: fw@strlen.de, pablo@netfilter.org, lorenzo@kernel.org,
daniel@iogearbox.net, leitao@debian.org, amiculas@cisco.com,
davem@davemloft.net, dsahern@kernel.org, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 01/10] netfilter: x_tables: Merge xt_DSCP.h to xt_dscp.h
Date: Tue, 7 Jan 2025 22:38:36 +0100 [thread overview]
Message-ID: <98387132-330e-4068-9b71-e98dbcc9cd40@freemail.hu> (raw)
In-Reply-To: <4fab5e14-2782-62d2-a32d-54b673201f26@netfilter.org>
2025. 01. 07. 20:23 keltezéssel, Jozsef Kadlecsik írta:
> On Tue, 7 Jan 2025, egyszeregy@freemail.hu wrote:
>
>> From: Benjamin Szőke <egyszeregy@freemail.hu>
>>
>> Merge xt_DSCP.h to xt_dscp.h header file.
>
> I think it'd be better worded as "Merge xt_DSCP.h into the xt_dscp.h
> header file." (and in the other patches as well).
>
There will be no any new patchset refactoring anymore just of some cosmetics
change. If you like to change it, feel free to modify it in my pacthfiles before
the final merging. You can do it as a maintainer.
>> Signed-off-by: Benjamin Szőke <egyszeregy@freemail.hu>
>> ---
>> include/uapi/linux/netfilter/xt_DSCP.h | 22 +---------------------
>> include/uapi/linux/netfilter/xt_dscp.h | 20 ++++++++++++++++----
>> 2 files changed, 17 insertions(+), 25 deletions(-)
>>
>> diff --git a/include/uapi/linux/netfilter/xt_DSCP.h b/include/uapi/linux/netfilter/xt_DSCP.h
>> index 223d635e8b6f..fcff72347256 100644
>> --- a/include/uapi/linux/netfilter/xt_DSCP.h
>> +++ b/include/uapi/linux/netfilter/xt_DSCP.h
>> @@ -1,27 +1,7 @@
>> /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
>> -/* x_tables module for setting the IPv4/IPv6 DSCP field
>> - *
>> - * (C) 2002 Harald Welte <laforge@gnumonks.org>
>> - * based on ipt_FTOS.c (C) 2000 by Matthew G. Marsh <mgm@paktronix.com>
>> - * This software is distributed under GNU GPL v2, 1991
>> - *
>> - * See RFC2474 for a description of the DSCP field within the IP Header.
>> - *
>> - * xt_DSCP.h,v 1.7 2002/03/14 12:03:13 laforge Exp
>> -*/
>> #ifndef _XT_DSCP_TARGET_H
>> #define _XT_DSCP_TARGET_H
>> -#include <linux/netfilter/xt_dscp.h>
>> -#include <linux/types.h>
>> -
>> -/* target info */
>> -struct xt_DSCP_info {
>> - __u8 dscp;
>> -};
>>
>> -struct xt_tos_target_info {
>> - __u8 tos_value;
>> - __u8 tos_mask;
>> -};
>> +#include <linux/netfilter/xt_dscp.h>
>>
>> #endif /* _XT_DSCP_TARGET_H */
>> diff --git a/include/uapi/linux/netfilter/xt_dscp.h b/include/uapi/linux/netfilter/xt_dscp.h
>> index 7594e4df8587..bcfe4afa6351 100644
>> --- a/include/uapi/linux/netfilter/xt_dscp.h
>> +++ b/include/uapi/linux/netfilter/xt_dscp.h
>> @@ -1,15 +1,17 @@
>> /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
>> -/* x_tables module for matching the IPv4/IPv6 DSCP field
>> +/* x_tables module for matching/modifying the IPv4/IPv6 DSCP field
>> *
>> * (C) 2002 Harald Welte <laforge@gnumonks.org>
>> + * based on ipt_FTOS.c (C) 2000 by Matthew G. Marsh <mgm@paktronix.com>
>> * This software is distributed under GNU GPL v2, 1991
>> *
>> * See RFC2474 for a description of the DSCP field within the IP Header.
>> *
>> + * xt_DSCP.h,v 1.7 2002/03/14 12:03:13 laforge Exp
>> * xt_dscp.h,v 1.3 2002/08/05 19:00:21 laforge Exp
>> */
>
> For the sake of history it'd worth to prepend the last two lines with
> something like: "Original version informations before merging the contents
> of the files:"
>
This was a question a day ago, what do you like to see in each top of header
files's comments. You did not care about it, you was not willing to say
something which to be implemented, but now you have new ideas, please it is too
late.
I will not plan to make any new patchset version just for this new thing which
is just a cosmetic change not a critical bugfix. If you like to change it, lets
do it, feel free to modify it in my pacthfiles before the final merging or apply
your a new patch later.
>> -#ifndef _XT_DSCP_H
>> -#define _XT_DSCP_H
>> +#ifndef _UAPI_XT_DSCP_H
>> +#define _UAPI_XT_DSCP_H
>
> In the first four patches you added the _UAPI_ prefix to the header
> guards while in the next three ones you kept the original ones. Please
> use one style consistently.
>
Style consistently is done in the following files:
- All of xt_*.h files in uppercase name format (old headers for "target")
- All of xt_*.h files in lowercase name format (merged header files)
Originally, in these files there was a chaotic state before, it was a painful
for my eyes, this is why they got these changes. In ipt_*.h files the original
codes got a far enough consistently style before, they was not changed.
In my patchsets, It's not my scope/job to make up for the
improvements/refactoring of the last 10 years.
>> #include <linux/types.h>
>>
>> @@ -29,4 +31,14 @@ struct xt_tos_match_info {
>> __u8 invert;
>> };
>>
>> -#endif /* _XT_DSCP_H */
>> +/* target info */
>> +struct xt_DSCP_info {
>> + __u8 dscp;
>> +};
>> +
>> +struct xt_tos_target_info {
>> + __u8 tos_value;
>> + __u8 tos_mask;
>> +};
>> +
>> +#endif /* _UAPI_XT_DSCP_H */
>> --
>> 2.43.5
>>
>>
>
> Best regards,
> Jozsef
next prev parent reply other threads:[~2025-01-07 21:48 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-07 2:41 [PATCH 00/10] netfilter: x_tables: Merge xt_*.h and ipt_*.h files which has same name egyszeregy
2025-01-07 2:41 ` [PATCH 01/10] netfilter: x_tables: Merge xt_DSCP.h to xt_dscp.h egyszeregy
2025-01-07 19:23 ` Jozsef Kadlecsik
2025-01-07 21:38 ` Szőke Benjamin [this message]
2025-01-08 20:11 ` Jozsef Kadlecsik
2025-01-08 21:08 ` Szőke Benjamin
2025-01-09 14:59 ` Jozsef Kadlecsik
2025-01-07 2:41 ` [PATCH 02/10] netfilter: x_tables: Merge xt_RATEEST.h to xt_rateest.h egyszeregy
2025-01-07 2:41 ` [PATCH 03/10] netfilter: x_tables: Merge xt_TCPMSS.h to xt_tcpmss.h egyszeregy
2025-01-07 2:41 ` [PATCH 04/10] netfilter: x_tables: Use consistent header guard egyszeregy
2025-01-07 2:41 ` [PATCH 05/10] netfilter: iptables: Merge ipt_ECN.h to ipt_ecn.h egyszeregy
2025-01-07 19:26 ` Jozsef Kadlecsik
2025-01-07 21:48 ` Szőke Benjamin
2025-01-08 20:15 ` Jozsef Kadlecsik
2025-01-07 2:41 ` [PATCH 06/10] netfilter: iptables: Merge ipt_TTL.h to ipt_ttl.h egyszeregy
2025-01-07 2:41 ` [PATCH 07/10] netfilter: iptables: Merge ip6t_HL.h to ip6t_hl.h egyszeregy
2025-01-07 2:41 ` [PATCH 08/10] netfilter: Adjust code style of xt_*.h, ipt_*.h files egyszeregy
2025-01-07 19:39 ` Jozsef Kadlecsik
2025-01-07 21:59 ` Szőke Benjamin
2025-01-08 20:20 ` Jozsef Kadlecsik
2025-01-08 21:18 ` Szőke Benjamin
2025-01-07 2:41 ` [PATCH 09/10] netfilter: Add message pragma for deprecated xt_*.h, ipt_*.h egyszeregy
2025-01-07 19:39 ` Jozsef Kadlecsik
2025-01-07 22:06 ` Szőke Benjamin
2025-01-07 22:38 ` Jan Engelhardt
2025-01-07 23:24 ` Szőke Benjamin
2025-01-08 20:51 ` Jozsef Kadlecsik
2025-01-08 21:38 ` Szőke Benjamin
2025-01-09 10:22 ` Przemek Kitszel
2025-01-07 2:41 ` [PATCH 10/10] netfilter: Use merged xt_*.h, ipt_*.h headers egyszeregy
2025-01-07 19:14 ` [PATCH 00/10] netfilter: x_tables: Merge xt_*.h and ipt_*.h files which has same name Jozsef Kadlecsik
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=98387132-330e-4068-9b71-e98dbcc9cd40@freemail.hu \
--to=egyszeregy@freemail.hu \
--cc=amiculas@cisco.com \
--cc=coreteam@netfilter.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=horms@kernel.org \
--cc=kadlec@netfilter.org \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.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
all inboxes | Powered by JetHome®