aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip_vs.h
diff options
context:
space:
mode:
authorHans Schillstrom <hans.schillstrom@ericsson.com>2011-01-03 08:44:51 -0500
committerSimon Horman <horms@verge.net.au>2011-01-12 20:30:27 -0500
commit9330419d9aa4f97df412ac9be9fc0388c67dd315 (patch)
tree3fdd9103f299fcd2dfafcf0f51d1b5c4430987c2 /include/net/ip_vs.h
parent88fe2d372793a71ae4f6319a16f537d56a83906c (diff)
IPVS: netns, use ip_vs_proto_data as param.
ip_vs_protocol *pp is replaced by ip_vs_proto_data *pd in function call in ip_vs_protocol struct i.e. :, - timeout_change() - state_transition() ip_vs_protocol_timeout_change() got ipvs as param, due to above and a upcoming patch - defence work Most of this changes are triggered by Julians comment: "tcp_timeout_change should work with the new struct ip_vs_proto_data so that tcp_state_table will go to pd->state_table and set_tcp_state will get pd instead of pp" *v3 Mostly comments from Julian The pp -> pd conversion should start from functions like ip_vs_out() that use pp = ip_vs_proto_get(iph.protocol), now they should use ip_vs_proto_data_get(net, iph.protocol). conn_in_get() and conn_out_get() unused param *pp, removed. *v4 ip_vs_protocol_timeout_change() walk the proto_data path. Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r--include/net/ip_vs.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 3c45a00cdc3e..464ea365ca07 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -372,13 +372,12 @@ struct ip_vs_protocol {
372 void (*exit_netns)(struct net *net, struct ip_vs_proto_data *pd); 372 void (*exit_netns)(struct net *net, struct ip_vs_proto_data *pd);
373 373
374 int (*conn_schedule)(int af, struct sk_buff *skb, 374 int (*conn_schedule)(int af, struct sk_buff *skb,
375 struct ip_vs_protocol *pp, 375 struct ip_vs_proto_data *pd,
376 int *verdict, struct ip_vs_conn **cpp); 376 int *verdict, struct ip_vs_conn **cpp);
377 377
378 struct ip_vs_conn * 378 struct ip_vs_conn *
379 (*conn_in_get)(int af, 379 (*conn_in_get)(int af,
380 const struct sk_buff *skb, 380 const struct sk_buff *skb,
381 struct ip_vs_protocol *pp,
382 const struct ip_vs_iphdr *iph, 381 const struct ip_vs_iphdr *iph,
383 unsigned int proto_off, 382 unsigned int proto_off,
384 int inverse); 383 int inverse);
@@ -386,7 +385,6 @@ struct ip_vs_protocol {
386 struct ip_vs_conn * 385 struct ip_vs_conn *
387 (*conn_out_get)(int af, 386 (*conn_out_get)(int af,
388 const struct sk_buff *skb, 387 const struct sk_buff *skb,
389 struct ip_vs_protocol *pp,
390 const struct ip_vs_iphdr *iph, 388 const struct ip_vs_iphdr *iph,
391 unsigned int proto_off, 389 unsigned int proto_off,
392 int inverse); 390 int inverse);
@@ -404,7 +402,7 @@ struct ip_vs_protocol {
404 402
405 int (*state_transition)(struct ip_vs_conn *cp, int direction, 403 int (*state_transition)(struct ip_vs_conn *cp, int direction,
406 const struct sk_buff *skb, 404 const struct sk_buff *skb,
407 struct ip_vs_protocol *pp); 405 struct ip_vs_proto_data *pd);
408 406
409 int (*register_app)(struct ip_vs_app *inc); 407 int (*register_app)(struct ip_vs_app *inc);
410 408
@@ -417,9 +415,7 @@ struct ip_vs_protocol {
417 int offset, 415 int offset,
418 const char *msg); 416 const char *msg);
419 417
420 void (*timeout_change)(struct ip_vs_protocol *pp, int flags); 418 void (*timeout_change)(struct ip_vs_proto_data *pd, int flags);
421
422 int (*set_state_timeout)(struct ip_vs_protocol *pp, char *sname, int to);
423}; 419};
424 420
425/* 421/*
@@ -778,7 +774,6 @@ struct ip_vs_conn *ip_vs_conn_in_get(const struct ip_vs_conn_param *p);
778struct ip_vs_conn *ip_vs_ct_in_get(const struct ip_vs_conn_param *p); 774struct ip_vs_conn *ip_vs_ct_in_get(const struct ip_vs_conn_param *p);
779 775
780struct ip_vs_conn * ip_vs_conn_in_get_proto(int af, const struct sk_buff *skb, 776struct ip_vs_conn * ip_vs_conn_in_get_proto(int af, const struct sk_buff *skb,
781 struct ip_vs_protocol *pp,
782 const struct ip_vs_iphdr *iph, 777 const struct ip_vs_iphdr *iph,
783 unsigned int proto_off, 778 unsigned int proto_off,
784 int inverse); 779 int inverse);
@@ -786,7 +781,6 @@ struct ip_vs_conn * ip_vs_conn_in_get_proto(int af, const struct sk_buff *skb,
786struct ip_vs_conn *ip_vs_conn_out_get(const struct ip_vs_conn_param *p); 781struct ip_vs_conn *ip_vs_conn_out_get(const struct ip_vs_conn_param *p);
787 782
788struct ip_vs_conn * ip_vs_conn_out_get_proto(int af, const struct sk_buff *skb, 783struct ip_vs_conn * ip_vs_conn_out_get_proto(int af, const struct sk_buff *skb,
789 struct ip_vs_protocol *pp,
790 const struct ip_vs_iphdr *iph, 784 const struct ip_vs_iphdr *iph,
791 unsigned int proto_off, 785 unsigned int proto_off,
792 int inverse); 786 int inverse);
@@ -917,7 +911,7 @@ static inline void ip_vs_pe_put(const struct ip_vs_pe *pe)
917 */ 911 */
918extern int ip_vs_protocol_init(void); 912extern int ip_vs_protocol_init(void);
919extern void ip_vs_protocol_cleanup(void); 913extern void ip_vs_protocol_cleanup(void);
920extern void ip_vs_protocol_timeout_change(int flags); 914extern void ip_vs_protocol_timeout_change(struct netns_ipvs *ipvs, int flags);
921extern int *ip_vs_create_timeout_table(int *table, int size); 915extern int *ip_vs_create_timeout_table(int *table, int size);
922extern int 916extern int
923ip_vs_set_state_timeout(int *table, int num, const char *const *names, 917ip_vs_set_state_timeout(int *table, int num, const char *const *names,
@@ -947,9 +941,9 @@ extern struct ip_vs_scheduler *ip_vs_scheduler_get(const char *sched_name);
947extern void ip_vs_scheduler_put(struct ip_vs_scheduler *scheduler); 941extern void ip_vs_scheduler_put(struct ip_vs_scheduler *scheduler);
948extern struct ip_vs_conn * 942extern struct ip_vs_conn *
949ip_vs_schedule(struct ip_vs_service *svc, struct sk_buff *skb, 943ip_vs_schedule(struct ip_vs_service *svc, struct sk_buff *skb,
950 struct ip_vs_protocol *pp, int *ignored); 944 struct ip_vs_proto_data *pd, int *ignored);
951extern int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb, 945extern int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb,
952 struct ip_vs_protocol *pp); 946 struct ip_vs_proto_data *pd);
953 947
954 948
955/* 949/*