From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Eric Leblond <eric@regit.org>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCHv2] netfilter: nft: add queue module
Date: Thu, 5 Dec 2013 18:09:55 +0100 [thread overview]
Message-ID: <20131205170955.GA8663@localhost> (raw)
In-Reply-To: <1386161263.9597.23.camel@ice-age2.regit.org>
Hi Eric,
On Wed, Dec 04, 2013 at 01:47:43PM +0100, Eric Leblond wrote:
[...]
> > > +static u32
> > > +nfqueue_hash(const struct nft_pktinfo *pkt, const struct nft_queue *priv)
> > > +{
> > > + u32 queue = priv->queuenum;
> > > +
> > > + if (priv->family == AF_INET)
> > > + queue += ((u64) hash_v4(pkt->skb) * priv->queues_total) >> 32;
> > > +#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
> > > + else if (priv->family == AF_INET6)
> > > + queue += ((u64) hash_v6(pkt->skb) * priv->queues_total) >> 32;
> > > +#endif
> > > +
> > > + return queue;
> > > +}
> >
> > to there, it looks very similar to NFQUEUE. You can move these
> > functions to net/netfilter/nf_queue.h. You'll have to inline them and
> > add the jhash_initval parameter. You'll need an initial patch to
> > prepare this change and adapt xt_NFQUEUE.c
>
> I'm ok with the two hash functions but the nfqueue_hash the second
> argument is different. Do you want me to introduce a new common
> structure for xt_NFQUEUE and nft_queue ?
My suggestion is to add something like:
static inline u32 nfqueue_hash(const struct sk_buff *skb, u16 queuenum,
u16 queues_total, u8 family)
that can be used by both, it will also be defined in
net/netfilter/nf_queue.h
next prev parent reply other threads:[~2013-12-05 17:10 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-30 10:52 [nft PATCH] add support for queue target Eric Leblond
2013-11-30 10:56 ` [PATCH 1/2] netfilter: nft: fix issue with verdict support Eric Leblond
2013-11-30 10:56 ` [PATCH 2/2] netfilter: nft: add queue module Eric Leblond
2013-11-30 12:26 ` Florian Westphal
2013-11-30 15:14 ` [PATCHv2] " Eric Leblond
2013-12-04 11:00 ` Pablo Neira Ayuso
2013-12-04 11:31 ` Florian Westphal
2013-12-04 11:39 ` Pablo Neira Ayuso
2013-12-04 12:47 ` Eric Leblond
2013-12-05 17:09 ` Pablo Neira Ayuso [this message]
2013-12-05 21:31 ` [PATCHv3 0/3] add nft_queue module Eric Leblond
2013-12-05 21:31 ` [PATCHv3 1/3] netfilter: nft: fix issue with verdict support Eric Leblond
2013-12-05 21:31 ` [PATCHv3 2/3] netfilter: xt_NFQUEUE: separate reusable code Eric Leblond
2013-12-05 21:41 ` Pablo Neira Ayuso
2013-12-05 23:24 ` [PATCHv4 0/3] add nft_queue module Eric Leblond
2013-12-05 23:24 ` [PATCHv4 1/3] netfilter: nft: fix issue with verdict support Eric Leblond
2013-12-05 23:24 ` [PATCHv4 2/3] netfilter: xt_NFQUEUE: separate reusable code Eric Leblond
2013-12-07 22:56 ` Pablo Neira Ayuso
2013-12-05 23:24 ` [PATCHv4 3/3] netfilter: nft: add queue module Eric Leblond
2013-12-07 22:57 ` [PATCHv4 0/3] add nft_queue module Pablo Neira Ayuso
2013-12-10 10:09 ` Eric Leblond
2013-12-05 21:31 ` [PATCHv3 3/3] netfilter: nft: add queue module Eric Leblond
2013-12-02 6:39 ` [PATCH 2/2] " Tomasz Bursztyka
2013-12-02 9:32 ` Eric Leblond
2013-12-02 11:03 ` Tomasz Bursztyka
2013-11-30 10:57 ` [libnftables PATCH 1/2] expr: add support for nfnetlink queue Eric Leblond
2013-11-30 10:57 ` [libnftables PATCH 2/2] test: add tests for expr queue Eric Leblond
2013-12-10 10:03 ` [libnftables PATCH 1/2] expr: add support for nfnetlink queue Pablo Neira Ayuso
2013-11-30 10:57 ` [nft PATCH] Add support for queue target Eric Leblond
2013-12-29 18:28 ` [nftables PATCHv2 0/1] Support " Eric Leblond
2013-12-29 18:28 ` [nftables PATCHv2] Add support " Eric Leblond
2014-01-04 0:09 ` Pablo Neira Ayuso
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=20131205170955.GA8663@localhost \
--to=pablo@netfilter.org \
--cc=eric@regit.org \
--cc=fw@strlen.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.