aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-12 17:17:10 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-12 18:08:55 -0500
commitbef55aebd560c5a6f8883c421abccee39978c58c (patch)
treeb1adbe59af8817ee6ef3009fe8c296d3c87fc067 /include/net
parent1958b856c1a59c0f1e892b92debb8c9fe4f364dc (diff)
decnet: Convert to use flowidn where applicable.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/dn.h6
-rw-r--r--include/net/dn_fib.h8
-rw-r--r--include/net/dn_route.h8
-rw-r--r--include/net/flow.h12
4 files changed, 19 insertions, 15 deletions
diff --git a/include/net/dn.h b/include/net/dn.h
index 558dc7f93fb3..298521e0d8a2 100644
--- a/include/net/dn.h
+++ b/include/net/dn.h
@@ -192,10 +192,10 @@ static inline void dn_dn2eth(unsigned char *ethaddr, __le16 addr)
192 ethaddr[5] = (__u8)(a >> 8); 192 ethaddr[5] = (__u8)(a >> 8);
193} 193}
194 194
195static inline void dn_sk_ports_copy(struct flowi *fl, struct dn_scp *scp) 195static inline void dn_sk_ports_copy(struct flowidn *fld, struct dn_scp *scp)
196{ 196{
197 fl->u.dn.uli.ports.sport = scp->addrloc; 197 fld->fld_sport = scp->addrloc;
198 fl->u.dn.uli.ports.dport = scp->addrrem; 198 fld->fld_dport = scp->addrrem;
199} 199}
200 200
201extern unsigned dn_mss_from_pmtu(struct net_device *dev, int mtu); 201extern unsigned dn_mss_from_pmtu(struct net_device *dev, int mtu);
diff --git a/include/net/dn_fib.h b/include/net/dn_fib.h
index bbcde3238e58..782ef7cb4930 100644
--- a/include/net/dn_fib.h
+++ b/include/net/dn_fib.h
@@ -98,7 +98,7 @@ struct dn_fib_table {
98 int (*delete)(struct dn_fib_table *t, struct rtmsg *r, 98 int (*delete)(struct dn_fib_table *t, struct rtmsg *r,
99 struct dn_kern_rta *rta, struct nlmsghdr *n, 99 struct dn_kern_rta *rta, struct nlmsghdr *n,
100 struct netlink_skb_parms *req); 100 struct netlink_skb_parms *req);
101 int (*lookup)(struct dn_fib_table *t, const struct flowi *fl, 101 int (*lookup)(struct dn_fib_table *t, const struct flowidn *fld,
102 struct dn_fib_res *res); 102 struct dn_fib_res *res);
103 int (*flush)(struct dn_fib_table *t); 103 int (*flush)(struct dn_fib_table *t);
104 int (*dump)(struct dn_fib_table *t, struct sk_buff *skb, struct netlink_callback *cb); 104 int (*dump)(struct dn_fib_table *t, struct sk_buff *skb, struct netlink_callback *cb);
@@ -119,12 +119,12 @@ extern struct dn_fib_info *dn_fib_create_info(const struct rtmsg *r,
119 struct dn_kern_rta *rta, 119 struct dn_kern_rta *rta,
120 const struct nlmsghdr *nlh, int *errp); 120 const struct nlmsghdr *nlh, int *errp);
121extern int dn_fib_semantic_match(int type, struct dn_fib_info *fi, 121extern int dn_fib_semantic_match(int type, struct dn_fib_info *fi,
122 const struct flowi *fl, 122 const struct flowidn *fld,
123 struct dn_fib_res *res); 123 struct dn_fib_res *res);
124extern void dn_fib_release_info(struct dn_fib_info *fi); 124extern void dn_fib_release_info(struct dn_fib_info *fi);
125extern __le16 dn_fib_get_attr16(struct rtattr *attr, int attrlen, int type); 125extern __le16 dn_fib_get_attr16(struct rtattr *attr, int attrlen, int type);
126extern void dn_fib_flush(void); 126extern void dn_fib_flush(void);
127extern void dn_fib_select_multipath(const struct flowi *fl, 127extern void dn_fib_select_multipath(const struct flowidn *fld,
128 struct dn_fib_res *res); 128 struct dn_fib_res *res);
129 129
130/* 130/*
@@ -141,7 +141,7 @@ extern void dn_fib_table_cleanup(void);
141extern void dn_fib_rules_init(void); 141extern void dn_fib_rules_init(void);
142extern void dn_fib_rules_cleanup(void); 142extern void dn_fib_rules_cleanup(void);
143extern unsigned dnet_addr_type(__le16 addr); 143extern unsigned dnet_addr_type(__le16 addr);
144extern int dn_fib_lookup(struct flowi *fl, struct dn_fib_res *res); 144extern int dn_fib_lookup(struct flowidn *fld, struct dn_fib_res *res);
145 145
146extern int dn_fib_dump(struct sk_buff *skb, struct netlink_callback *cb); 146extern int dn_fib_dump(struct sk_buff *skb, struct netlink_callback *cb);
147 147
diff --git a/include/net/dn_route.h b/include/net/dn_route.h
index 1f59005e4979..81712cfa1ddf 100644
--- a/include/net/dn_route.h
+++ b/include/net/dn_route.h
@@ -16,7 +16,7 @@
16*******************************************************************************/ 16*******************************************************************************/
17 17
18extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, gfp_t pri); 18extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, gfp_t pri);
19extern int dn_route_output_sock(struct dst_entry **pprt, struct flowi *, struct sock *sk, int flags); 19extern int dn_route_output_sock(struct dst_entry **pprt, struct flowidn *, struct sock *sk, int flags);
20extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb); 20extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb);
21extern void dn_rt_cache_flush(int delay); 21extern void dn_rt_cache_flush(int delay);
22 22
@@ -67,7 +67,7 @@ extern void dn_rt_cache_flush(int delay);
67struct dn_route { 67struct dn_route {
68 struct dst_entry dst; 68 struct dst_entry dst;
69 69
70 struct flowi fl; 70 struct flowidn fld;
71 71
72 __le16 rt_saddr; 72 __le16 rt_saddr;
73 __le16 rt_daddr; 73 __le16 rt_daddr;
@@ -82,12 +82,12 @@ struct dn_route {
82 82
83static inline bool dn_is_input_route(struct dn_route *rt) 83static inline bool dn_is_input_route(struct dn_route *rt)
84{ 84{
85 return rt->fl.flowi_iif != 0; 85 return rt->fld.flowidn_iif != 0;
86} 86}
87 87
88static inline bool dn_is_output_route(struct dn_route *rt) 88static inline bool dn_is_output_route(struct dn_route *rt)
89{ 89{
90 return rt->fl.flowi_iif == 0; 90 return rt->fld.flowidn_iif == 0;
91} 91}
92 92
93extern void dn_route_init(void); 93extern void dn_route_init(void);
diff --git a/include/net/flow.h b/include/net/flow.h
index 172d76dd8731..7fe5a0f9483a 100644
--- a/include/net/flow.h
+++ b/include/net/flow.h
@@ -95,9 +95,17 @@ struct flowi6 {
95 95
96struct flowidn { 96struct flowidn {
97 struct flowi_common __fl_common; 97 struct flowi_common __fl_common;
98#define flowidn_oif __fl_common.flowic_oif
99#define flowidn_iif __fl_common.flowic_iif
100#define flowidn_mark __fl_common.flowic_mark
101#define flowidn_scope __fl_common.flowic_scope
102#define flowidn_proto __fl_common.flowic_proto
103#define flowidn_flags __fl_common.flowic_flags
98 __le16 daddr; 104 __le16 daddr;
99 __le16 saddr; 105 __le16 saddr;
100 union flowi_uli uli; 106 union flowi_uli uli;
107#define fld_sport uli.ports.sport
108#define fld_dport uli.ports.dport
101}; 109};
102 110
103struct flowi { 111struct flowi {
@@ -115,10 +123,6 @@ struct flowi {
115#define flowi_proto u.__fl_common.flowic_proto 123#define flowi_proto u.__fl_common.flowic_proto
116#define flowi_flags u.__fl_common.flowic_flags 124#define flowi_flags u.__fl_common.flowic_flags
117#define flowi_secid u.__fl_common.flowic_secid 125#define flowi_secid u.__fl_common.flowic_secid
118#define fld_scope flowi_scope
119
120#define fld_dst u.dn.daddr
121#define fld_src u.dn.saddr
122} __attribute__((__aligned__(BITS_PER_LONG/8))); 126} __attribute__((__aligned__(BITS_PER_LONG/8)));
123 127
124static inline struct flowi *flowi4_to_flowi(struct flowi4 *fl4) 128static inline struct flowi *flowi4_to_flowi(struct flowi4 *fl4)