[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130730072305.GB10550@zirkel.wertarbyte.de>
Date: Tue, 30 Jul 2013 09:23:05 +0200
From: Stefan Tomanek <stefan.tomanek@...tarbyte.de>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, hannes@...essinduktion.org,
bsderandrew@...il.com
Subject: Re: [PATCH v2 2/2] fib_rules: add .suppress operation
Dies schrieb David Miller (davem@...emloft.net):
> > +static bool fib4_rule_suppress(struct fib_rule *rule, struct fib_lookup_arg *arg) {
> ...
> > @@ -119,6 +119,18 @@ out:
> > return err;
> > }
> >
> > +static bool fib6_rule_suppress(struct fib_rule *rule, struct fib_lookup_arg *arg) {
> > + struct rt6_info *rt = (struct rt6_info *) arg->result;
> > + /*
> > + * do not accept result if the route does
> > + * not meet the required prefix length
> > + */
>
> Please format this stuff correctly.
>
> Functions are declared like this:
>
> static type NAME(TYPE ARG1, TYPE ARG2)
> {
> }
Noted and fixed.
> You don't put the openning curly brace at the end of the line with the
> closing parenthesis of the argument list.
>
> Next, comments are to be formatted:
>
> /* Like
> * this.
> */
Well, to be fair, most comments in the existing code base actually use the style
I employed (in fact, I was copying it), so it seems like a blurry line at least.
/*
* If we need to find a source address for this traffic,
* we check the result if it meets requirement of the rule.
*/
-----8<----
/*
* If FIB_RULE_FIND_SADDR is set and we do not have a
* source address for the traffic, we defer check for
* source address.
*/
-----8<----
/* The lock is not required here, the list in unreacheable
* at the moment this function is called */
-----8<----
/* compatibility: if the mark value is non-zero all bits
* are compared unless a mask is explicitly specified.
*/
-----8<----
/*
* There are unresolved goto rules in the list, check if
* any of them are pointing to this new rule.
*/
-----8<----
/*
* Check if this rule is a target to any of them. If so,
* disable them. As this operation is eventually very
* expensive, it is only performed if goto rules have
* actually been added.
*/
-----8<----
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists