aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/tcp.c12
-rw-r--r--net/ipv4/tcp_offload.c8
2 files changed, 11 insertions, 9 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 744af67a5989..181b70ebd964 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -426,13 +426,15 @@ void tcp_init_sock(struct sock *sk)
426} 426}
427EXPORT_SYMBOL(tcp_init_sock); 427EXPORT_SYMBOL(tcp_init_sock);
428 428
429void tcp_tx_timestamp(struct sock *sk, struct sk_buff *skb) 429static void tcp_tx_timestamp(struct sock *sk, struct sk_buff *skb)
430{ 430{
431 struct skb_shared_info *shinfo = skb_shinfo(skb); 431 if (sk->sk_tsflags) {
432 struct skb_shared_info *shinfo = skb_shinfo(skb);
432 433
433 sock_tx_timestamp(sk, &shinfo->tx_flags); 434 sock_tx_timestamp(sk, &shinfo->tx_flags);
434 if (shinfo->tx_flags & SKBTX_ANY_SW_TSTAMP) 435 if (shinfo->tx_flags & SKBTX_ANY_TSTAMP)
435 shinfo->tskey = TCP_SKB_CB(skb)->seq + skb->len - 1; 436 shinfo->tskey = TCP_SKB_CB(skb)->seq + skb->len - 1;
437 }
436} 438}
437 439
438/* 440/*
diff --git a/net/ipv4/tcp_offload.c b/net/ipv4/tcp_offload.c
index f597119fc4e7..bc1b83cb8309 100644
--- a/net/ipv4/tcp_offload.c
+++ b/net/ipv4/tcp_offload.c
@@ -14,12 +14,12 @@
14#include <net/tcp.h> 14#include <net/tcp.h>
15#include <net/protocol.h> 15#include <net/protocol.h>
16 16
17void tcp_gso_tstamp(struct sk_buff *skb, unsigned int ts_seq, unsigned int seq, 17static void tcp_gso_tstamp(struct sk_buff *skb, unsigned int ts_seq,
18 unsigned int mss) 18 unsigned int seq, unsigned int mss)
19{ 19{
20 while (skb) { 20 while (skb) {
21 if (ts_seq < (__u64) seq + mss) { 21 if (before(ts_seq, seq + mss)) {
22 skb_shinfo(skb)->tx_flags = SKBTX_SW_TSTAMP; 22 skb_shinfo(skb)->tx_flags |= SKBTX_SW_TSTAMP;
23 skb_shinfo(skb)->tskey = ts_seq; 23 skb_shinfo(skb)->tskey = ts_seq;
24 return; 24 return;
25 } 25 }