diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2008-01-15 02:44:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:02:29 -0500 |
commit | 022748a9357c4c1a0113ec1ce5612f383b80156f (patch) | |
tree | 9c1d64082f93011732c496d356543faa4ca76e01 /net | |
parent | f9ef8a23c37677929e95ad4026a2fa0d449c1d3e (diff) |
[NETFILTER]: {ip,ip6}_tables: remove some inlines
This patch removes inlines except those which are used
by packet matching code and thus are performance-critical.
Before:
$ size */*/*/ip*tables*.o
text data bss dec hex filename
6402 500 16 6918 1b06 net/ipv4/netfilter/ip_tables.o
7130 500 16 7646 1dde net/ipv6/netfilter/ip6_tables.o
After:
$ size */*/*/ip*tables*.o
text data bss dec hex filename
6307 500 16 6823 1aa7 net/ipv4/netfilter/ip_tables.o
7010 500 16 7526 1d66 net/ipv6/netfilter/ip6_tables.o
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/netfilter/ip_tables.c | 47 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6_tables.c | 42 |
2 files changed, 50 insertions, 39 deletions
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index f5b66ec18b0d..982b7f986291 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c | |||
@@ -75,6 +75,7 @@ do { \ | |||
75 | Hence the start of any table is given by get_table() below. */ | 75 | Hence the start of any table is given by get_table() below. */ |
76 | 76 | ||
77 | /* Returns whether matches rule or not. */ | 77 | /* Returns whether matches rule or not. */ |
78 | /* Performance critical - called for every packet */ | ||
78 | static inline bool | 79 | static inline bool |
79 | ip_packet_match(const struct iphdr *ip, | 80 | ip_packet_match(const struct iphdr *ip, |
80 | const char *indev, | 81 | const char *indev, |
@@ -153,7 +154,7 @@ ip_packet_match(const struct iphdr *ip, | |||
153 | return true; | 154 | return true; |
154 | } | 155 | } |
155 | 156 | ||
156 | static inline bool | 157 | static bool |
157 | ip_checkentry(const struct ipt_ip *ip) | 158 | ip_checkentry(const struct ipt_ip *ip) |
158 | { | 159 | { |
159 | if (ip->flags & ~IPT_F_MASK) { | 160 | if (ip->flags & ~IPT_F_MASK) { |
@@ -183,8 +184,9 @@ ipt_error(struct sk_buff *skb, | |||
183 | return NF_DROP; | 184 | return NF_DROP; |
184 | } | 185 | } |
185 | 186 | ||
186 | static inline | 187 | /* Performance critical - called for every packet */ |
187 | bool do_match(struct ipt_entry_match *m, | 188 | static inline bool |
189 | do_match(struct ipt_entry_match *m, | ||
188 | const struct sk_buff *skb, | 190 | const struct sk_buff *skb, |
189 | const struct net_device *in, | 191 | const struct net_device *in, |
190 | const struct net_device *out, | 192 | const struct net_device *out, |
@@ -199,6 +201,7 @@ bool do_match(struct ipt_entry_match *m, | |||
199 | return false; | 201 | return false; |
200 | } | 202 | } |
201 | 203 | ||
204 | /* Performance critical */ | ||
202 | static inline struct ipt_entry * | 205 | static inline struct ipt_entry * |
203 | get_entry(void *base, unsigned int offset) | 206 | get_entry(void *base, unsigned int offset) |
204 | { | 207 | { |
@@ -206,6 +209,7 @@ get_entry(void *base, unsigned int offset) | |||
206 | } | 209 | } |
207 | 210 | ||
208 | /* All zeroes == unconditional rule. */ | 211 | /* All zeroes == unconditional rule. */ |
212 | /* Mildly perf critical (only if packet tracing is on) */ | ||
209 | static inline int | 213 | static inline int |
210 | unconditional(const struct ipt_ip *ip) | 214 | unconditional(const struct ipt_ip *ip) |
211 | { | 215 | { |
@@ -221,7 +225,7 @@ unconditional(const struct ipt_ip *ip) | |||
221 | 225 | ||
222 | #if defined(CONFIG_NETFILTER_XT_TARGET_TRACE) || \ | 226 | #if defined(CONFIG_NETFILTER_XT_TARGET_TRACE) || \ |
223 | defined(CONFIG_NETFILTER_XT_TARGET_TRACE_MODULE) | 227 | defined(CONFIG_NETFILTER_XT_TARGET_TRACE_MODULE) |
224 | static const char *hooknames[] = { | 228 | static const char *const hooknames[] = { |
225 | [NF_INET_PRE_ROUTING] = "PREROUTING", | 229 | [NF_INET_PRE_ROUTING] = "PREROUTING", |
226 | [NF_INET_LOCAL_IN] = "INPUT", | 230 | [NF_INET_LOCAL_IN] = "INPUT", |
227 | [NF_INET_FORWARD] = "FORWARD", | 231 | [NF_INET_FORWARD] = "FORWARD", |
@@ -235,7 +239,7 @@ enum nf_ip_trace_comments { | |||
235 | NF_IP_TRACE_COMMENT_POLICY, | 239 | NF_IP_TRACE_COMMENT_POLICY, |
236 | }; | 240 | }; |
237 | 241 | ||
238 | static const char *comments[] = { | 242 | static const char *const comments[] = { |
239 | [NF_IP_TRACE_COMMENT_RULE] = "rule", | 243 | [NF_IP_TRACE_COMMENT_RULE] = "rule", |
240 | [NF_IP_TRACE_COMMENT_RETURN] = "return", | 244 | [NF_IP_TRACE_COMMENT_RETURN] = "return", |
241 | [NF_IP_TRACE_COMMENT_POLICY] = "policy", | 245 | [NF_IP_TRACE_COMMENT_POLICY] = "policy", |
@@ -251,6 +255,7 @@ static struct nf_loginfo trace_loginfo = { | |||
251 | }, | 255 | }, |
252 | }; | 256 | }; |
253 | 257 | ||
258 | /* Mildly perf critical (only if packet tracing is on) */ | ||
254 | static inline int | 259 | static inline int |
255 | get_chainname_rulenum(struct ipt_entry *s, struct ipt_entry *e, | 260 | get_chainname_rulenum(struct ipt_entry *s, struct ipt_entry *e, |
256 | char *hookname, char **chainname, | 261 | char *hookname, char **chainname, |
@@ -567,7 +572,7 @@ mark_source_chains(struct xt_table_info *newinfo, | |||
567 | return 1; | 572 | return 1; |
568 | } | 573 | } |
569 | 574 | ||
570 | static inline int | 575 | static int |
571 | cleanup_match(struct ipt_entry_match *m, unsigned int *i) | 576 | cleanup_match(struct ipt_entry_match *m, unsigned int *i) |
572 | { | 577 | { |
573 | if (i && (*i)-- == 0) | 578 | if (i && (*i)-- == 0) |
@@ -579,7 +584,7 @@ cleanup_match(struct ipt_entry_match *m, unsigned int *i) | |||
579 | return 0; | 584 | return 0; |
580 | } | 585 | } |
581 | 586 | ||
582 | static inline int | 587 | static int |
583 | check_entry(struct ipt_entry *e, const char *name) | 588 | check_entry(struct ipt_entry *e, const char *name) |
584 | { | 589 | { |
585 | struct ipt_entry_target *t; | 590 | struct ipt_entry_target *t; |
@@ -600,7 +605,8 @@ check_entry(struct ipt_entry *e, const char *name) | |||
600 | return 0; | 605 | return 0; |
601 | } | 606 | } |
602 | 607 | ||
603 | static inline int check_match(struct ipt_entry_match *m, const char *name, | 608 | static int |
609 | check_match(struct ipt_entry_match *m, const char *name, | ||
604 | const struct ipt_ip *ip, | 610 | const struct ipt_ip *ip, |
605 | unsigned int hookmask, unsigned int *i) | 611 | unsigned int hookmask, unsigned int *i) |
606 | { | 612 | { |
@@ -623,7 +629,7 @@ static inline int check_match(struct ipt_entry_match *m, const char *name, | |||
623 | return ret; | 629 | return ret; |
624 | } | 630 | } |
625 | 631 | ||
626 | static inline int | 632 | static int |
627 | find_check_match(struct ipt_entry_match *m, | 633 | find_check_match(struct ipt_entry_match *m, |
628 | const char *name, | 634 | const char *name, |
629 | const struct ipt_ip *ip, | 635 | const struct ipt_ip *ip, |
@@ -652,7 +658,7 @@ err: | |||
652 | return ret; | 658 | return ret; |
653 | } | 659 | } |
654 | 660 | ||
655 | static inline int check_target(struct ipt_entry *e, const char *name) | 661 | static int check_target(struct ipt_entry *e, const char *name) |
656 | { | 662 | { |
657 | struct ipt_entry_target *t; | 663 | struct ipt_entry_target *t; |
658 | struct xt_target *target; | 664 | struct xt_target *target; |
@@ -673,7 +679,7 @@ static inline int check_target(struct ipt_entry *e, const char *name) | |||
673 | return ret; | 679 | return ret; |
674 | } | 680 | } |
675 | 681 | ||
676 | static inline int | 682 | static int |
677 | find_check_entry(struct ipt_entry *e, const char *name, unsigned int size, | 683 | find_check_entry(struct ipt_entry *e, const char *name, unsigned int size, |
678 | unsigned int *i) | 684 | unsigned int *i) |
679 | { | 685 | { |
@@ -717,7 +723,7 @@ find_check_entry(struct ipt_entry *e, const char *name, unsigned int size, | |||
717 | return ret; | 723 | return ret; |
718 | } | 724 | } |
719 | 725 | ||
720 | static inline int | 726 | static int |
721 | check_entry_size_and_hooks(struct ipt_entry *e, | 727 | check_entry_size_and_hooks(struct ipt_entry *e, |
722 | struct xt_table_info *newinfo, | 728 | struct xt_table_info *newinfo, |
723 | unsigned char *base, | 729 | unsigned char *base, |
@@ -760,7 +766,7 @@ check_entry_size_and_hooks(struct ipt_entry *e, | |||
760 | return 0; | 766 | return 0; |
761 | } | 767 | } |
762 | 768 | ||
763 | static inline int | 769 | static int |
764 | cleanup_entry(struct ipt_entry *e, unsigned int *i) | 770 | cleanup_entry(struct ipt_entry *e, unsigned int *i) |
765 | { | 771 | { |
766 | struct ipt_entry_target *t; | 772 | struct ipt_entry_target *t; |
@@ -916,7 +922,7 @@ get_counters(const struct xt_table_info *t, | |||
916 | } | 922 | } |
917 | } | 923 | } |
918 | 924 | ||
919 | static inline struct xt_counters * alloc_counters(struct xt_table *table) | 925 | static struct xt_counters * alloc_counters(struct xt_table *table) |
920 | { | 926 | { |
921 | unsigned int countersize; | 927 | unsigned int countersize; |
922 | struct xt_counters *counters; | 928 | struct xt_counters *counters; |
@@ -1304,7 +1310,7 @@ do_replace(void __user *user, unsigned int len) | |||
1304 | 1310 | ||
1305 | /* We're lazy, and add to the first CPU; overflow works its fey magic | 1311 | /* We're lazy, and add to the first CPU; overflow works its fey magic |
1306 | * and everything is OK. */ | 1312 | * and everything is OK. */ |
1307 | static inline int | 1313 | static int |
1308 | add_counter_to_entry(struct ipt_entry *e, | 1314 | add_counter_to_entry(struct ipt_entry *e, |
1309 | const struct xt_counters addme[], | 1315 | const struct xt_counters addme[], |
1310 | unsigned int *i) | 1316 | unsigned int *i) |
@@ -1465,7 +1471,7 @@ out: | |||
1465 | return ret; | 1471 | return ret; |
1466 | } | 1472 | } |
1467 | 1473 | ||
1468 | static inline int | 1474 | static int |
1469 | compat_find_calc_match(struct ipt_entry_match *m, | 1475 | compat_find_calc_match(struct ipt_entry_match *m, |
1470 | const char *name, | 1476 | const char *name, |
1471 | const struct ipt_ip *ip, | 1477 | const struct ipt_ip *ip, |
@@ -1489,7 +1495,7 @@ compat_find_calc_match(struct ipt_entry_match *m, | |||
1489 | return 0; | 1495 | return 0; |
1490 | } | 1496 | } |
1491 | 1497 | ||
1492 | static inline int | 1498 | static int |
1493 | compat_release_match(struct ipt_entry_match *m, unsigned int *i) | 1499 | compat_release_match(struct ipt_entry_match *m, unsigned int *i) |
1494 | { | 1500 | { |
1495 | if (i && (*i)-- == 0) | 1501 | if (i && (*i)-- == 0) |
@@ -1499,7 +1505,7 @@ compat_release_match(struct ipt_entry_match *m, unsigned int *i) | |||
1499 | return 0; | 1505 | return 0; |
1500 | } | 1506 | } |
1501 | 1507 | ||
1502 | static inline int | 1508 | static int |
1503 | compat_release_entry(struct compat_ipt_entry *e, unsigned int *i) | 1509 | compat_release_entry(struct compat_ipt_entry *e, unsigned int *i) |
1504 | { | 1510 | { |
1505 | struct ipt_entry_target *t; | 1511 | struct ipt_entry_target *t; |
@@ -1514,7 +1520,7 @@ compat_release_entry(struct compat_ipt_entry *e, unsigned int *i) | |||
1514 | return 0; | 1520 | return 0; |
1515 | } | 1521 | } |
1516 | 1522 | ||
1517 | static inline int | 1523 | static int |
1518 | check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, | 1524 | check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, |
1519 | struct xt_table_info *newinfo, | 1525 | struct xt_table_info *newinfo, |
1520 | unsigned int *size, | 1526 | unsigned int *size, |
@@ -1637,7 +1643,8 @@ compat_copy_entry_from_user(struct compat_ipt_entry *e, void **dstptr, | |||
1637 | return ret; | 1643 | return ret; |
1638 | } | 1644 | } |
1639 | 1645 | ||
1640 | static inline int compat_check_entry(struct ipt_entry *e, const char *name, | 1646 | static int |
1647 | compat_check_entry(struct ipt_entry *e, const char *name, | ||
1641 | unsigned int *i) | 1648 | unsigned int *i) |
1642 | { | 1649 | { |
1643 | int j, ret; | 1650 | int j, ret; |
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 4ed16d254b98..dd7860fea61f 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
@@ -90,6 +90,7 @@ ip6t_ext_hdr(u8 nexthdr) | |||
90 | } | 90 | } |
91 | 91 | ||
92 | /* Returns whether matches rule or not. */ | 92 | /* Returns whether matches rule or not. */ |
93 | /* Performance critical - called for every packet */ | ||
93 | static inline bool | 94 | static inline bool |
94 | ip6_packet_match(const struct sk_buff *skb, | 95 | ip6_packet_match(const struct sk_buff *skb, |
95 | const char *indev, | 96 | const char *indev, |
@@ -182,7 +183,7 @@ ip6_packet_match(const struct sk_buff *skb, | |||
182 | } | 183 | } |
183 | 184 | ||
184 | /* should be ip6 safe */ | 185 | /* should be ip6 safe */ |
185 | static inline bool | 186 | static bool |
186 | ip6_checkentry(const struct ip6t_ip6 *ipv6) | 187 | ip6_checkentry(const struct ip6t_ip6 *ipv6) |
187 | { | 188 | { |
188 | if (ipv6->flags & ~IP6T_F_MASK) { | 189 | if (ipv6->flags & ~IP6T_F_MASK) { |
@@ -212,8 +213,9 @@ ip6t_error(struct sk_buff *skb, | |||
212 | return NF_DROP; | 213 | return NF_DROP; |
213 | } | 214 | } |
214 | 215 | ||
215 | static inline | 216 | /* Performance critical - called for every packet */ |
216 | bool do_match(struct ip6t_entry_match *m, | 217 | static inline bool |
218 | do_match(struct ip6t_entry_match *m, | ||
217 | const struct sk_buff *skb, | 219 | const struct sk_buff *skb, |
218 | const struct net_device *in, | 220 | const struct net_device *in, |
219 | const struct net_device *out, | 221 | const struct net_device *out, |
@@ -236,6 +238,7 @@ get_entry(void *base, unsigned int offset) | |||
236 | } | 238 | } |
237 | 239 | ||
238 | /* All zeroes == unconditional rule. */ | 240 | /* All zeroes == unconditional rule. */ |
241 | /* Mildly perf critical (only if packet tracing is on) */ | ||
239 | static inline int | 242 | static inline int |
240 | unconditional(const struct ip6t_ip6 *ipv6) | 243 | unconditional(const struct ip6t_ip6 *ipv6) |
241 | { | 244 | { |
@@ -251,7 +254,7 @@ unconditional(const struct ip6t_ip6 *ipv6) | |||
251 | #if defined(CONFIG_NETFILTER_XT_TARGET_TRACE) || \ | 254 | #if defined(CONFIG_NETFILTER_XT_TARGET_TRACE) || \ |
252 | defined(CONFIG_NETFILTER_XT_TARGET_TRACE_MODULE) | 255 | defined(CONFIG_NETFILTER_XT_TARGET_TRACE_MODULE) |
253 | /* This cries for unification! */ | 256 | /* This cries for unification! */ |
254 | static const char *hooknames[] = { | 257 | static const char *const hooknames[] = { |
255 | [NF_INET_PRE_ROUTING] = "PREROUTING", | 258 | [NF_INET_PRE_ROUTING] = "PREROUTING", |
256 | [NF_INET_LOCAL_IN] = "INPUT", | 259 | [NF_INET_LOCAL_IN] = "INPUT", |
257 | [NF_INET_FORWARD] = "FORWARD", | 260 | [NF_INET_FORWARD] = "FORWARD", |
@@ -265,7 +268,7 @@ enum nf_ip_trace_comments { | |||
265 | NF_IP6_TRACE_COMMENT_POLICY, | 268 | NF_IP6_TRACE_COMMENT_POLICY, |
266 | }; | 269 | }; |
267 | 270 | ||
268 | static const char *comments[] = { | 271 | static const char *const comments[] = { |
269 | [NF_IP6_TRACE_COMMENT_RULE] = "rule", | 272 | [NF_IP6_TRACE_COMMENT_RULE] = "rule", |
270 | [NF_IP6_TRACE_COMMENT_RETURN] = "return", | 273 | [NF_IP6_TRACE_COMMENT_RETURN] = "return", |
271 | [NF_IP6_TRACE_COMMENT_POLICY] = "policy", | 274 | [NF_IP6_TRACE_COMMENT_POLICY] = "policy", |
@@ -281,6 +284,7 @@ static struct nf_loginfo trace_loginfo = { | |||
281 | }, | 284 | }, |
282 | }; | 285 | }; |
283 | 286 | ||
287 | /* Mildly perf critical (only if packet tracing is on) */ | ||
284 | static inline int | 288 | static inline int |
285 | get_chainname_rulenum(struct ip6t_entry *s, struct ip6t_entry *e, | 289 | get_chainname_rulenum(struct ip6t_entry *s, struct ip6t_entry *e, |
286 | char *hookname, char **chainname, | 290 | char *hookname, char **chainname, |
@@ -595,7 +599,7 @@ mark_source_chains(struct xt_table_info *newinfo, | |||
595 | return 1; | 599 | return 1; |
596 | } | 600 | } |
597 | 601 | ||
598 | static inline int | 602 | static int |
599 | cleanup_match(struct ip6t_entry_match *m, unsigned int *i) | 603 | cleanup_match(struct ip6t_entry_match *m, unsigned int *i) |
600 | { | 604 | { |
601 | if (i && (*i)-- == 0) | 605 | if (i && (*i)-- == 0) |
@@ -607,7 +611,7 @@ cleanup_match(struct ip6t_entry_match *m, unsigned int *i) | |||
607 | return 0; | 611 | return 0; |
608 | } | 612 | } |
609 | 613 | ||
610 | static inline int | 614 | static int |
611 | check_entry(struct ip6t_entry *e, const char *name) | 615 | check_entry(struct ip6t_entry *e, const char *name) |
612 | { | 616 | { |
613 | struct ip6t_entry_target *t; | 617 | struct ip6t_entry_target *t; |
@@ -628,7 +632,7 @@ check_entry(struct ip6t_entry *e, const char *name) | |||
628 | return 0; | 632 | return 0; |
629 | } | 633 | } |
630 | 634 | ||
631 | static inline int check_match(struct ip6t_entry_match *m, const char *name, | 635 | static int check_match(struct ip6t_entry_match *m, const char *name, |
632 | const struct ip6t_ip6 *ipv6, | 636 | const struct ip6t_ip6 *ipv6, |
633 | unsigned int hookmask, unsigned int *i) | 637 | unsigned int hookmask, unsigned int *i) |
634 | { | 638 | { |
@@ -651,7 +655,7 @@ static inline int check_match(struct ip6t_entry_match *m, const char *name, | |||
651 | return ret; | 655 | return ret; |
652 | } | 656 | } |
653 | 657 | ||
654 | static inline int | 658 | static int |
655 | find_check_match(struct ip6t_entry_match *m, | 659 | find_check_match(struct ip6t_entry_match *m, |
656 | const char *name, | 660 | const char *name, |
657 | const struct ip6t_ip6 *ipv6, | 661 | const struct ip6t_ip6 *ipv6, |
@@ -680,7 +684,7 @@ err: | |||
680 | return ret; | 684 | return ret; |
681 | } | 685 | } |
682 | 686 | ||
683 | static inline int check_target(struct ip6t_entry *e, const char *name) | 687 | static int check_target(struct ip6t_entry *e, const char *name) |
684 | { | 688 | { |
685 | struct ip6t_entry_target *t; | 689 | struct ip6t_entry_target *t; |
686 | struct xt_target *target; | 690 | struct xt_target *target; |
@@ -701,7 +705,7 @@ static inline int check_target(struct ip6t_entry *e, const char *name) | |||
701 | return ret; | 705 | return ret; |
702 | } | 706 | } |
703 | 707 | ||
704 | static inline int | 708 | static int |
705 | find_check_entry(struct ip6t_entry *e, const char *name, unsigned int size, | 709 | find_check_entry(struct ip6t_entry *e, const char *name, unsigned int size, |
706 | unsigned int *i) | 710 | unsigned int *i) |
707 | { | 711 | { |
@@ -745,7 +749,7 @@ find_check_entry(struct ip6t_entry *e, const char *name, unsigned int size, | |||
745 | return ret; | 749 | return ret; |
746 | } | 750 | } |
747 | 751 | ||
748 | static inline int | 752 | static int |
749 | check_entry_size_and_hooks(struct ip6t_entry *e, | 753 | check_entry_size_and_hooks(struct ip6t_entry *e, |
750 | struct xt_table_info *newinfo, | 754 | struct xt_table_info *newinfo, |
751 | unsigned char *base, | 755 | unsigned char *base, |
@@ -788,7 +792,7 @@ check_entry_size_and_hooks(struct ip6t_entry *e, | |||
788 | return 0; | 792 | return 0; |
789 | } | 793 | } |
790 | 794 | ||
791 | static inline int | 795 | static int |
792 | cleanup_entry(struct ip6t_entry *e, unsigned int *i) | 796 | cleanup_entry(struct ip6t_entry *e, unsigned int *i) |
793 | { | 797 | { |
794 | struct ip6t_entry_target *t; | 798 | struct ip6t_entry_target *t; |
@@ -944,7 +948,7 @@ get_counters(const struct xt_table_info *t, | |||
944 | } | 948 | } |
945 | } | 949 | } |
946 | 950 | ||
947 | static inline struct xt_counters *alloc_counters(struct xt_table *table) | 951 | static struct xt_counters *alloc_counters(struct xt_table *table) |
948 | { | 952 | { |
949 | unsigned int countersize; | 953 | unsigned int countersize; |
950 | struct xt_counters *counters; | 954 | struct xt_counters *counters; |
@@ -1494,7 +1498,7 @@ out: | |||
1494 | return ret; | 1498 | return ret; |
1495 | } | 1499 | } |
1496 | 1500 | ||
1497 | static inline int | 1501 | static int |
1498 | compat_find_calc_match(struct ip6t_entry_match *m, | 1502 | compat_find_calc_match(struct ip6t_entry_match *m, |
1499 | const char *name, | 1503 | const char *name, |
1500 | const struct ip6t_ip6 *ipv6, | 1504 | const struct ip6t_ip6 *ipv6, |
@@ -1518,7 +1522,7 @@ compat_find_calc_match(struct ip6t_entry_match *m, | |||
1518 | return 0; | 1522 | return 0; |
1519 | } | 1523 | } |
1520 | 1524 | ||
1521 | static inline int | 1525 | static int |
1522 | compat_release_match(struct ip6t_entry_match *m, unsigned int *i) | 1526 | compat_release_match(struct ip6t_entry_match *m, unsigned int *i) |
1523 | { | 1527 | { |
1524 | if (i && (*i)-- == 0) | 1528 | if (i && (*i)-- == 0) |
@@ -1528,7 +1532,7 @@ compat_release_match(struct ip6t_entry_match *m, unsigned int *i) | |||
1528 | return 0; | 1532 | return 0; |
1529 | } | 1533 | } |
1530 | 1534 | ||
1531 | static inline int | 1535 | static int |
1532 | compat_release_entry(struct compat_ip6t_entry *e, unsigned int *i) | 1536 | compat_release_entry(struct compat_ip6t_entry *e, unsigned int *i) |
1533 | { | 1537 | { |
1534 | struct ip6t_entry_target *t; | 1538 | struct ip6t_entry_target *t; |
@@ -1543,7 +1547,7 @@ compat_release_entry(struct compat_ip6t_entry *e, unsigned int *i) | |||
1543 | return 0; | 1547 | return 0; |
1544 | } | 1548 | } |
1545 | 1549 | ||
1546 | static inline int | 1550 | static int |
1547 | check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, | 1551 | check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, |
1548 | struct xt_table_info *newinfo, | 1552 | struct xt_table_info *newinfo, |
1549 | unsigned int *size, | 1553 | unsigned int *size, |
@@ -1666,7 +1670,7 @@ compat_copy_entry_from_user(struct compat_ip6t_entry *e, void **dstptr, | |||
1666 | return ret; | 1670 | return ret; |
1667 | } | 1671 | } |
1668 | 1672 | ||
1669 | static inline int compat_check_entry(struct ip6t_entry *e, const char *name, | 1673 | static int compat_check_entry(struct ip6t_entry *e, const char *name, |
1670 | unsigned int *i) | 1674 | unsigned int *i) |
1671 | { | 1675 | { |
1672 | int j, ret; | 1676 | int j, ret; |