-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
struct net::ipv6.ip6_dst_ops is separatedly dynamically allocated, but there is no fundamental reason for it. Embed it directly into struct netns_ipv6. For that: * move struct dst_ops into separate header to fix circular dependencies I honestly tried not to, it's pretty impossible to do other way * drop dynamical allocation, allocate together with netns For a change, remove struct dst_ops::dst_net, it's deducible by using container_of() given dst_ops pointer. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Alexey Dobriyan
authored and
David S. Miller
committed
Sep 2, 2009
1 parent
885a136
commit 86393e5
Showing
4 changed files
with
44 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef _NET_DST_OPS_H | ||
#define _NET_DST_OPS_H | ||
#include <linux/types.h> | ||
|
||
struct dst_entry; | ||
struct kmem_cachep; | ||
struct net_device; | ||
struct sk_buff; | ||
|
||
struct dst_ops { | ||
unsigned short family; | ||
__be16 protocol; | ||
unsigned gc_thresh; | ||
|
||
int (*gc)(struct dst_ops *ops); | ||
struct dst_entry * (*check)(struct dst_entry *, __u32 cookie); | ||
void (*destroy)(struct dst_entry *); | ||
void (*ifdown)(struct dst_entry *, | ||
struct net_device *dev, int how); | ||
struct dst_entry * (*negative_advice)(struct dst_entry *); | ||
void (*link_failure)(struct sk_buff *); | ||
void (*update_pmtu)(struct dst_entry *dst, u32 mtu); | ||
int (*local_out)(struct sk_buff *skb); | ||
|
||
atomic_t entries; | ||
struct kmem_cache *kmem_cachep; | ||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters