All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@lists.netfilter.org, Eric Leblond <eric@inl.fr>
Subject: Re: [PATCH] Unconditionaly push mark to conntrack structure
Date: Wed, 31 May 2006 03:01:39 +0200	[thread overview]
Message-ID: <447CEAF3.5030903@trash.net> (raw)
In-Reply-To: <447CE4ED.9010706@netfilter.org>

Pablo Neira Ayuso wrote:
> Patrick McHardy wrote:
> 
>>> Actually this isn't true, I just noticed we never send timeout update
>>> notifications except for the first packet (which means we have tons
>>> of unnecessary notifier chain calls). I think this isn't really
>>> intended and was done to work around the high timeout event generation
>>> rate. Pablo, do you more about this?
> 
> 
> Indeed, the timer refresh event through netlink just burden the system
> and overrun the socket queue, so netlink starts dropping messages.

This is easy to fix by only sending an timer update for each connection
once every n seconds. If done in ip_ct_refresh_acct it will also reduce
the notifier load.

>> More bad news .. the timeout is sent in HZ instead of USER_HZ. This
>> unfortunately seems to call for an ABI break, I'd really hate to add
>> a CTA_TIMEOUT2 attribute. I guess we can live with it since its
>> usually not even included in the messages.
> 
> 
> To be frank, I can't see how the timer can be useful from userspace. I
> think that we should remove it.

Don't you need it for synchronization? One example where it could be
useful is to implement different timeout strategies (for example
something like pf's adaptive timeouts) in userspace.

> About Eric's patch, I think that he can keep a cache of conntracks in
> userspace, as conntrackd does, instead of increasing the message size
> for something that is not always required.

Well, I do agree that any serious use of ctnetlink needs to take
care of the unreliability of netlink and therefore maintain its
own database that is resynchronized after losses etc. (I hope
conntrackd does that :)) But I think at least the networking
netlink subsystems should behave similar (it is for example
a requirement for maintaining automatic libnl caches, should
it be possible to use it with nfnetlink's different byteorder),
and I don't think the few bytes saved are worth beeing incompatible
with assumptions that hold for every other networking netlink
protocol.

  reply	other threads:[~2006-05-31  1:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-19  8:45 [PATCH] Unconditionaly push mark to conntrack structure Eric Leblond
2006-05-30 23:43 ` Patrick McHardy
2006-05-30 23:55   ` Patrick McHardy
2006-05-31  0:26     ` Patrick McHardy
2006-05-31  0:35       ` Pablo Neira Ayuso
2006-05-31  1:01         ` Patrick McHardy [this message]
2006-06-06 11:35           ` Pablo Neira Ayuso
2006-06-08  7:25             ` Patrick McHardy
2006-06-11 22:00               ` Pablo Neira Ayuso
2006-06-06 17:27           ` 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=447CEAF3.5030903@trash.net \
    --to=kaber@trash.net \
    --cc=eric@inl.fr \
    --cc=netfilter-devel@lists.netfilter.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 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.