* PATCH tcp_init_wl / tcp_update_wl argument cleanup
@ 2009-03-01 10:37 ithilgore.ryu.L@gmail.com
2009-03-02 11:14 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: ithilgore.ryu.L@gmail.com @ 2009-03-01 10:37 UTC (permalink / raw)
To: netdev
The above functions from include/net/tcp.h have been defined with an
argument that they never use. The argument is 'u32 ack' which is never
used inside the function body, and thus it can be removed. The rest of
the patch involves the necessary changes to the function callers of the
above two functions.
--- /net/ipv4/orig.tcp_minisocks.c 2009-02-21 21:26:07.000000000 +0200
+++ /net/ipv4/tcp_minisocks.c 2009-02-21 21:26:22.000000000 +0200
@@ -399,7 +399,7 @@
tcp_prequeue_init(newtp);
- tcp_init_wl(newtp, treq->snt_isn, treq->rcv_isn);
+ tcp_init_wl(newtp, treq->rcv_isn);
newtp->srtt = 0;
newtp->mdev = TCP_TIMEOUT_INIT;
--- /net/ipv4/orig.tcp_input.c 2009-02-21 21:26:36.000000000 +0200
+++ /net/ipv4/tcp_input.c 2009-02-21 21:27:41.000000000 +0200
@@ -3072,7 +3072,7 @@
if (tcp_may_update_window(tp, ack, ack_seq, nwin)) {
flag |= FLAG_WIN_UPDATE;
- tcp_update_wl(tp, ack, ack_seq);
+ tcp_update_wl(tp, ack_seq);
if (tp->snd_wnd != nwin) {
tp->snd_wnd = nwin;
@@ -3277,7 +3277,7 @@
* No more checks are required.
* Note, we use the fact that SND.UNA>=SND.WL2.
*/
- tcp_update_wl(tp, ack, ack_seq);
+ tcp_update_wl(tp, ack_seq);
tp->snd_una = ack;
flag |= FLAG_WIN_UPDATE;
@@ -5085,7 +5085,7 @@
* never scaled.
*/
tp->snd_wnd = ntohs(th->window);
- tcp_init_wl(tp, TCP_SKB_CB(skb)->ack_seq, TCP_SKB_CB(skb)->seq);
+ tcp_init_wl(tp, TCP_SKB_CB(skb)->seq);
if (!tp->rx_opt.wscale_ok) {
tp->rx_opt.snd_wscale = tp->rx_opt.rcv_wscale = 0;
@@ -5346,8 +5346,7 @@
tp->snd_una = TCP_SKB_CB(skb)->ack_seq;
tp->snd_wnd = ntohs(th->window) <<
tp->rx_opt.snd_wscale;
- tcp_init_wl(tp, TCP_SKB_CB(skb)->ack_seq,
- TCP_SKB_CB(skb)->seq);
+ tcp_init_wl(tp, TCP_SKB_CB(skb)->seq);
/* tcp_ack considers this ACK as duplicate
* and does not calculate rtt.
--- net/ipv4/orig.tcp_output.c 2009-02-21 21:28:11.000000000 +0200
+++ net/ipv4/tcp_output.c 2009-02-21 21:28:34.000000000 +0200
@@ -2373,7 +2373,7 @@
sk->sk_err = 0;
sock_reset_flag(sk, SOCK_DONE);
tp->snd_wnd = 0;
- tcp_init_wl(tp, tp->write_seq, 0);
+ tcp_init_wl(tp, 0);
tp->snd_una = tp->write_seq;
tp->snd_sml = tp->write_seq;
tp->snd_up = tp->write_seq;
--- include/net/orig.tcp.h 2009-02-21 21:23:21.000000000 +0200
+++ include/net/tcp.h 2009-02-21 21:23:49.000000000 +0200
@@ -829,12 +829,12 @@
__tcp_push_pending_frames(sk, tcp_current_mss(sk, 1), tp->nonagle);
}
-static inline void tcp_init_wl(struct tcp_sock *tp, u32 ack, u32 seq)
+static inline void tcp_init_wl(struct tcp_sock *tp, u32 seq)
{
tp->snd_wl1 = seq;
}
-static inline void tcp_update_wl(struct tcp_sock *tp, u32 ack, u32 seq)
+static inline void tcp_update_wl(struct tcp_sock *tp, u32 seq)
{
tp->snd_wl1 = seq;
}
--
ithilgore
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: PATCH tcp_init_wl / tcp_update_wl argument cleanup
2009-03-01 10:37 PATCH tcp_init_wl / tcp_update_wl argument cleanup ithilgore.ryu.L@gmail.com
@ 2009-03-02 11:14 ` David Miller
2009-03-02 17:57 ` Hantzis Fotis
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2009-03-02 11:14 UTC (permalink / raw)
To: ithilgore.ryu.l; +Cc: netdev
From: "ithilgore.ryu.L@gmail.com" <ithilgore.ryu.l@gmail.com>
Date: Sun, 01 Mar 2009 12:37:47 +0200
> The above functions from include/net/tcp.h have been defined with an
> argument that they never use. The argument is 'u32 ack' which is never
> used inside the function body, and thus it can be removed. The rest of
> the patch involves the necessary changes to the function callers of the
> above two functions.
Please read linux/Documentation/SubmittingPatches
In particular, your submission:
1) Lacked a proper "Signed-off-by" line and please do fix
the proper name assosciated with your email address if
you don't mind.
2) Did not root your patch properly.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PATCH tcp_init_wl / tcp_update_wl argument cleanup
2009-03-02 11:14 ` David Miller
@ 2009-03-02 17:57 ` Hantzis Fotis
2009-03-03 6:43 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Hantzis Fotis @ 2009-03-02 17:57 UTC (permalink / raw)
To: David Miller; +Cc: netdev
David Miller wrote:
> From: "ithilgore.ryu.L@gmail.com" <ithilgore.ryu.l@gmail.com>
> Date: Sun, 01 Mar 2009 12:37:47 +0200
>
>
>> The above functions from include/net/tcp.h have been defined with an
>> argument that they never use. The argument is 'u32 ack' which is never
>> used inside the function body, and thus it can be removed. The rest of
>> the patch involves the necessary changes to the function callers of the
>> above two functions.
>>
>
> Please read linux/Documentation/SubmittingPatches
>
> In particular, your submission:
>
> 1) Lacked a proper "Signed-off-by" line and please do fix
> the proper name assosciated with your email address if
> you don't mind.
>
> 2) Did not root your patch properly.
>
> Thanks.
>
Sorry for not complying with the guidelines on the previous submission.
I am resending the patch properly this time:
Signed-off-by: Hantzis Fotis <xantzis@ceid.upatras.gr>
---
diff -uprN -X linux-2.6.28-vanilla/Documentation/dontdiff linux-2.6.28-vanilla/include/net/tcp.h linux-2.6.28-devel/include/net/tcp.h
--- linux-2.6.28-vanilla/include/net/tcp.h 2009-03-02 18:50:45.000000000 +0200
+++ linux-2.6.28-devel/include/net/tcp.h 2009-03-02 19:11:19.000000000 +0200
@@ -829,12 +829,12 @@ static inline void tcp_push_pending_fram
__tcp_push_pending_frames(sk, tcp_current_mss(sk, 1), tp->nonagle);
}
-static inline void tcp_init_wl(struct tcp_sock *tp, u32 ack, u32 seq)
+static inline void tcp_init_wl(struct tcp_sock *tp, u32 seq)
{
tp->snd_wl1 = seq;
}
-static inline void tcp_update_wl(struct tcp_sock *tp, u32 ack, u32 seq)
+static inline void tcp_update_wl(struct tcp_sock *tp, u32 seq)
{
tp->snd_wl1 = seq;
}
diff -uprN -X linux-2.6.28-vanilla/Documentation/dontdiff linux-2.6.28-vanilla/net/ipv4/tcp_input.c linux-2.6.28-devel/net/ipv4/tcp_input.c
--- linux-2.6.28-vanilla/net/ipv4/tcp_input.c 2009-03-02 18:52:36.000000000 +0200
+++ linux-2.6.28-devel/net/ipv4/tcp_input.c 2009-03-02 19:11:29.000000000 +0200
@@ -3072,7 +3072,7 @@ static int tcp_ack_update_window(struct
if (tcp_may_update_window(tp, ack, ack_seq, nwin)) {
flag |= FLAG_WIN_UPDATE;
- tcp_update_wl(tp, ack, ack_seq);
+ tcp_update_wl(tp, ack_seq);
if (tp->snd_wnd != nwin) {
tp->snd_wnd = nwin;
@@ -3277,7 +3277,7 @@ static int tcp_ack(struct sock *sk, stru
* No more checks are required.
* Note, we use the fact that SND.UNA>=SND.WL2.
*/
- tcp_update_wl(tp, ack, ack_seq);
+ tcp_update_wl(tp, ack_seq);
tp->snd_una = ack;
flag |= FLAG_WIN_UPDATE;
@@ -5085,7 +5085,7 @@ static int tcp_rcv_synsent_state_process
* never scaled.
*/
tp->snd_wnd = ntohs(th->window);
- tcp_init_wl(tp, TCP_SKB_CB(skb)->ack_seq, TCP_SKB_CB(skb)->seq);
+ tcp_init_wl(tp, TCP_SKB_CB(skb)->seq);
if (!tp->rx_opt.wscale_ok) {
tp->rx_opt.snd_wscale = tp->rx_opt.rcv_wscale = 0;
@@ -5346,8 +5346,7 @@ int tcp_rcv_state_process(struct sock *s
tp->snd_una = TCP_SKB_CB(skb)->ack_seq;
tp->snd_wnd = ntohs(th->window) <<
tp->rx_opt.snd_wscale;
- tcp_init_wl(tp, TCP_SKB_CB(skb)->ack_seq,
- TCP_SKB_CB(skb)->seq);
+ tcp_init_wl(tp, TCP_SKB_CB(skb)->seq);
/* tcp_ack considers this ACK as duplicate
* and does not calculate rtt.
diff -uprN -X linux-2.6.28-vanilla/Documentation/dontdiff linux-2.6.28-vanilla/net/ipv4/tcp_minisocks.c linux-2.6.28-devel/net/ipv4/tcp_minisocks.c
--- linux-2.6.28-vanilla/net/ipv4/tcp_minisocks.c 2009-03-02 18:52:36.000000000 +0200
+++ linux-2.6.28-devel/net/ipv4/tcp_minisocks.c 2009-03-02 19:11:29.000000000 +0200
@@ -399,7 +399,7 @@ struct sock *tcp_create_openreq_child(st
tcp_prequeue_init(newtp);
- tcp_init_wl(newtp, treq->snt_isn, treq->rcv_isn);
+ tcp_init_wl(newtp, treq->rcv_isn);
newtp->srtt = 0;
newtp->mdev = TCP_TIMEOUT_INIT;
diff -uprN -X linux-2.6.28-vanilla/Documentation/dontdiff linux-2.6.28-vanilla/net/ipv4/tcp_output.c linux-2.6.28-devel/net/ipv4/tcp_output.c
--- linux-2.6.28-vanilla/net/ipv4/tcp_output.c 2009-03-02 18:52:36.000000000 +0200
+++ linux-2.6.28-devel/net/ipv4/tcp_output.c 2009-03-02 19:11:29.000000000 +0200
@@ -2373,7 +2373,7 @@ static void tcp_connect_init(struct sock
sk->sk_err = 0;
sock_reset_flag(sk, SOCK_DONE);
tp->snd_wnd = 0;
- tcp_init_wl(tp, tp->write_seq, 0);
+ tcp_init_wl(tp, 0);
tp->snd_una = tp->write_seq;
tp->snd_sml = tp->write_seq;
tp->snd_up = tp->write_seq;
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: PATCH tcp_init_wl / tcp_update_wl argument cleanup
2009-03-02 17:57 ` Hantzis Fotis
@ 2009-03-03 6:43 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-03-03 6:43 UTC (permalink / raw)
To: xantzis; +Cc: netdev
From: Hantzis Fotis <xantzis@ceid.upatras.gr>
Date: Mon, 02 Mar 2009 19:57:23 +0200
> David Miller wrote:
> > From: "ithilgore.ryu.L@gmail.com" <ithilgore.ryu.l@gmail.com>
> > Date: Sun, 01 Mar 2009 12:37:47 +0200
> >
> >
> >> The above functions from include/net/tcp.h have been defined with an
> >> argument that they never use. The argument is 'u32 ack' which is never
> >> used inside the function body, and thus it can be removed. The rest of
> >> the patch involves the necessary changes to the function callers of the
> >> above two functions.
...
> Sorry for not complying with the guidelines on the previous submission.
> I am resending the patch properly this time:
>
> Signed-off-by: Hantzis Fotis <xantzis@ceid.upatras.gr>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-03 6:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-01 10:37 PATCH tcp_init_wl / tcp_update_wl argument cleanup ithilgore.ryu.L@gmail.com
2009-03-02 11:14 ` David Miller
2009-03-02 17:57 ` Hantzis Fotis
2009-03-03 6:43 ` David Miller
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).