public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Hans Schillstrom <hans.schillstrom@ericsson•com>
To: Jan Engelhardt <jengelh@medozas•de>
Cc: Pablo Neira Ayuso <pablo@netfilter•org>,
	"kaber@trash•net" <kaber@trash•net>,
	"netfilter-devel@vger•kernel.org"
	<netfilter-devel@vger•kernel.org>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	"hans@schillstrom•com" <hans@schillstrom•com>
Subject: Re: [v9 PATCH 2/3] NETFILTER module xt_hmark, new target for HASH based fwmark
Date: Mon, 5 Mar 2012 12:28:18 +0100	[thread overview]
Message-ID: <201203051228.20049.hans.schillstrom@ericsson.com> (raw)
In-Reply-To: <alpine.LNX.2.01.1203051140470.19304@frira.zrqbmnf.qr>

On Monday 05 March 2012 11:48:16 Jan Engelhardt wrote:
> 
> On Monday 2012-03-05 11:09, Hans Schillstrom wrote:
> >> > diff --git a/net/netfilter/Makefile b/net/netfilter/Makefile
> >> > index 40f4c3d..21bc5e8 100644
> >> > --- a/net/netfilter/Makefile
> >> > +++ b/net/netfilter/Makefile
> >> > @@ -57,6 +57,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CONNSECMARK) += xt_CONNSECMARK.o
> >> >  obj-$(CONFIG_NETFILTER_XT_TARGET_CT) += xt_CT.o
> >> >  obj-$(CONFIG_NETFILTER_XT_TARGET_DSCP) += xt_DSCP.o
> >> >  obj-$(CONFIG_NETFILTER_XT_TARGET_HL) += xt_HL.o
> >> > +obj-$(CONFIG_NETFILTER_XT_TARGET_HMARK) += xt_hmark.o
> >> 
> >> Netfilter's naming policy requires that targets are in upper case.
> >
> >I asked netfilter team about that, and got the answer
> >that it should be lower case for new modules.
> >Have that been changed ?
> 
> The name of the file is pretty much irrelevant (because loading
> solely depends on MODULE_ALIAS), so I share that only lowercase
> should be used for new things. It's not that the linux kernel would
> currently be storable on a case-insensitive filesystem, but that does
> not mean we can't latently work towards it.

OK

> >static int get_inner_hdr(struct sk_buff *skb, int *nhoff)
> >{
> >	const struct icmphdr *icmph;
> >	struct icmphdr _ih;
> >	int iphz = ((struct iphdr *)skb_network_header(skb))->ihl * 4;
> 
> unsigned int iphz = skb_hdrlen(skb);
> 
> >> > +static unsigned int
> >> > +hmark_v6(struct sk_buff *skb, const struct xt_action_param *par)
> >> > +{
> >> > +     struct xt_hmark_info *info = (struct xt_hmark_info *)par->targinfo;
> 
> Pointless cast.

Yes, better to add a const in front of struct hmark

> 
> >> > +     union hmark_ports uports = { .v32 = 0 };
> >> 
> >> I think that this can be: union hmark_ports uports = {};
> 
> NB: Strictly speaking, {} is a GNU extension to saying {0} (or {{0}} or
> {{{{{0}}}}} etc, which ever applies).

Thanks, but I still don't think "= {}"; is obvious what it does :-) 
It kan be nice if you have a lot to clear;

> 
> >> > +static unsigned int
> >> > +hmark_v4(struct sk_buff *skb, const struct xt_action_param *par)
> >> > +{
> >> > +     struct xt_hmark_info *info = (struct xt_hmark_info *)par->targinfo;
> 
> Same pointless cast.
> 

-- 
Thanks
Hans 

  reply	other threads:[~2012-03-05 11:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-16 10:21 [v9 PATCH 0/3] NETFILTER new target module, HMARK Hans Schillstrom
2012-02-16 10:21 ` [v9 PATCH 1/3] NETFILTER added flags to ipv6_find_hdr() Hans Schillstrom
2012-02-16 10:21 ` [v9 PATCH 2/3] NETFILTER module xt_hmark, new target for HASH based fwmark Hans Schillstrom
2012-03-04 18:44   ` Pablo Neira Ayuso
2012-03-05 10:09     ` Hans Schillstrom
2012-03-05 10:48       ` Jan Engelhardt
2012-03-05 11:28         ` Hans Schillstrom [this message]
2012-03-05 16:50         ` Pablo Neira Ayuso
2012-03-05 20:38           ` Hans Schillstrom
2012-03-05 18:22       ` Pablo Neira Ayuso
2012-03-05 20:33         ` Hans Schillstrom
2012-03-05 21:37           ` Pablo Neira Ayuso
2012-02-16 10:21 ` [v9 PATCH 3/3] NETFILTER userspace part for target HMARK Hans Schillstrom

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=201203051228.20049.hans.schillstrom@ericsson.com \
    --to=hans.schillstrom@ericsson$(echo .)com \
    --cc=hans@schillstrom$(echo .)com \
    --cc=jengelh@medozas$(echo .)de \
    --cc=kaber@trash$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=netfilter-devel@vger$(echo .)kernel.org \
    --cc=pablo@netfilter$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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