netdev
[Top] [All Lists]

Re: patch2: del/get byid

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: Re: patch2: del/get byid
From: jamal <hadi@xxxxxxxxxx>
Date: Fri, 29 Apr 2005 19:20:46 -0400
Cc: Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx, "David S. Miller" <davem@xxxxxxxxxxxxx>
In-reply-to: <1114779104.7800.22.camel@xxxxxxxxxxxxxxxxxxxxx>
Organization: unknown
References: <1114654284.7663.50.camel@xxxxxxxxxxxxxxxxxxxxx> <20050428021426.GA23415@xxxxxxxxxxxxxxxxxxx> <1114655014.7663.61.camel@xxxxxxxxxxxxxxxxxxxxx> <20050428022549.GA23556@xxxxxxxxxxxxxxxxxxx> <1114655980.7663.76.camel@xxxxxxxxxxxxxxxxxxxxx> <20050428024253.GA23695@xxxxxxxxxxxxxxxxxxx> <1114656932.7663.88.camel@xxxxxxxxxxxxxxxxxxxxx> <20050428030325.GB23823@xxxxxxxxxxxxxxxxxxx> <1114658657.7663.110.camel@xxxxxxxxxxxxxxxxxxxxx> <1114698033.7663.197.camel@xxxxxxxxxxxxxxxxxxxxx> <20050428231154.GA14215@xxxxxxxxxxxxxxxxxxx> <1114779104.7800.22.camel@xxxxxxxxxxxxxxxxxxxxx>
Reply-to: hadi@xxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
On Fri, 2005-29-04 at 08:51 -0400, jamal wrote:
> On Fri, 2005-29-04 at 09:11 +1000, Herbert Xu wrote:

> > 
> > You also still need to solve the problem that you may need to
> > delete two policies if one matches the index while the other matches
> > the selector (or selector plus priority if you do that).
> > 
> 
> Ok, this bit is tricky...  that is unless we disallowed it from
> happening in the first place maybe
> 
> i.e something along the lines of:
> 
> delp1 = find by index
> delp2 = find by selector
> if delp1 && delp2 and delp1 != delp2
> return -EINVAL
> 
> // so far good. check the add case
> if delp1 || delp2 and excl
> return -EEXIST
>         
> do the insert here based on priority ..
> 
> Thoughts?

Ok, here is the patch - I spent about 30 minutes testing - some of the
logs i remembered capturing attached (in these tests i was trying to
update a rule by selector or index and and see that it gets moved
correctly in terms of priority order).


A rule is unique by both selector(which it was already) and index(new).


cheers,
jamal

Attachment: polid_p5
Description: Text document

Attachment: ipsec-spd-priotst
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>