mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 12:21:22 -05:00
tcp: Pass flags to __tcp_send_ack
Accurate ECN needs to send custom flags to handle IP-ECN field reflection during handshake. Signed-off-by: Ilpo Järvinen <ij@kernel.org> Signed-off-by: Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4618e195f9
commit
9866884ce8
@@ -707,7 +707,7 @@ void tcp_send_active_reset(struct sock *sk, gfp_t priority,
|
||||
enum sk_rst_reason reason);
|
||||
int tcp_send_synack(struct sock *);
|
||||
void tcp_push_one(struct sock *, unsigned int mss_now);
|
||||
void __tcp_send_ack(struct sock *sk, u32 rcv_nxt);
|
||||
void __tcp_send_ack(struct sock *sk, u32 rcv_nxt, u16 flags);
|
||||
void tcp_send_ack(struct sock *sk);
|
||||
void tcp_send_delayed_ack(struct sock *sk);
|
||||
void tcp_send_loss_probe(struct sock *sk);
|
||||
|
||||
@@ -121,7 +121,7 @@ static int bpf_tcp_ca_btf_struct_access(struct bpf_verifier_log *log,
|
||||
BPF_CALL_2(bpf_tcp_send_ack, struct tcp_sock *, tp, u32, rcv_nxt)
|
||||
{
|
||||
/* bpf_tcp_ca prog cannot have NULL tp */
|
||||
__tcp_send_ack((struct sock *)tp, rcv_nxt);
|
||||
__tcp_send_ack((struct sock *)tp, rcv_nxt, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ static inline void dctcp_ece_ack_update(struct sock *sk, enum tcp_ca_event evt,
|
||||
*/
|
||||
if (inet_csk(sk)->icsk_ack.pending & ICSK_ACK_TIMER) {
|
||||
dctcp_ece_ack_cwr(sk, *ce_state);
|
||||
__tcp_send_ack(sk, *prior_rcv_nxt);
|
||||
__tcp_send_ack(sk, *prior_rcv_nxt, 0);
|
||||
}
|
||||
inet_csk(sk)->icsk_ack.pending |= ICSK_ACK_NOW;
|
||||
}
|
||||
|
||||
@@ -4240,7 +4240,7 @@ void tcp_send_delayed_ack(struct sock *sk)
|
||||
}
|
||||
|
||||
/* This routine sends an ack and also updates the window. */
|
||||
void __tcp_send_ack(struct sock *sk, u32 rcv_nxt)
|
||||
void __tcp_send_ack(struct sock *sk, u32 rcv_nxt, u16 flags)
|
||||
{
|
||||
struct sk_buff *buff;
|
||||
|
||||
@@ -4269,7 +4269,7 @@ void __tcp_send_ack(struct sock *sk, u32 rcv_nxt)
|
||||
|
||||
/* Reserve space for headers and prepare control bits. */
|
||||
skb_reserve(buff, MAX_TCP_HEADER);
|
||||
tcp_init_nondata_skb(buff, tcp_acceptable_seq(sk), TCPHDR_ACK);
|
||||
tcp_init_nondata_skb(buff, tcp_acceptable_seq(sk), TCPHDR_ACK | flags);
|
||||
|
||||
/* We do not want pure acks influencing TCP Small Queues or fq/pacing
|
||||
* too much.
|
||||
@@ -4284,7 +4284,7 @@ EXPORT_SYMBOL_GPL(__tcp_send_ack);
|
||||
|
||||
void tcp_send_ack(struct sock *sk)
|
||||
{
|
||||
__tcp_send_ack(sk, tcp_sk(sk)->rcv_nxt);
|
||||
__tcp_send_ack(sk, tcp_sk(sk)->rcv_nxt, 0);
|
||||
}
|
||||
|
||||
/* This routine sends a packet with an out of date sequence
|
||||
|
||||
Reference in New Issue
Block a user