Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/emulex/benet/be_main.c drivers/net/ethernet/intel/igb/igb_main.c drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c include/net/scm.h net/batman-adv/routing.c net/ipv4/tcp_input.c The e{uid,gid} --> {uid,gid} credentials fix conflicted with the cleanup in net-next to now pass cred structs around. The be2net driver had a bug fix in 'net' that overlapped with the VLAN interface changes by Patrick McHardy in net-next. An IGB conflict existed because in 'net' the build_skb() support was reverted, and in 'net-next' there was a comment style fix within that code. Several batman-adv conflicts were resolved by making sure that all calls to batadv_is_my_mac() are changed to have a new bat_priv first argument. Eric Dumazet's TS ECR fix in TCP in 'net' conflicted with the F-RTO rewrite in 'net-next', mostly overlapping changes. Thanks to Stephen Rothwell and Antonio Quartulli for help with several of these merge resolutions. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -111,6 +111,7 @@ int sysctl_tcp_early_retrans __read_mostly = 3;
|
||||
#define FLAG_SND_UNA_ADVANCED 0x400 /* Snd_una was changed (!= FLAG_DATA_ACKED) */
|
||||
#define FLAG_DSACKING_ACK 0x800 /* SACK blocks contained D-SACK info */
|
||||
#define FLAG_SACK_RENEGING 0x2000 /* snd_una advanced to a sacked seq */
|
||||
#define FLAG_UPDATE_TS_RECENT 0x4000 /* tcp_replace_ts_recent() */
|
||||
|
||||
#define FLAG_ACKED (FLAG_DATA_ACKED|FLAG_SYN_ACKED)
|
||||
#define FLAG_NOT_DUP (FLAG_DATA|FLAG_WIN_UPDATE|FLAG_ACKED)
|
||||
@@ -3265,6 +3266,27 @@ static void tcp_send_challenge_ack(struct sock *sk)
|
||||
}
|
||||
}
|
||||
|
||||
static void tcp_store_ts_recent(struct tcp_sock *tp)
|
||||
{
|
||||
tp->rx_opt.ts_recent = tp->rx_opt.rcv_tsval;
|
||||
tp->rx_opt.ts_recent_stamp = get_seconds();
|
||||
}
|
||||
|
||||
static void tcp_replace_ts_recent(struct tcp_sock *tp, u32 seq)
|
||||
{
|
||||
if (tp->rx_opt.saw_tstamp && !after(seq, tp->rcv_wup)) {
|
||||
/* PAWS bug workaround wrt. ACK frames, the PAWS discard
|
||||
* extra check below makes sure this can only happen
|
||||
* for pure ACK frames. -DaveM
|
||||
*
|
||||
* Not only, also it occurs for expired timestamps.
|
||||
*/
|
||||
|
||||
if (tcp_paws_check(&tp->rx_opt, 0))
|
||||
tcp_store_ts_recent(tp);
|
||||
}
|
||||
}
|
||||
|
||||
/* This routine deals with acks during a TLP episode.
|
||||
* Ref: loss detection algorithm in draft-dukkipati-tcpm-tcp-loss-probe.
|
||||
*/
|
||||
@@ -3340,6 +3362,12 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
|
||||
prior_fackets = tp->fackets_out;
|
||||
prior_in_flight = tcp_packets_in_flight(tp);
|
||||
|
||||
/* ts_recent update must be made after we are sure that the packet
|
||||
* is in window.
|
||||
*/
|
||||
if (flag & FLAG_UPDATE_TS_RECENT)
|
||||
tcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq);
|
||||
|
||||
if (!(flag & FLAG_SLOWPATH) && after(ack, prior_snd_una)) {
|
||||
/* Window is constant, pure forward advance.
|
||||
* No more checks are required.
|
||||
@@ -3636,27 +3664,6 @@ const u8 *tcp_parse_md5sig_option(const struct tcphdr *th)
|
||||
EXPORT_SYMBOL(tcp_parse_md5sig_option);
|
||||
#endif
|
||||
|
||||
static inline void tcp_store_ts_recent(struct tcp_sock *tp)
|
||||
{
|
||||
tp->rx_opt.ts_recent = tp->rx_opt.rcv_tsval;
|
||||
tp->rx_opt.ts_recent_stamp = get_seconds();
|
||||
}
|
||||
|
||||
static inline void tcp_replace_ts_recent(struct tcp_sock *tp, u32 seq)
|
||||
{
|
||||
if (tp->rx_opt.saw_tstamp && !after(seq, tp->rcv_wup)) {
|
||||
/* PAWS bug workaround wrt. ACK frames, the PAWS discard
|
||||
* extra check below makes sure this can only happen
|
||||
* for pure ACK frames. -DaveM
|
||||
*
|
||||
* Not only, also it occurs for expired timestamps.
|
||||
*/
|
||||
|
||||
if (tcp_paws_check(&tp->rx_opt, 0))
|
||||
tcp_store_ts_recent(tp);
|
||||
}
|
||||
}
|
||||
|
||||
/* Sorry, PAWS as specified is broken wrt. pure-ACKs -DaveM
|
||||
*
|
||||
* It is not fatal. If this ACK does _not_ change critical state (seqs, window)
|
||||
@@ -5250,14 +5257,9 @@ slow_path:
|
||||
return 0;
|
||||
|
||||
step5:
|
||||
if (tcp_ack(sk, skb, FLAG_SLOWPATH) < 0)
|
||||
if (tcp_ack(sk, skb, FLAG_SLOWPATH | FLAG_UPDATE_TS_RECENT) < 0)
|
||||
goto discard;
|
||||
|
||||
/* ts_recent update must be made after we are sure that the packet
|
||||
* is in window.
|
||||
*/
|
||||
tcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq);
|
||||
|
||||
tcp_rcv_rtt_measure_ts(sk, skb);
|
||||
|
||||
/* Process urgent data. */
|
||||
@@ -5666,7 +5668,8 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
|
||||
|
||||
/* step 5: check the ACK field */
|
||||
if (true) {
|
||||
int acceptable = tcp_ack(sk, skb, FLAG_SLOWPATH) > 0;
|
||||
int acceptable = tcp_ack(sk, skb, FLAG_SLOWPATH |
|
||||
FLAG_UPDATE_TS_RECENT) > 0;
|
||||
|
||||
switch (sk->sk_state) {
|
||||
case TCP_SYN_RECV:
|
||||
@@ -5817,11 +5820,6 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
|
||||
}
|
||||
}
|
||||
|
||||
/* ts_recent update must be made after we are sure that the packet
|
||||
* is in window.
|
||||
*/
|
||||
tcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq);
|
||||
|
||||
/* step 6: check the URG bit */
|
||||
tcp_urg(sk, skb, th);
|
||||
|
||||
|
Reference in New Issue
Block a user