Re: [RFC 2.6.10 1/22] xfrm: Add direction information to xfrm_state

From: Ingo Oeser (ioe-lkml_at_axxeo.de)
Date: 12/30/04

  • Next message: Tetsuo Handa: "Re: Is CAP_SYS_ADMIN checked by every program !?"
    To: linux-kernel@vger.kernel.org
    Date:	Thu, 30 Dec 2004 14:36:06 +0100
    
    

    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/


  • Next message: Tetsuo Handa: "Re: Is CAP_SYS_ADMIN checked by every program !?"

    Relevant Pages

    • Re: My thoughts on the "new development model"
      ... |>>> 2.6 tree is great for gentoo users who like gcc consuming all CPU ... |>> that after a month or so of fixes etc it will be a very stable kernel ... driver for 2.6.7 for an ADSL card; a development driver for 2.6.5 for a ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: SL811 problem on mach-pxa
      ... It was tested with _both_ workarounds for IRQ issues; ... unlike the predecessors to this driver). ... I've had reports that one of the ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: sata related hang with linux-2.6
      ... IMHO there's something not quite right with the Silicon Image libata ... Perhaps the driver is enabling the hardware to generate interrupts ... before setting up the interrupt routine for it? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.7 (future kernel) wish
      ... > I've never seen one give a STOP error from that but I guess a bad driver ... I would like to see the HAL type crap for Linux. ... to have uniform user device control from a gui programmable means. ... 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/ ...
      (Linux-Kernel)
    • [RFC] removal of legacy cdrom drivers (Re: [PATCH] mcdx.c insanity removal)
      ... bar and baz and fairly long expressions. ... if we want to keep the FPOS in the tree. ... Driver is obviously ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)