netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jamal <hadi@cyberus.ca>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@oss.sgi.com
Subject: Re: patch2: del/get byid
Date: Wed, 27 Apr 2005 22:39:40 -0400	[thread overview]
Message-ID: <1114655980.7663.76.camel@localhost.localdomain> (raw)
In-Reply-To: <20050428022549.GA23556@gondor.apana.org.au>

On Thu, 2005-28-04 at 12:25 +1000, Herbert Xu wrote:
> On Wed, Apr 27, 2005 at 10:23:34PM -0400, jamal wrote:
> > 
> > well, i think it is a bug that indices are being ignored by the kernel.
> > To demonstrate:
> > Add a rule with index 100;
> > now try to delete or get by index.
> 
> But your patch has nothing to do with this.  You were changing
> id & 7 to dir.  Because the lower bits of index is set from the
> direction, this is a no-op.

The patch allows to walk all policies in the direction until a match to
the index is found.
It removes the assumption that theres a formula to compute indices
(which is fine if used by the kernel when I specify no index).

------------
jdev10:~# ip x policy add dir in index 102 priority 10 src 11.0.0.10 dst
11.0.0.2

jdev10:~# ip x p get dir in index 102
src 11.0.0.10/32 dst 11.0.0.2/32
        dir in priority 10
jdev10:~# ip -s x p ls
src 11.0.0.10/32 dst 11.0.0.2/32 uid 0
        dir in action allow index 102 priority 10 share any flag
0x00000000
        lifetime config:
          limit: soft (INF)(bytes), hard (INF)(bytes)
          limit: soft (INF)(packets), hard (INF)(packets)
          expire add: soft 0(sec), hard 0(sec)
          expire use: soft 0(sec), hard 0(sec)
        lifetime current:
          0(bytes), 0(packets)
          add 2005-04-28 02:45:10 use -
-----

That would never work without those two patches.

cheers,
jamal

  reply	other threads:[~2005-04-28  2:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-28  2:11 patch2: del/get byid jamal
2005-04-28  2:14 ` Herbert Xu
2005-04-28  2:23   ` jamal
2005-04-28  2:25     ` Herbert Xu
2005-04-28  2:39       ` jamal [this message]
2005-04-28  2:42         ` Herbert Xu
2005-04-28  2:55           ` jamal
2005-04-28  3:03             ` Herbert Xu
2005-04-28  3:24               ` jamal
2005-04-28 14:20                 ` jamal
2005-04-28 23:11                   ` Herbert Xu
2005-04-29 12:51                     ` jamal
2005-04-29 23:20                       ` jamal
2005-04-29 23:49                         ` Herbert Xu
2005-04-30  0:01                           ` jamal
2005-04-30  0:12                             ` Herbert Xu
2005-04-30  0:35                               ` jamal
2005-04-30  0:47                                 ` Herbert Xu
2005-04-30  1:08                                   ` jamal

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=1114655980.7663.76.camel@localhost.localdomain \
    --to=hadi@cyberus.ca \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@oss.sgi.com \
    /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).