netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 1/5] NET : Introduce union in struct dst_entry to hold 'next' pointer
Date: Thu, 08 Feb 2007 22:33:09 +0100	[thread overview]
Message-ID: <45CB9715.5000509@cosmosbay.com> (raw)
In-Reply-To: <20070207.165213.98418769.davem@davemloft.net>

[-- Attachment #1: Type: text/plain, Size: 304 bytes --]

This patch introduces an anonymous union to nicely express the fact that all 
objects inherited from struct dst_entry should access to the generic 'next' 
pointer but with appropriate type verification.

This patch is a prereq before following patches.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>

[-- Attachment #2: introduce_union_in_dst_entry.patch --]
[-- Type: text/plain, Size: 458 bytes --]

--- linux-2.6.20/include/net/dst.h	2007-02-08 21:06:15.000000000 +0100
+++ linux-2.6.20-ed/include/net/dst.h	2007-02-08 21:07:21.000000000 +0100
@@ -37,7 +37,12 @@ struct sk_buff;
 
 struct dst_entry
 {
-	struct dst_entry        *next;
+	union {
+		struct dst_entry *next;
+		struct rtable    *rt_next;
+		struct rt6_info   *rt6_next;
+		struct dn_route  *dn_next;
+	};
 	atomic_t		__refcnt;	/* client references	*/
 	int			__use;
 	struct dst_entry	*child;

      parent reply	other threads:[~2007-02-08 21:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-08  0:42 Fw: [PATCH 0/5] [XFRM,PFKEYV2]: MIGRATE support (take 2) Shinta Sugimoto
2007-02-08  0:52 ` David Miller
2007-02-08 21:32   ` [PATCH 0/5] NET Improve layering of structs dst_entry/rtable/rt6_info/dn_route to get less dcache footprint Eric Dumazet
2007-02-10  1:31     ` David Miller
2007-02-10  8:17       ` Eric Dumazet
2007-02-08 21:33   ` Eric Dumazet [this message]

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=45CB9715.5000509@cosmosbay.com \
    --to=dada1@cosmosbay.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.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).