From: Patrick McHardy <kaber@trash.net>
To: Philip Craig <philipc@snapgear.com>
Cc: Harald Welte <laforge@netfilter.org>,
Netfilter Developer Mailing List
<netfilter-devel@lists.netfilter.org>,
Jan Engelhardt <jengelh@linux01.gwdg.de>
Subject: Re: xt_MARK useless line
Date: Wed, 10 Jan 2007 06:53:42 +0100 [thread overview]
Message-ID: <45A47F66.2050603@trash.net> (raw)
In-Reply-To: <45A18EE8.5080909@snapgear.com>
Philip Craig wrote:
> Jan Engelhardt wrote:
>
>>On Jan 7 2007 15:15, Harald Welte wrote:
>>
>>>On Fri, Dec 29, 2006 at 05:54:07PM +0100, Jan Engelhardt wrote:
>>>
>>>>Hi,
>>>>
>>>>in linux-2.6.20-rc2/net/netfilter/xt_MARK.c one can find
>>>>
>>>> if((*pskb)->mark != markinfo->mark)
>>>> (*pskb)->mark = markinfo->mark;
>>>>
>>>>would not it be simpler just to set the mark? Or are comparison-jumps
>>>>like these 'cheaper' than assignments? (I don't think so.)
>>>
>>>I don't really know. I think the intention might have been to prevent
>>>writes to shared data structures, in order to reduce cache ping-pong on
>>>SMP. However, unlesss some really complex and rare event happens, this
>>>skb will never be processed asynchronously and thus not be used on any
>>>other CPU.
>>
>>In other words, your conclusion is ... - (R)emove/(K)eep?
>>(For the record, it's anywhere where something is set, that is, MARK, CONNMARK,
>>SECMARK, TOS, ECN, and so on, everywhere you have XT_CONTINUE)
>
>
> Some of these may be leftover from when NFC_ALTERED existed?
That sounds like the most likely explanation. Looking at 2.4:
if((*pskb)->nfmark != markinfo->mark) {
(*pskb)->nfmark = markinfo->mark;
(*pskb)->nfcache |= NFC_ALTERED;
}
I vote for removing this (also in CONNMARK, CONNSECMARK, ...).
next prev parent reply other threads:[~2007-01-10 5:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-29 16:54 xt_MARK useless line Jan Engelhardt
2007-01-07 14:15 ` Harald Welte
2007-01-07 15:14 ` Jan Engelhardt
2007-01-08 0:23 ` Philip Craig
2007-01-10 5:53 ` Patrick McHardy [this message]
2007-01-10 11:03 ` Jan Engelhardt
2007-01-10 11:12 ` Jan Engelhardt
2007-01-10 15:42 ` Patrick McHardy
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=45A47F66.2050603@trash.net \
--to=kaber@trash.net \
--cc=jengelh@linux01.gwdg.de \
--cc=laforge@netfilter.org \
--cc=netfilter-devel@lists.netfilter.org \
--cc=philipc@snapgear.com \
/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.