From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Engelhardt Subject: Re: [PATCH iptables] extension: add xt_cpu match Date: Fri, 23 Jul 2010 19:53:22 +0200 (CEST) Message-ID: References: <1279807385.2467.67.camel@edumazet-laptop> <1279811939.2467.79.camel@edumazet-laptop> <4C497644.7050201@trash.net> <1279892621.2481.53.camel@edumazet-laptop> <1279906219.2481.94.camel@edumazet-laptop> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Patrick McHardy , Netfilter Development Mailinglist , netdev To: Eric Dumazet Return-path: Received: from borg.medozas.de ([188.40.89.202]:57525 "EHLO borg.medozas.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753788Ab0GWRxY (ORCPT ); Fri, 23 Jul 2010 13:53:24 -0400 In-Reply-To: <1279906219.2481.94.camel@edumazet-laptop> Sender: netdev-owner@vger.kernel.org List-ID: 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.