summaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2008-12-05 22:42:41 -0800
committerDavid S. Miller <davem@davemloft.net>2008-12-05 22:42:41 -0800
commit50133161a83c9e5974d430cabd77d6430ca7d579 (patch)
tree288ad9673bb907399f1d8f646c1a1a1f0af64de8 /net/ipv4/tcp_input.c
parenta1197f5a6faa23e5d0c1f8ed97b011deb2a75457 (diff)
downloadlwn-50133161a83c9e5974d430cabd77d6430ca7d579.tar.gz
lwn-50133161a83c9e5974d430cabd77d6430ca7d579.zip
tcp: no need to pass prev skb around, reduces arg pressure
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index e25827719e70..2d9151c94368 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1376,12 +1376,12 @@ static u8 tcp_sacktag_one(struct sk_buff *skb, struct sock *sk,
return sacked;
}
-static int tcp_shifted_skb(struct sock *sk, struct sk_buff *prev,
- struct sk_buff *skb,
+static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
struct tcp_sacktag_state *state,
unsigned int pcount, int shifted, int mss)
{
struct tcp_sock *tp = tcp_sk(sk);
+ struct sk_buff *prev = tcp_write_queue_prev(sk, skb);
BUG_ON(!pcount);
@@ -1565,7 +1565,7 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb,
if (!skb_shift(prev, skb, len))
goto fallback;
- if (!tcp_shifted_skb(sk, prev, skb, state, pcount, len, mss))
+ if (!tcp_shifted_skb(sk, skb, state, pcount, len, mss))
goto out;
/* Hole filled allows collapsing with the next as well, this is very
@@ -1584,8 +1584,7 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb,
len = skb->len;
if (skb_shift(prev, skb, len)) {
pcount += tcp_skb_pcount(skb);
- tcp_shifted_skb(sk, prev, skb, state, tcp_skb_pcount(skb), len,
- mss);
+ tcp_shifted_skb(sk, skb, state, tcp_skb_pcount(skb), len, mss);
}
out: