* [PATCH net-2.6.25 0/8] [NET]: More uninlining & related
@ 2008-01-12 9:34 Ilpo Järvinen
2008-01-12 11:16 ` David Miller
[not found] ` <12001304691978-git-send-email-ilpo.jarvinen@helsinki.fi>
0 siblings, 2 replies; 13+ messages in thread
From: Ilpo Järvinen @ 2008-01-12 9:34 UTC (permalink / raw)
To: David Miller; +Cc: netdev
Hi Dave,
First of all, I changed output encoding of git to utf-8, so I
guess the encoding should not cause the same trouble for you.
Here are couple of more to uninline things. Pretty
straightforward except the EXPORT_SYMBOLs, I've no idea which
is the right variant (feel free to fix them while applying :-)).
Also pktgen uninlining is somewhat questionable because it's
just a testing tool so feel free to drop it if it feels
unnecessary (I could have asked first but it's just as easy to
do it this way if not easier)...
There were more dead static inlines found after inlines removed
(gcc didn't report them otherwise) than in pktgen now included,
but I'm not sure if I should send "by default" patches removing
or #if 0'ing them?
--
i.
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH net-2.6.25 0/8] [NET]: More uninlining & related 2008-01-12 9:34 [PATCH net-2.6.25 0/8] [NET]: More uninlining & related Ilpo Järvinen @ 2008-01-12 11:16 ` David Miller [not found] ` <12001304691978-git-send-email-ilpo.jarvinen@helsinki.fi> 1 sibling, 0 replies; 13+ messages in thread From: David Miller @ 2008-01-12 11:16 UTC (permalink / raw) To: ilpo.jarvinen; +Cc: netdev From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi> Date: Sat, 12 Jan 2008 11:34:21 +0200 > First of all, I changed output encoding of git to utf-8, so I > guess the encoding should not cause the same trouble for you. I worked on a rebase of net-2.6.25 today and was able to use emacs to fixup the encoding for all existing net-2.6.25 commits. I've also put some things in place to avoid this problem in the future. Thanks. > Here are couple of more to uninline things. Pretty > straightforward except the EXPORT_SYMBOLs, I've no idea which > is the right variant (feel free to fix them while applying :-)). > Also pktgen uninlining is somewhat questionable because it's > just a testing tool so feel free to drop it if it feels > unnecessary (I could have asked first but it's just as easy to > do it this way if not easier)... > > There were more dead static inlines found after inlines removed > (gcc didn't report them otherwise) than in pktgen now included, > but I'm not sure if I should send "by default" patches removing > or #if 0'ing them? Unless there is some pressing reason to keep the code around it should be removed. Anyways, I'll take a look. ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <12001304691978-git-send-email-ilpo.jarvinen@helsinki.fi>]
* Re: [PATCH 1/8] [TCP]: Uninline tcp_set_state [not found] ` <12001304691978-git-send-email-ilpo.jarvinen@helsinki.fi> @ 2008-01-12 11:18 ` David Miller [not found] ` <1200130469783-git-send-email-ilpo.jarvinen@helsinki.fi> 1 sibling, 0 replies; 13+ messages in thread From: David Miller @ 2008-01-12 11:18 UTC (permalink / raw) To: ilpo.jarvinen; +Cc: netdev From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi> Date: Sat, 12 Jan 2008 11:34:22 +0200 > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Applied, thanks. > +#endif > +} > +EXPORT_SYMBOL_GPL(tcp_set_state); I fixed up the trailing whitespace on the "#endif" line. ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <1200130469783-git-send-email-ilpo.jarvinen@helsinki.fi>]
* Re: [PATCH 2/8] [TCP]: Uninline tcp_is_cwnd_limited [not found] ` <1200130469783-git-send-email-ilpo.jarvinen@helsinki.fi> @ 2008-01-12 11:19 ` David Miller [not found] ` <12001304693917-git-send-email-ilpo.jarvinen@helsinki.fi> 1 sibling, 0 replies; 13+ messages in thread From: David Miller @ 2008-01-12 11:19 UTC (permalink / raw) To: ilpo.jarvinen; +Cc: netdev From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi> Date: Sat, 12 Jan 2008 11:34:23 +0200 > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Applied. ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <12001304693917-git-send-email-ilpo.jarvinen@helsinki.fi>]
* Re: [PATCH 3/8] [XFRM] xfrm_policy: kill some bloat [not found] ` <12001304693917-git-send-email-ilpo.jarvinen@helsinki.fi> @ 2008-01-12 11:20 ` David Miller [not found] ` <12001304703362-git-send-email-ilpo.jarvinen@helsinki.fi> 1 sibling, 0 replies; 13+ messages in thread From: David Miller @ 2008-01-12 11:20 UTC (permalink / raw) To: ilpo.jarvinen; +Cc: netdev From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi> Date: Sat, 12 Jan 2008 11:34:24 +0200 > net/xfrm/xfrm_policy.c: > xfrm_audit_policy_delete | -692 > xfrm_audit_policy_add | -692 > 2 functions changed, 1384 bytes removed, diff: -1384 > > net/xfrm/xfrm_policy.c: > xfrm_audit_common_policyinfo | +704 > 1 function changed, 704 bytes added, diff: +704 > > net/xfrm/xfrm_policy.o: > 3 functions changed, 704 bytes added, 1384 bytes removed, diff: -680 > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Applied. ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <12001304703362-git-send-email-ilpo.jarvinen@helsinki.fi>]
* Re: [PATCH 4/8] [IPV6] route: kill some bloat [not found] ` <12001304703362-git-send-email-ilpo.jarvinen@helsinki.fi> @ 2008-01-12 11:21 ` David Miller [not found] ` <12001304703302-git-send-email-ilpo.jarvinen@helsinki.fi> 1 sibling, 0 replies; 13+ messages in thread From: David Miller @ 2008-01-12 11:21 UTC (permalink / raw) To: ilpo.jarvinen; +Cc: netdev From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi> Date: Sat, 12 Jan 2008 11:34:25 +0200 > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Applied. ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <12001304703302-git-send-email-ilpo.jarvinen@helsinki.fi>]
* Re: [PATCH 5/8] [NETLINK] af_netlink: kill some bloat [not found] ` <12001304703302-git-send-email-ilpo.jarvinen@helsinki.fi> @ 2008-01-12 11:22 ` David Miller [not found] ` <12001304703789-git-send-email-ilpo.jarvinen@helsinki.fi> 1 sibling, 0 replies; 13+ messages in thread From: David Miller @ 2008-01-12 11:22 UTC (permalink / raw) To: ilpo.jarvinen; +Cc: netdev From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi> Date: Sat, 12 Jan 2008 11:34:26 +0200 > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Applied. ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <12001304703789-git-send-email-ilpo.jarvinen@helsinki.fi>]
* Re: [PATCH 6/8] [NETFILTER] xt_policy.c: kill some bloat [not found] ` <12001304703789-git-send-email-ilpo.jarvinen@helsinki.fi> @ 2008-01-12 11:23 ` David Miller 2008-01-12 19:03 ` Patrick McHardy [not found] ` <12001304701053-git-send-email-ilpo.jarvinen@helsinki.fi> 1 sibling, 1 reply; 13+ messages in thread From: David Miller @ 2008-01-12 11:23 UTC (permalink / raw) To: ilpo.jarvinen; +Cc: netdev, kaber, netfilter-devel From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi> Date: Sat, 12 Jan 2008 11:34:27 +0200 Ilpo, please post netfilter patches to netfilter-devel, CC:'ing Patrick McHardy. Patrick, please review, thanks. > net/netfilter/xt_policy.c: > policy_mt | -906 > 1 function changed, 906 bytes removed, diff: -906 > > net/netfilter/xt_policy.c: > match_xfrm_state | +427 > 1 function changed, 427 bytes added, diff: +427 > > net/netfilter/xt_policy.o: > 2 functions changed, 427 bytes added, 906 bytes removed, diff: -479 > > Alternatively, this could be done by combining identical > parts of the match_policy_in/out() > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> > --- > net/netfilter/xt_policy.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/net/netfilter/xt_policy.c b/net/netfilter/xt_policy.c > index 46ee7e8..45731ca 100644 > --- a/net/netfilter/xt_policy.c > +++ b/net/netfilter/xt_policy.c > @@ -33,7 +33,7 @@ xt_addr_cmp(const union xt_policy_addr *a1, const union xt_policy_addr *m, > return false; > } > > -static inline bool > +static bool > match_xfrm_state(const struct xfrm_state *x, const struct xt_policy_elem *e, > unsigned short family) > { > -- > 1.5.0.6 > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 6/8] [NETFILTER] xt_policy.c: kill some bloat 2008-01-12 11:23 ` [PATCH 6/8] [NETFILTER] xt_policy.c: " David Miller @ 2008-01-12 19:03 ` Patrick McHardy 2008-01-13 5:26 ` David Miller 0 siblings, 1 reply; 13+ messages in thread From: Patrick McHardy @ 2008-01-12 19:03 UTC (permalink / raw) To: David Miller; +Cc: ilpo.jarvinen, netdev, netfilter-devel David Miller wrote: > From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi> > Date: Sat, 12 Jan 2008 11:34:27 +0200 > > Ilpo, please post netfilter patches to netfilter-devel, > CC:'ing Patrick McHardy. > > Patrick, please review, thanks. This looks fine to me, thanks Ilpo. >> net/netfilter/xt_policy.c: >> policy_mt | -906 >> 1 function changed, 906 bytes removed, diff: -906 >> >> net/netfilter/xt_policy.c: >> match_xfrm_state | +427 >> 1 function changed, 427 bytes added, diff: +427 >> >> net/netfilter/xt_policy.o: >> 2 functions changed, 427 bytes added, 906 bytes removed, diff: -479 >> >> Alternatively, this could be done by combining identical >> parts of the match_policy_in/out() That would probably end up rather ugly because they walk over different structures and have some minor differences. - To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 6/8] [NETFILTER] xt_policy.c: kill some bloat 2008-01-12 19:03 ` Patrick McHardy @ 2008-01-13 5:26 ` David Miller 0 siblings, 0 replies; 13+ messages in thread From: David Miller @ 2008-01-13 5:26 UTC (permalink / raw) To: kaber; +Cc: ilpo.jarvinen, netdev, netfilter-devel From: Patrick McHardy <kaber@trash.net> Date: Sat, 12 Jan 2008 20:03:31 +0100 > David Miller wrote: > > From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi> > > Date: Sat, 12 Jan 2008 11:34:27 +0200 > > > > Ilpo, please post netfilter patches to netfilter-devel, > > CC:'ing Patrick McHardy. > > > > Patrick, please review, thanks. > > This looks fine to me, thanks Ilpo. Applied, thanks. ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <12001304701053-git-send-email-ilpo.jarvinen@helsinki.fi>]
* Re: [PATCH 7/8] [PKTGEN]: Kill dead static inlines [not found] ` <12001304701053-git-send-email-ilpo.jarvinen@helsinki.fi> @ 2008-01-12 11:24 ` David Miller [not found] ` <12001304701901-git-send-email-ilpo.jarvinen@helsinki.fi> 1 sibling, 0 replies; 13+ messages in thread From: David Miller @ 2008-01-12 11:24 UTC (permalink / raw) To: ilpo.jarvinen; +Cc: netdev From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi> Date: Sat, 12 Jan 2008 11:34:28 +0200 > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> These were leftovers from the ktime_t conversion of pktgen. Applied, th anks! ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <12001304701901-git-send-email-ilpo.jarvinen@helsinki.fi>]
* Re: [RFC PATCH 8/8] [PKTGEN]: uninline getCurUs [not found] ` <12001304701901-git-send-email-ilpo.jarvinen@helsinki.fi> @ 2008-01-12 11:25 ` David Miller 0 siblings, 0 replies; 13+ messages in thread From: David Miller @ 2008-01-12 11:25 UTC (permalink / raw) To: ilpo.jarvinen; +Cc: netdev From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi> Date: Sat, 12 Jan 2008 11:34:29 +0200 > net/core/pktgen.c: > pktgen_stop_device | -50 > pktgen_run | -105 > pktgen_if_show | -37 > pktgen_thread_worker | -702 > 4 functions changed, 894 bytes removed, diff: -894 > > net/core/pktgen.c: > getCurUs | +36 > 1 function changed, 36 bytes added, diff: +36 > > net/core/pktgen.o: > 5 functions changed, 36 bytes added, 894 bytes removed, diff: -858 > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> I think this is the right thing to do, applied. ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH net-2.6.25 0/8] [NET]: More uninlining & related @ 2008-01-12 9:40 Ilpo Järvinen 2008-01-12 9:40 ` [PATCH 1/8] [TCP]: Uninline tcp_set_state Ilpo Järvinen 0 siblings, 1 reply; 13+ messages in thread From: Ilpo Järvinen @ 2008-01-12 9:40 UTC (permalink / raw) To: David Miller; +Cc: netdev Hi Dave, First of all, I changed output encoding to utf-8, so I guess the encoding should not cause trouble for you. Here are couple of more to uninline things. Pretty straightforward except the EXPORT_SYMBOLs, I've no idea which is the right variant (feel free to fix them while applying :-)). Also pktgen uninlining is somewhat questionable because it's just a testing tool so feel free to drop it if it feels unnecessary (I could have asked first but it's just as easy to do it this way if not easier)... There were more dead static inlines found after inlines removed (gcc didn't report them otherwise) than in pktgen now included, but I'm not sure if I should send "by default" patches removing or #if 0'ing them? -- i. ps. I apologize that I must resend to get them to netdev as well because git-send-email of this system (not sure if later could) still seems to be lacking proper encoding of my name when it decides to add it to Cc list all by itself and those 8-bit chars in address got rejected. ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/8] [TCP]: Uninline tcp_set_state 2008-01-12 9:40 [PATCH net-2.6.25 0/8] [NET]: More uninlining & related Ilpo Järvinen @ 2008-01-12 9:40 ` Ilpo Järvinen 2008-01-12 9:40 ` [PATCH 2/8] [TCP]: Uninline tcp_is_cwnd_limited Ilpo Järvinen 0 siblings, 1 reply; 13+ messages in thread From: Ilpo Järvinen @ 2008-01-12 9:40 UTC (permalink / raw) To: David Miller; +Cc: netdev net/ipv4/tcp.c: tcp_close_state | -226 tcp_done | -145 tcp_close | -564 tcp_disconnect | -141 4 functions changed, 1076 bytes removed, diff: -1076 net/ipv4/tcp_input.c: tcp_fin | -86 tcp_rcv_state_process | -164 2 functions changed, 250 bytes removed, diff: -250 net/ipv4/tcp_ipv4.c: tcp_v4_connect | -209 1 function changed, 209 bytes removed, diff: -209 net/ipv4/arp.c: arp_ignore | +5 1 function changed, 5 bytes added, diff: +5 net/ipv6/tcp_ipv6.c: tcp_v6_connect | -158 1 function changed, 158 bytes removed, diff: -158 net/sunrpc/xprtsock.c: xs_sendpages | -2 1 function changed, 2 bytes removed, diff: -2 net/dccp/ccids/ccid3.c: ccid3_update_send_interval | +7 1 function changed, 7 bytes added, diff: +7 net/ipv4/tcp.c: tcp_set_state | +238 1 function changed, 238 bytes added, diff: +238 built-in.o: 12 functions changed, 250 bytes added, 1695 bytes removed, diff: -1445 I've no explanation why some unrelated changes seem to occur consistently as well (arp_ignore, ccid3_update_send_interval; I checked the arp_ignore asm and it seems to be due to some reordered of operation order causing some extra opcodes to be generated). Still, the benefits are pretty obvious from the codiff's results. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Cc: Andi Kleen <andi@firstfloor.org> --- include/net/tcp.h | 35 +---------------------------------- net/ipv4/tcp.c | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 34 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index 48081ad..306580c 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -926,40 +926,7 @@ static const char *statename[]={ "Close Wait","Last ACK","Listen","Closing" }; #endif - -static inline void tcp_set_state(struct sock *sk, int state) -{ - int oldstate = sk->sk_state; - - switch (state) { - case TCP_ESTABLISHED: - if (oldstate != TCP_ESTABLISHED) - TCP_INC_STATS(TCP_MIB_CURRESTAB); - break; - - case TCP_CLOSE: - if (oldstate == TCP_CLOSE_WAIT || oldstate == TCP_ESTABLISHED) - TCP_INC_STATS(TCP_MIB_ESTABRESETS); - - sk->sk_prot->unhash(sk); - if (inet_csk(sk)->icsk_bind_hash && - !(sk->sk_userlocks & SOCK_BINDPORT_LOCK)) - inet_put_port(&tcp_hashinfo, sk); - /* fall through */ - default: - if (oldstate==TCP_ESTABLISHED) - TCP_DEC_STATS(TCP_MIB_CURRESTAB); - } - - /* Change state AFTER socket is unhashed to avoid closed - * socket sitting in hash tables. - */ - sk->sk_state = state; - -#ifdef STATE_TRACE - SOCK_DEBUG(sk, "TCP sk=%p, State %s -> %s\n",sk, statename[oldstate],statename[state]); -#endif -} +extern void tcp_set_state(struct sock *sk, int state); extern void tcp_done(struct sock *sk); diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 34085e3..7d7b958 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1652,6 +1652,41 @@ recv_urg: goto out; } +void tcp_set_state(struct sock *sk, int state) +{ + int oldstate = sk->sk_state; + + switch (state) { + case TCP_ESTABLISHED: + if (oldstate != TCP_ESTABLISHED) + TCP_INC_STATS(TCP_MIB_CURRESTAB); + break; + + case TCP_CLOSE: + if (oldstate == TCP_CLOSE_WAIT || oldstate == TCP_ESTABLISHED) + TCP_INC_STATS(TCP_MIB_ESTABRESETS); + + sk->sk_prot->unhash(sk); + if (inet_csk(sk)->icsk_bind_hash && + !(sk->sk_userlocks & SOCK_BINDPORT_LOCK)) + inet_put_port(&tcp_hashinfo, sk); + /* fall through */ + default: + if (oldstate==TCP_ESTABLISHED) + TCP_DEC_STATS(TCP_MIB_CURRESTAB); + } + + /* Change state AFTER socket is unhashed to avoid closed + * socket sitting in hash tables. + */ + sk->sk_state = state; + +#ifdef STATE_TRACE + SOCK_DEBUG(sk, "TCP sk=%p, State %s -> %s\n",sk, statename[oldstate],statename[state]); +#endif +} +EXPORT_SYMBOL_GPL(tcp_set_state); + /* * State processing on a close. This implements the state shift for * sending our FIN frame. Note that we only send a FIN for some -- 1.5.0.6 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/8] [TCP]: Uninline tcp_is_cwnd_limited 2008-01-12 9:40 ` [PATCH 1/8] [TCP]: Uninline tcp_set_state Ilpo Järvinen @ 2008-01-12 9:40 ` Ilpo Järvinen 2008-01-12 9:40 ` [PATCH 3/8] [XFRM] xfrm_policy: kill some bloat Ilpo Järvinen 0 siblings, 1 reply; 13+ messages in thread From: Ilpo Järvinen @ 2008-01-12 9:40 UTC (permalink / raw) To: David Miller; +Cc: netdev net/ipv4/tcp_cong.c: tcp_reno_cong_avoid | -65 1 function changed, 65 bytes removed, diff: -65 net/ipv4/arp.c: arp_ignore | -5 1 function changed, 5 bytes removed, diff: -5 net/ipv4/tcp_bic.c: bictcp_cong_avoid | -57 1 function changed, 57 bytes removed, diff: -57 net/ipv4/tcp_cubic.c: bictcp_cong_avoid | -61 1 function changed, 61 bytes removed, diff: -61 net/ipv4/tcp_highspeed.c: hstcp_cong_avoid | -63 1 function changed, 63 bytes removed, diff: -63 net/ipv4/tcp_hybla.c: hybla_cong_avoid | -85 1 function changed, 85 bytes removed, diff: -85 net/ipv4/tcp_htcp.c: htcp_cong_avoid | -57 1 function changed, 57 bytes removed, diff: -57 net/ipv4/tcp_veno.c: tcp_veno_cong_avoid | -52 1 function changed, 52 bytes removed, diff: -52 net/ipv4/tcp_scalable.c: tcp_scalable_cong_avoid | -61 1 function changed, 61 bytes removed, diff: -61 net/ipv4/tcp_yeah.c: tcp_yeah_cong_avoid | -75 1 function changed, 75 bytes removed, diff: -75 net/ipv4/tcp_illinois.c: tcp_illinois_cong_avoid | -54 1 function changed, 54 bytes removed, diff: -54 net/dccp/ccids/ccid3.c: ccid3_update_send_interval | -7 ccid3_hc_tx_packet_recv | +7 2 functions changed, 7 bytes added, 7 bytes removed, diff: +0 net/ipv4/tcp_cong.c: tcp_is_cwnd_limited | +88 1 function changed, 88 bytes added, diff: +88 built-in.o: 14 functions changed, 95 bytes added, 642 bytes removed, diff: -547 ...Again some gcc artifacts visible as well. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> --- include/net/tcp.h | 22 +--------------------- net/ipv4/tcp_cong.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index 306580c..7de4ea3 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -786,27 +786,7 @@ static inline u32 tcp_wnd_end(const struct tcp_sock *tp) { return tp->snd_una + tp->snd_wnd; } - -/* RFC2861 Check whether we are limited by application or congestion window - * This is the inverse of cwnd check in tcp_tso_should_defer - */ -static inline int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight) -{ - const struct tcp_sock *tp = tcp_sk(sk); - u32 left; - - if (in_flight >= tp->snd_cwnd) - return 1; - - if (!sk_can_gso(sk)) - return 0; - - left = tp->snd_cwnd - in_flight; - if (sysctl_tcp_tso_win_divisor) - return left * sysctl_tcp_tso_win_divisor < tp->snd_cwnd; - else - return left <= tcp_max_burst(tp); -} +extern int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight); static inline void tcp_minshall_update(struct tcp_sock *tp, unsigned int mss, const struct sk_buff *skb) diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index 4451750..3a6be23 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c @@ -274,6 +274,27 @@ int tcp_set_congestion_control(struct sock *sk, const char *name) return err; } +/* RFC2861 Check whether we are limited by application or congestion window + * This is the inverse of cwnd check in tcp_tso_should_defer + */ +int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight) +{ + const struct tcp_sock *tp = tcp_sk(sk); + u32 left; + + if (in_flight >= tp->snd_cwnd) + return 1; + + if (!sk_can_gso(sk)) + return 0; + + left = tp->snd_cwnd - in_flight; + if (sysctl_tcp_tso_win_divisor) + return left * sysctl_tcp_tso_win_divisor < tp->snd_cwnd; + else + return left <= tcp_max_burst(tp); +} +EXPORT_SYMBOL_GPL(tcp_is_cwnd_limited); /* * Slow start is used when congestion window is less than slow start -- 1.5.0.6 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/8] [XFRM] xfrm_policy: kill some bloat 2008-01-12 9:40 ` [PATCH 2/8] [TCP]: Uninline tcp_is_cwnd_limited Ilpo Järvinen @ 2008-01-12 9:40 ` Ilpo Järvinen 2008-01-12 9:40 ` [PATCH 4/8] [IPV6] route: " Ilpo Järvinen 0 siblings, 1 reply; 13+ messages in thread From: Ilpo Järvinen @ 2008-01-12 9:40 UTC (permalink / raw) To: David Miller; +Cc: netdev net/xfrm/xfrm_policy.c: xfrm_audit_policy_delete | -692 xfrm_audit_policy_add | -692 2 functions changed, 1384 bytes removed, diff: -1384 net/xfrm/xfrm_policy.c: xfrm_audit_common_policyinfo | +704 1 function changed, 704 bytes added, diff: +704 net/xfrm/xfrm_policy.o: 3 functions changed, 704 bytes added, 1384 bytes removed, diff: -680 Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> --- net/xfrm/xfrm_policy.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 534b29e..47219f9 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -2367,8 +2367,8 @@ void __init xfrm_init(void) } #ifdef CONFIG_AUDITSYSCALL -static inline void xfrm_audit_common_policyinfo(struct xfrm_policy *xp, - struct audit_buffer *audit_buf) +static void xfrm_audit_common_policyinfo(struct xfrm_policy *xp, + struct audit_buffer *audit_buf) { struct xfrm_sec_ctx *ctx = xp->security; struct xfrm_selector *sel = &xp->selector; -- 1.5.0.6 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/8] [IPV6] route: kill some bloat 2008-01-12 9:40 ` [PATCH 3/8] [XFRM] xfrm_policy: kill some bloat Ilpo Järvinen @ 2008-01-12 9:40 ` Ilpo Järvinen 2008-01-12 9:40 ` [PATCH 5/8] [NETLINK] af_netlink: " Ilpo Järvinen 0 siblings, 1 reply; 13+ messages in thread From: Ilpo Järvinen @ 2008-01-12 9:40 UTC (permalink / raw) To: David Miller; +Cc: netdev net/ipv6/route.c: ip6_pkt_prohibit_out | -130 ip6_pkt_discard | -261 ip6_pkt_discard_out | -130 ip6_pkt_prohibit | -261 4 functions changed, 782 bytes removed, diff: -782 net/ipv6/route.c: ip6_pkt_drop | +300 1 function changed, 300 bytes added, diff: +300 net/ipv6/route.o: 5 functions changed, 300 bytes added, 782 bytes removed, diff: -482 Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> --- net/ipv6/route.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 02354a7..d3b5811 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1762,8 +1762,7 @@ int ipv6_route_ioctl(unsigned int cmd, void __user *arg) * Drop the packet on the floor */ -static inline int ip6_pkt_drop(struct sk_buff *skb, int code, - int ipstats_mib_noroutes) +static int ip6_pkt_drop(struct sk_buff *skb, int code, int ipstats_mib_noroutes) { int type; switch (ipstats_mib_noroutes) { -- 1.5.0.6 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 5/8] [NETLINK] af_netlink: kill some bloat 2008-01-12 9:40 ` [PATCH 4/8] [IPV6] route: " Ilpo Järvinen @ 2008-01-12 9:40 ` Ilpo Järvinen 2008-01-12 9:40 ` [PATCH 6/8] [NETFILTER] xt_policy.c: " Ilpo Järvinen 0 siblings, 1 reply; 13+ messages in thread From: Ilpo Järvinen @ 2008-01-12 9:40 UTC (permalink / raw) To: David Miller; +Cc: netdev net/netlink/af_netlink.c: netlink_realloc_groups | -46 netlink_insert | -49 netlink_autobind | -94 netlink_clear_multicast_users | -48 netlink_bind | -55 netlink_setsockopt | -54 netlink_release | -86 netlink_kernel_create | -47 netlink_change_ngroups | -56 9 functions changed, 535 bytes removed, diff: -535 net/netlink/af_netlink.c: netlink_table_ungrab | +53 1 function changed, 53 bytes added, diff: +53 net/netlink/af_netlink.o: 10 functions changed, 53 bytes added, 535 bytes removed, diff: -482 Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> --- net/netlink/af_netlink.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index be07f1b..21f9e30 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -193,7 +193,7 @@ static void netlink_table_grab(void) } } -static inline void netlink_table_ungrab(void) +static void netlink_table_ungrab(void) __releases(nl_table_lock) { write_unlock_irq(&nl_table_lock); -- 1.5.0.6 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 6/8] [NETFILTER] xt_policy.c: kill some bloat 2008-01-12 9:40 ` [PATCH 5/8] [NETLINK] af_netlink: " Ilpo Järvinen @ 2008-01-12 9:40 ` Ilpo Järvinen 0 siblings, 0 replies; 13+ messages in thread From: Ilpo Järvinen @ 2008-01-12 9:40 UTC (permalink / raw) To: David Miller; +Cc: netdev net/netfilter/xt_policy.c: policy_mt | -906 1 function changed, 906 bytes removed, diff: -906 net/netfilter/xt_policy.c: match_xfrm_state | +427 1 function changed, 427 bytes added, diff: +427 net/netfilter/xt_policy.o: 2 functions changed, 427 bytes added, 906 bytes removed, diff: -479 Alternatively, this could be done by combining identical parts of the match_policy_in/out() Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> --- net/netfilter/xt_policy.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/netfilter/xt_policy.c b/net/netfilter/xt_policy.c index 46ee7e8..45731ca 100644 --- a/net/netfilter/xt_policy.c +++ b/net/netfilter/xt_policy.c @@ -33,7 +33,7 @@ xt_addr_cmp(const union xt_policy_addr *a1, const union xt_policy_addr *m, return false; } -static inline bool +static bool match_xfrm_state(const struct xfrm_state *x, const struct xt_policy_elem *e, unsigned short family) { -- 1.5.0.6 ^ permalink raw reply related [flat|nested] 13+ messages in thread
end of thread, other threads:[~2008-01-13 5:26 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-12 9:34 [PATCH net-2.6.25 0/8] [NET]: More uninlining & related Ilpo Järvinen
2008-01-12 11:16 ` David Miller
[not found] ` <12001304691978-git-send-email-ilpo.jarvinen@helsinki.fi>
2008-01-12 11:18 ` [PATCH 1/8] [TCP]: Uninline tcp_set_state David Miller
[not found] ` <1200130469783-git-send-email-ilpo.jarvinen@helsinki.fi>
2008-01-12 11:19 ` [PATCH 2/8] [TCP]: Uninline tcp_is_cwnd_limited David Miller
[not found] ` <12001304693917-git-send-email-ilpo.jarvinen@helsinki.fi>
2008-01-12 11:20 ` [PATCH 3/8] [XFRM] xfrm_policy: kill some bloat David Miller
[not found] ` <12001304703362-git-send-email-ilpo.jarvinen@helsinki.fi>
2008-01-12 11:21 ` [PATCH 4/8] [IPV6] route: " David Miller
[not found] ` <12001304703302-git-send-email-ilpo.jarvinen@helsinki.fi>
2008-01-12 11:22 ` [PATCH 5/8] [NETLINK] af_netlink: " David Miller
[not found] ` <12001304703789-git-send-email-ilpo.jarvinen@helsinki.fi>
2008-01-12 11:23 ` [PATCH 6/8] [NETFILTER] xt_policy.c: " David Miller
2008-01-12 19:03 ` Patrick McHardy
2008-01-13 5:26 ` David Miller
[not found] ` <12001304701053-git-send-email-ilpo.jarvinen@helsinki.fi>
2008-01-12 11:24 ` [PATCH 7/8] [PKTGEN]: Kill dead static inlines David Miller
[not found] ` <12001304701901-git-send-email-ilpo.jarvinen@helsinki.fi>
2008-01-12 11:25 ` [RFC PATCH 8/8] [PKTGEN]: uninline getCurUs David Miller
-- strict thread matches above, loose matches on Subject: below --
2008-01-12 9:40 [PATCH net-2.6.25 0/8] [NET]: More uninlining & related Ilpo Järvinen
2008-01-12 9:40 ` [PATCH 1/8] [TCP]: Uninline tcp_set_state Ilpo Järvinen
2008-01-12 9:40 ` [PATCH 2/8] [TCP]: Uninline tcp_is_cwnd_limited Ilpo Järvinen
2008-01-12 9:40 ` [PATCH 3/8] [XFRM] xfrm_policy: kill some bloat Ilpo Järvinen
2008-01-12 9:40 ` [PATCH 4/8] [IPV6] route: " Ilpo Järvinen
2008-01-12 9:40 ` [PATCH 5/8] [NETLINK] af_netlink: " Ilpo Järvinen
2008-01-12 9:40 ` [PATCH 6/8] [NETFILTER] xt_policy.c: " Ilpo Järvinen
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).