All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@medozas.de>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Patrick McHardy <kaber@trash.net>,
	Netfilter Development Mailinglist
	<netfilter-devel@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH iptables] extension: add xt_cpu match
Date: Fri, 23 Jul 2010 19:53:22 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LSU.2.01.1007231952560.26745@obet.zrqbmnf.qr> (raw)
In-Reply-To: <1279906219.2481.94.camel@edumazet-laptop>


On Friday 2010-07-23 19:30, Eric Dumazet wrote:
>> >+
>> >+static const struct option cpu_opts[] = {
>> >+	{ "cpu", 1, NULL, '1' },
>> >+	{ .name = NULL }
>> >+};
>> 
>> I will never understand that sort of style mix logic. Why the
>> C99 initializer only on the sentinel?
>> 
>> {
>> 	{.name = "cpu", .has_arg = true, .val = '1'},
>> 	{NULL},
>> };
>> 
>
>copy/paste from another module ?
>
>
>> >diff --git a/extensions/libxt_cpu.man b/extensions/libxt_cpu.man
>> >index e69de29..f42ac7a 100644
>> >--- a/extensions/libxt_cpu.man
>> >+++ b/extensions/libxt_cpu.man
>> >@@ -0,0 +1,16 @@
>> >+.TP
>> >+[\fB!\fP] \fB\-\-cpu\fP \fInumber\fP
>> >+
>> >+Match cpu handling this packet. cpus are numbered from 0 to NR_CPUS-1
>> 
>> Unwanted blank line.
>> 
>> >+Can be used in combination with RPS (Remote Packet Steering) or
>> >+multiqueue NICS to spread network traffic on different queues.
>> >+.PP
>> >+Example:
>> >+.PP
>> >+iptables \-t nat \-A PREROUTING \-p tcp \-\-dport 80 \-m cpu \-\-cpu 0 
>> >+        \-j REDIRECT \-\-to\-port 8080
>> 
>> Unwanted indent.
>> 
>> >+.PP
>> >+iptables \-t nat \-A PREROUTING \-p tcp \-\-dport 80 \-m cpu \-\-cpu 1 
>> >+        \-j REDIRECT \-\-to\-port 8081
>> >+.PP
>> >+Available since linux 2.6.36
>> 
>> Linux.
>
>
>OK ;)
>
>I'll provide a cleanup patch, not only to xt_cpu but all other iptables
>modules that dont meet your coding style requirements ;)

Well nah I'm already on it myself, given Patrick has already imported the
patches.

      reply	other threads:[~2010-07-23 17:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-22 14:03 [PATCH nf-next-2.6] netfilter: add xt_cpu match Eric Dumazet
2010-07-22 14:19 ` Jan Engelhardt
2010-07-22 15:18   ` Eric Dumazet
2010-07-22 15:39     ` Jan Engelhardt
2010-07-22 16:24       ` Eric Dumazet
2010-07-23 11:00     ` Patrick McHardy
2010-07-23 13:43       ` [PATCH iptables] extension: " Eric Dumazet
2010-07-23 14:13         ` Patrick McHardy
2010-07-23 16:46         ` Jan Engelhardt
2010-07-23 17:30           ` Eric Dumazet
2010-07-23 17:53             ` Jan Engelhardt [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=alpine.LSU.2.01.1007231952560.26745@obet.zrqbmnf.qr \
    --to=jengelh@medozas.de \
    --cc=eric.dumazet@gmail.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.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.