netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 0/5] netfilter updates for net-next (upcoming 3.5), batch 2
Date: Wed, 09 May 2012 18:11:19 -0400 (EDT)	[thread overview]
Message-ID: <20120509.181119.549113304045405166.davem@davemloft.net> (raw)
In-Reply-To: <1336563188-6720-1-git-send-email-pablo@netfilter.org>

From: pablo@netfilter.org
Date: Wed,  9 May 2012 13:33:03 +0200

> This is a second batch of netfilter updates for net-next, they contain:
> 
> * The new HMARK target from Hans Schillstrom. It took lots of spins
>   to get this into shape. This target provides a hash-based packet / flow
>   pre-classifier for iptables that can be used to distribute packets
>   / flows between uplinks and backend servers. It provides to modes, one
>   that relies on conntrack, and one that is stateless per-packet.
> 
> * Byte-based cost calculation for the hashlimit match, to detect when
>   a host consumes more bandwidth than expected. This patch from Florian
>   Westphal.
> 
> You can pull these changes from:
> 
> git://1984.lsi.us.es/net-next

Pulled.

Two suggested improvements:

1) The HMARK hash is quite expensive, because it uses a modulus.

   Consider adjusting it to use the usual trick:

	((u64)(HASH_VAL * HASH_SIZE)) >> 32

   so that this can be a multiply instead of a modulus.

2) XT_HASHLIMIT_MAX is cumbersome.

   The canonical way to validate if the set bits are in	a
   valid range is to have a "_ALL" macro, and test:

	if (val & ~XT_HASHLIMIT_ALL)
		goto err;

   or similar.

Thanks.

  parent reply	other threads:[~2012-05-09 22:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09 11:33 [PATCH 0/5] netfilter updates for net-next (upcoming 3.5), batch 2 pablo
2012-05-09 11:33 ` [PATCH 1/5] netfilter: ip6_tables: add flags parameter to ipv6_find_hdr() pablo
2012-05-09 11:33 ` [PATCH 2/5] netfilter: add xt_hmark target for hash-based skb marking pablo
2012-05-09 11:33 ` [PATCH 3/5] netfilter: limit, hashlimit: avoid duplicated inline pablo
2012-05-09 11:33 ` [PATCH 4/5] netfilter: hashlimit: move rateinfo initialization to helper pablo
2012-05-09 11:33 ` [PATCH 5/5] netfilter: hashlimit: byte-based limit mode pablo
2012-05-09 13:04 ` [PATCH 0/5] netfilter updates for net-next (upcoming 3.5), batch 2 Eric Dumazet
2012-05-09 22:11 ` David Miller [this message]
2012-05-14  8:21   ` 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=20120509.181119.549113304045405166.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).