From: David Miller <davem@davemloft.net>
To: nakam@linux-ipv6.org
Cc: yoshfuji@linux-ipv6.org, anttit@tcs.hut.fi, vnuorval@tcs.hut.fi,
netdev@vger.kernel.org, usagi-core@linux-ipv6.org
Subject: Re: [PATCH 7/23] [PATCH] [XFRM] STATE: Add a hook to find where to be inserted header in outbound.
Date: Tue, 01 Aug 2006 17:09:16 -0700 (PDT) [thread overview]
Message-ID: <20060801.170916.21925105.davem@davemloft.net> (raw)
In-Reply-To: <11541654231584-git-send-email-nakam@linux-ipv6.org>
From: Masahide NAKAMURA <nakam@linux-ipv6.org>
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.
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.
next prev parent reply other threads:[~2006-08-02 0:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-29 9:30 [PATCH 7/23] [PATCH] [XFRM] STATE: Add a hook to find where to be inserted header in outbound Masahide NAKAMURA
2006-07-30 23:31 ` James Morris
2006-08-02 0:09 ` David Miller [this message]
2006-08-02 2:20 ` Masahide NAKAMURA
2006-08-02 4:11 ` David Miller
2006-08-02 8:31 ` Masahide NAKAMURA
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=20060801.170916.21925105.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=anttit@tcs.hut.fi \
--cc=nakam@linux-ipv6.org \
--cc=netdev@vger.kernel.org \
--cc=usagi-core@linux-ipv6.org \
--cc=vnuorval@tcs.hut.fi \
--cc=yoshfuji@linux-ipv6.org \
/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).