Commit 352d4800 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by David S. Miller

[TCP]: Tidy up skb_entail

Heck, it even saves us some few bytes:

[acme@newtoy net-2.6.20]$ codiff -f /tmp/tcp.o.before ../OUTPUT/qemu/net-2.6.20/net/ipv4/tcp.o
/pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv4/tcp.c:
  tcp_sendpage |   -7
  tcp_sendmsg  |   -5
 2 functions changed, 12 bytes removed
[acme@newtoy net-2.6.20]$
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
parent eafff86d
...@@ -463,11 +463,12 @@ static inline int forced_push(struct tcp_sock *tp) ...@@ -463,11 +463,12 @@ static inline int forced_push(struct tcp_sock *tp)
static inline void skb_entail(struct sock *sk, struct tcp_sock *tp, static inline void skb_entail(struct sock *sk, struct tcp_sock *tp,
struct sk_buff *skb) struct sk_buff *skb)
{ {
struct tcp_skb_cb *tcb = TCP_SKB_CB(skb);
skb->csum = 0; skb->csum = 0;
TCP_SKB_CB(skb)->seq = tp->write_seq; tcb->seq = tcb->end_seq = tp->write_seq;
TCP_SKB_CB(skb)->end_seq = tp->write_seq; tcb->flags = TCPCB_FLAG_ACK;
TCP_SKB_CB(skb)->flags = TCPCB_FLAG_ACK; tcb->sacked = 0;
TCP_SKB_CB(skb)->sacked = 0;
skb_header_release(skb); skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb); __skb_queue_tail(&sk->sk_write_queue, skb);
sk_charge_skb(sk, skb); sk_charge_skb(sk, skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment