Re: [PATCH v7 net-next 06/15] tcp: accecn: add AccECN rx byte counters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/14/25 3:56 PM, chia-yu.chang@xxxxxxxxxxxxxxxxxxx wrote:
> diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
> index 779a206a5ca6..3f8225bae49f 100644
> --- a/net/ipv4/tcp_minisocks.c
> +++ b/net/ipv4/tcp_minisocks.c
> @@ -497,10 +497,11 @@ static void tcp_ecn_openreq_child(struct sock *sk,
>  	struct tcp_sock *tp = tcp_sk(sk);
>  
>  	if (treq->accecn_ok) {
> +		const struct tcphdr *th = (const struct tcphdr *)skb->data;

Minor nit: please insert an empty line between the variable declaration
and the code.

>  		tcp_ecn_mode_set(tp, TCP_ECN_MODE_ACCECN);
>  		tp->syn_ect_snt = treq->syn_ect_snt;
>  		tcp_accecn_third_ack(sk, skb, treq->syn_ect_snt);
> -		tcp_ecn_received_counters(sk, skb);
> +		tcp_ecn_received_counters(sk, skb, skb->len - th->doff * 4);

There is an identic statement a few lines above, possibly worth an helper.

/P





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux