lkml.org 
[lkml]   [2004]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [RFC 2.6.10 1/22] xfrm: Add direction information to xfrm_state
    Date
    Hi David,

    I'm happy to see a framework and example driver for this.

    David Dillow schrieb:
    > diff -Nru a/include/net/xfrm.h b/include/net/xfrm.h
    > --- a/include/net/xfrm.h 2004-12-30 01:12:08 -05:00
    > +++ b/include/net/xfrm.h 2004-12-30 01:12:08 -05:00
    > @@ -194,6 +203,7 @@
    > struct xfrm_state *(*find_acq)(u8 mode, u32 reqid, u8 proto,
    > xfrm_address_t *daddr, xfrm_address_t *saddr,
    > int create);
    > + void (*map_direction)(struct xfrm_state *xfrm);
    > };
    >

    Please don't build modifiers, but build functions instead.

    e.g.

    xfrm->direction = map_direction(xfrm)

    That way you don't hide the assignment and thus code becomes much clearer and
    can be called multiple times without risk.


    Regards

    Ingo Oeser

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:09    [W:0.033 / U:0.444 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site