All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Netfilter Developer Mailing List <netfilter-devel@lists.netfilter.org>
Subject: Re: [PATCH 1/2] xt_u32 (kernel) - match arbitrary bits and bytes of a packet
Date: Tue, 05 Jun 2007 13:34:08 +0200	[thread overview]
Message-ID: <46654A30.4080309@trash.net> (raw)
In-Reply-To: <Pine.LNX.4.61.0706050901210.20829@yvahk01.tjqt.qr>

Jan Engelhardt wrote:
>>>+	spin_lock_bh(&xt_u32_lock);
>>>+
>>>+	head = skb_header_pointer(skb, 0, min(skb->len,
>>>+	       sizeof(xt_u32_buffer)), xt_u32_buffer);
> 
> 
> I'd like to hear opinions about:
> 
>  * open coding skb_header_pointer
> 
>    In the "hlen - offset >= len" case in skb_header_pointer(), it just
>    returns a pointer to the existing skb without copying, in which
>    case we would not need to take a lock at all.


No special-case solutions please, this affects many netfilter modules
and we want this for all or none.

>  * use percpu buffers, with or without opencoding skb_header_pointer
>    so that cpus/threads do not have to wait for another -m u32 to finish.


Not worth the (potentially enormous) memory waste I guess.

  reply	other threads:[~2007-06-05 11:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-02 21:46 [PATCH 0/2] xt_u32 - match arbitrary bits and bytes of a packet Jan Engelhardt
2007-06-02 21:50 ` [PATCH 1/2] xt_u32 (kernel) " Jan Engelhardt
2007-06-02 21:50   ` Jan Engelhardt
2007-06-03 17:23   ` Patrick McHardy
2007-06-03 20:09     ` Jan Engelhardt
2007-06-04 11:25       ` Patrick McHardy
2007-06-05  7:07     ` Jan Engelhardt
2007-06-05 11:34       ` Patrick McHardy [this message]
2007-06-02 21:51 ` [PATCH 2/2] xt_u32 (iptables) " Jan Engelhardt
2007-06-03  5:07 ` [PATCH 0/2] xt_u32 " Valdis.Kletnieks
2007-06-03  8:20   ` Jan Engelhardt

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=46654A30.4080309@trash.net \
    --to=kaber@trash.net \
    --cc=jengelh@linux01.gwdg.de \
    --cc=netfilter-devel@lists.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.