From patchwork Fri Feb 2 15:19:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 195896 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp500716dyc; Fri, 2 Feb 2024 07:22:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IGkgUSyS9reMa4OJpU0fHnUdeFpfsgu7CiXFpZ0/BOFVX/sHm5/Trtdh3TGsQJX5HqjYWnl X-Received: by 2002:a17:902:e5c7:b0:1d9:7a7a:3d01 with SMTP id u7-20020a170902e5c700b001d97a7a3d01mr1256445plf.23.1706887365400; Fri, 02 Feb 2024 07:22:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706887365; cv=pass; d=google.com; s=arc-20160816; b=qpVXnrkFICbt1kqrx/WkqHEZZIIdGMOf5w3E5vaG+wEOQwinJix7vuXLWlml6Jpdgq F7NY4al6m3FscNki/kwvPl7pStx+klrbwTnPdd4qKxuniBYE2AnLoTJ/QRg2UGdpaFYg RFl769p/a8TcfdzV20i/OvguUnCJnvOlzucfz4LEyq5rT0t4cEeb9wf2H46QUaL188ZD mcMDEqluigg4E9D5EqNvwg8K3Uqi8tcRYcfx0yhBOt8fqw+b4OeSSLq2HJgr6eZKydEp Pi6u/hJZ8YLtD7buaya992O0Eaa2GJwdf97nAUxP4iux7p2SJTwV9YIzSxwCMbJAJZZx 7z/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=wkPuxqYCe+q2CWuOk+GPjQMQA8TndT8v7AjuDLV1dT4=; fh=4FmSvWIxlQjmlNsM5Zi5tgO5tYrpFC5eMu3W9jFnsVQ=; b=DukJsetIAV5HFSvRMYF8ML5QqmTXsBYKikWIcdF8oWHl9BcM0IK8aNECMjpdLWC6VW 16CdY6IX/tW6fZ8/lQWHs6uBc2TI6VTLO4wNZmFKQahsquh/uMwt5S8EOfhHP7sECzx6 MM1dU54NcxJ7YAyaScml6+4AJ20WF28fs1dLoaMhB+EWDjp3efgRq0t3yWSQoslqKLqB XCmwk9SfXS57YN68paqjEp6dA/2A5+B0q1SU1HwWHEMn41DMrF6u8HGzdDICx3Lc0qTJ pYlzYjtFPZaybyC5SxRLuKt9s0ToPR/VjJ0tNzyKUHXn5uNt7MgjxAINa6sIqMnFQmxv /1jQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=J+1FgJpt; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-50012-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50012-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCXCn+s1pwhr1hwjNCMq9y9OX1vUMZAP0364CjPJy9G8J4/SLRBKd48qptOqKySiTAdNjUUFV0yGC4FP9nSQSEJO8w0PhA== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id je9-20020a170903264900b001d775a1f306si1799015plb.562.2024.02.02.07.22.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 07:22:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50012-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=J+1FgJpt; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-50012-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50012-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A134729079B for ; Fri, 2 Feb 2024 15:20:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B2A70145B16; Fri, 2 Feb 2024 15:20:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="J+1FgJpt" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73D40146919 for ; Fri, 2 Feb 2024 15:20:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706887206; cv=none; b=fF+iqCDeT6QuDNx7pPZu3JJw9Uyigf4v8YVMzjPjCgw07nR23CkXB4gSd7bEEnfO8rh0wJn3OJje5A6W3XAWQGSnCI3ua/nSjBGpM2+AqUUT2NvrRWPNaOEgExODwaubQedYTx4tv0I6vTBUKAcN5Wx2wAy/gXtNvN0IJV4LIXo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706887206; c=relaxed/simple; bh=g70kvg+2yQ1zKRNsdNMS9QyV7HAs9pZbGrvsb7CLgvM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tTmOVOhoQtoWvmcCpQbZ9SW3rz2NPExZMhLuiDszRY9LWCbhMqiYU9xgx42cDgZblL7VqsiIvMScoQpThjHPgpzR42Olr/z8sqdbUZtZboLHsumBUKRlmDSwSh87K++ir4YGHq3rek08rOqszTZ4ItTPAdWKIo3Z88ARmRK+LzI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=J+1FgJpt; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706887203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wkPuxqYCe+q2CWuOk+GPjQMQA8TndT8v7AjuDLV1dT4=; b=J+1FgJpthsP7ujiKnRySiPZreNx6HykUXBTneWFY36R3lnV27+0tDoZo+jcLutbco9j//P dcpQj8nDNJaH4jbvJJULbzLDItRLl9/EYMFA//PK7AaNB8lv9SRDRZGI0BJqPxWWjY4o/T 7L6rZQ3crl8ZOWX/Ym/u3V+w0sr0rNo= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-625-xenkD8LiNhaB3ZLViFTDIw-1; Fri, 02 Feb 2024 10:20:00 -0500 X-MC-Unique: xenkD8LiNhaB3ZLViFTDIw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5536929AB3EF; Fri, 2 Feb 2024 15:19:59 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.245]) by smtp.corp.redhat.com (Postfix) with ESMTP id 34C3D2026D66; Fri, 2 Feb 2024 15:19:58 +0000 (UTC) From: David Howells To: netdev@vger.kernel.org Cc: David Howells , Marc Dionne , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net 2/4] rxrpc: Fix delayed ACKs to not set the reference serial number Date: Fri, 2 Feb 2024 15:19:14 +0000 Message-ID: <20240202151920.2760446-3-dhowells@redhat.com> In-Reply-To: <20240202151920.2760446-1-dhowells@redhat.com> References: <20240202151920.2760446-1-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789801126279886964 X-GMAIL-MSGID: 1789801126279886964 Fix the construction of delayed ACKs to not set the reference serial number as they can't be used as an RTT reference. Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both") Signed-off-by: David Howells cc: Marc Dionne cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org --- net/rxrpc/ar-internal.h | 1 - net/rxrpc/call_event.c | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h index 31b0dd8c9b2d..b4ab26c3718a 100644 --- a/net/rxrpc/ar-internal.h +++ b/net/rxrpc/ar-internal.h @@ -696,7 +696,6 @@ struct rxrpc_call { /* Receive-phase ACK management (ACKs we send). */ u8 ackr_reason; /* reason to ACK */ u16 ackr_sack_base; /* Starting slot in SACK table ring */ - rxrpc_serial_t ackr_serial; /* serial of packet being ACK'd */ rxrpc_seq_t ackr_window; /* Base of SACK window */ rxrpc_seq_t ackr_wtop; /* Base of SACK window */ unsigned int ackr_nr_unacked; /* Number of unacked packets */ diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c index e363f21a2014..c61efe08695d 100644 --- a/net/rxrpc/call_event.c +++ b/net/rxrpc/call_event.c @@ -43,8 +43,6 @@ void rxrpc_propose_delay_ACK(struct rxrpc_call *call, rxrpc_serial_t serial, unsigned long expiry = rxrpc_soft_ack_delay; unsigned long now = jiffies, ack_at; - call->ackr_serial = serial; - if (rxrpc_soft_ack_delay < expiry) expiry = rxrpc_soft_ack_delay; if (call->peer->srtt_us != 0) @@ -373,7 +371,6 @@ static void rxrpc_send_initial_ping(struct rxrpc_call *call) bool rxrpc_input_call_event(struct rxrpc_call *call, struct sk_buff *skb) { unsigned long now, next, t; - rxrpc_serial_t ackr_serial; bool resend = false, expired = false; s32 abort_code; @@ -423,8 +420,7 @@ bool rxrpc_input_call_event(struct rxrpc_call *call, struct sk_buff *skb) if (time_after_eq(now, t)) { trace_rxrpc_timer(call, rxrpc_timer_exp_ack, now); cmpxchg(&call->delay_ack_at, t, now + MAX_JIFFY_OFFSET); - ackr_serial = xchg(&call->ackr_serial, 0); - rxrpc_send_ACK(call, RXRPC_ACK_DELAY, ackr_serial, + rxrpc_send_ACK(call, RXRPC_ACK_DELAY, 0, rxrpc_propose_ack_ping_for_lost_ack); }