David Miller wrote: > From: Masahide NAKAMURA <[EMAIL PROTECTED]> > Date: Sat, 29 Jul 2006 18:30:23 +0900 > >> @@ -270,6 +270,7 @@ struct xfrm_type >> void (*destructor)(struct xfrm_state *); >> int (*input)(struct xfrm_state *, struct sk_buff >> *skb); >> int (*output)(struct xfrm_state *, struct sk_buff >> *pskb); >> + int (*place_find)(struct xfrm_state *, struct >> sk_buff *, u8 **); >> /* Estimate maximal size of result of transformation of a dgram */ >> u32 (*get_max_size)(struct xfrm_state *, int size); >> }; > > I see a dangerous pattern of adding many, many, many methods > to the xfrm_type structure which are only used by ipv6. > But I cannot suggest another method.
Sometimes this is a difficult point for me to design. > There are frequent calls of the form: > > if (x->type->op != NULL) > x->type->op(x, y, z); > else > foo(y, z); > > it might be nicer to hide all of this behind carefully crafted > inline functions. I'll fix it. James gave me this comment, too. BTW he also gave me another point: > Maybe also change the naming of ->place_find to ->hdr_offset I'll use this idea, too. Thank you. -- Masahide NAKAMURA - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html