From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira <pablo@eurodev.net>
Cc: Netfilter Development Mailinglist
<netfilter-devel@lists.netfilter.org>,
Martin Josefsson <gandalf@wlug.westbo.se>
Subject: Re: [PATCH] clean up for conntrack stats
Date: Thu, 07 Oct 2004 02:30:01 +0200 [thread overview]
Message-ID: <41648E09.3000202@trash.net> (raw)
In-Reply-To: <41647489.2090402@eurodev.net>
Pablo Neira wrote:
> Patrick McHardy wrote:
>
>>> b) Martin, I've killed this to make them use the macro, are you ok
>>> with this? I know that we call twice smp_proccesor_id now, but it's
>>> clean I think.
>>>
>>> - /* use per_cpu() to avoid multiple calls to
>>> smp_processor_id() */
>>> - unsigned int cpu = smp_processor_id();
>>>
>>> MUST_BE_READ_LOCKED(&ip_conntrack_lock);
>>> list_for_each_entry(h, &ip_conntrack_hash[hash], list) {
>>> if (conntrack_tuple_cmp(h, tuple, ignored_conntrack)) {
>>> - per_cpu(ip_conntrack_stat, cpu).found++;
>>> + CONNTRACK_STAT_INC(found);
>>> return h;
>>>
>>
>> Please send this part as a seperate patch.
>
>
>
> attached to this email, conntrack_find-stats-cleanup.patch file.
Applied, thanks. smp_processor_id doesn't involve atomic
operations (at least on x86), so I don't expect it harms performance
noticeable.
>>
>> Why this change ? ct_add_counters is an inline function with an
>> empty body when CONFIG_IP_NF_CT_ACCT is undefined.
>
>
>
> True, it changes nothing. Packet counting vanishes if
> CONFIG_IP_NF_CT_ACCT is unset, to make the system consistent maybe we
> should make vanish normal stats counting as well. See
> ct-stat-macro-vanishes.patch file. If you don't like it anyway, drop
> it :-).
If we make it configurable it should use a different config
option. CONFIG_IP_NF_CT_ACCT is per-conntrack accounting,
conntrack stats is something quite different. I'm still not
convinced it is worth adding yet another config option,
considering it doesn't cost much, and it provides some useful
debugging information for people complaining about long delays
(lots of expectations) and such.
> I've attached another patch, see fix-remove-ip_conntrack_expect.patch
> file, if conntrack stats are set, ip_conntrack is compiled as module
> and you unload it, ip_conntrack_expect entry in /proc stays there
> forever.
Thanks alot, also applied. But please do two things next time
you submit patches:
- Sign off your patches. I've signed your name this time,
if you don't protest I'm going to submit them tomorrow.
- Please send each patch in a seperate mail. This makes
it easier to review and reply.
Thanks.
Regards,
Patrick
prev parent reply other threads:[~2004-10-07 0:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-05 14:52 [PATCH] clean up for conntrack stats Pablo Neira
2004-10-06 17:47 ` Patrick McHardy
2004-10-06 22:41 ` Pablo Neira
2004-10-07 0:30 ` Patrick McHardy [this message]
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=41648E09.3000202@trash.net \
--to=kaber@trash.net \
--cc=gandalf@wlug.westbo.se \
--cc=netfilter-devel@lists.netfilter.org \
--cc=pablo@eurodev.net \
/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.