netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jamal <hadi@cyberus.ca>
To: Patrick McHardy <kaber@trash.net>
Cc: Robert Olsson <Robert.Olsson@data.slu.se>,
	David Miller <davem@davemloft.net>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	netdev@vger.kernel.org, James Morris <jmorris@namei.org>
Subject: Re: [PATCH] pktgen IPSEC 3/4: Introduce xfrm SAD only lookup
Date: Tue, 12 Jun 2007 11:19:23 -0400	[thread overview]
Message-ID: <1181661564.4067.40.camel@localhost> (raw)
In-Reply-To: <466EA36E.80206@trash.net>

On Tue, 2007-12-06 at 15:45 +0200, Patrick McHardy wrote:
> Looks good too me, just a few minor nitpicks as usual :)

I like the nitpicks - they make the code better (as long as we put
a time limit on them ;->)

> 
> ^^ please delete empty line

will do.

> > +			if (x->km.state != XFRM_STATE_VALID)
> > +					continue;
> 
> ^ one indentation level too much

will fix.

> The whole thing could be compacted by moving the XFRM_STATE_VALID
> check to the first condition:
> 
> 		if (x->props.family == family &&
> 		    x->props.reqid == reqid &&
> 		    !(x->props.flags & XFRM_STATE_WILDRECV) &&
> 		    xfrm_state_addr_check(x, daddr, saddr, family) &&
> 		    mode == x->props.mode &&
> 		    proto == x->id.proto &&
> 		    x->km.state == XFRM_STATE_VALID) {
> 			rx = x;
> 			break;
> 		}
> 
> or alternatively turn the != XFRM_STATE_VALID into == if you
> want to keep the first condition similar to xfrm_state_find
> (but the mode and proto conditions are reversed anyways).
> 

Will do.

> BTW, wouldn't it make sense to allow use of the SPI as well?

SPI is the least user friendly parameter - but i could add it later.
I want to add tunnel mode next then i can revisit SPI.

Thanks for taking the time to review this Patrick.

cheers,
jamal



  reply	other threads:[~2007-06-12 15:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-12 11:56 [PATCH SET] pktgen IPSEC 0/4 jamal
2007-06-12 12:00 ` [PATCH] pktgen IPSEC 1/4: Centralize pktgen packet overhead management jamal
2007-06-12 12:01   ` [PATCH] pktgen IPSEC 2/4: Introduce pktgen sequential flows jamal
2007-06-12 12:03     ` [PATCH] pktgen IPSEC 3/4: Introduce xfrm SAD only lookup jamal
2007-06-12 12:04       ` [PATCH] pktgen IPSEC 4/4: Add IPSEC support to pktgen jamal
2007-06-12 13:31         ` Robert Olsson
2007-06-12 23:08         ` Resend: " jamal
2007-07-03  5:42           ` David Miller
2007-06-12 13:30       ` [PATCH] pktgen IPSEC 3/4: Introduce xfrm SAD only lookup Robert Olsson
2007-06-12 13:45       ` Patrick McHardy
2007-06-12 15:19         ` jamal [this message]
2007-06-12 23:06           ` Resend: " jamal
2007-07-03  5:41             ` David Miller
2007-06-12 13:23     ` [PATCH] pktgen IPSEC 2/4: Introduce pktgen sequential flows Robert Olsson
2007-07-03  5:40     ` David Miller
2007-06-12 13:21   ` [PATCH] pktgen IPSEC 1/4: Centralize pktgen packet overhead management Robert Olsson
2007-06-12 15:13     ` jamal
2007-07-03  5:40   ` David Miller

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=1181661564.4067.40.camel@localhost \
    --to=hadi@cyberus.ca \
    --cc=Robert.Olsson@data.slu.se \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).