From patchwork Mon Mar 4 08:43:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 209428 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp1294242dyc; Mon, 4 Mar 2024 00:49:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWhZepsRTW3ZR8fFO8fKoKeLKVmo2qNFg9/MsYXipdg/kouimZVpjjiPULifB+kLR36l43DXtonhrcptqgpOpfQ0NA3eg== X-Google-Smtp-Source: AGHT+IH1etw/yoyhINAJVi3wgP0Fb5i4z1hqVFyYDNhAmtSCVcHQ+GY9uCHOX9MDJaPBVBEyYtsl X-Received: by 2002:a05:6a00:2183:b0:6e4:d201:a39a with SMTP id h3-20020a056a00218300b006e4d201a39amr7842538pfi.22.1709542183471; Mon, 04 Mar 2024 00:49:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709542183; cv=pass; d=google.com; s=arc-20160816; b=Si+mHkD41LR4FLgkMLQ4zQY20QlWUR17Y0DqgtDaIQ/ZqDzMxcGyeNJTgZfb0B5b6X RiyeJtS+rxHMgHxovIiL+82AGwS17wsip9lEeQuvZ6V/cgw1dJFxH2zon+8PW+lfdvM6 x8y4av1gTc9EUWnmINXPNCn0ZJ4Fzc14db5Y9e+Wz1xVWIuriDONUKmi1OapatdMIQYo OcwdsAny3k2JSyi8e0NcTYED2Iwk1o/Aq7tJ8jp/BkIsBuHq78owrbZKe+oLEDu2a0M2 03BTk6ibICjkMWGDBeA8dK4xmbEvyeDk/Jynl5rrMnTK04SfrBqnWYNBfqaizQzdFC4m DKRg== 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=dFZQL0DrD/luJDZ0nEKBrlgAEZrrkxfF6eLg9CJqo1A=; fh=icnuzcdbhXgwjK0pgvJXK7xplE+Och0jvyZv2PxZJ18=; b=Q/o7hXtVAatCbU0npdFAp+8vUCFXd9gT6KnUhM/GBrK9YVlHmY/eZ5gvjCfJQPk/Xg 5c5ylofg6x29AyqWunM/Ide2tZQ5yYWYBC0piGlOuDwCLD7UYYfU6fIVBF3UWxQhyp56 U/uqynaz1M9eGpsGQ0S/Q9XoTSak7u+hNA1Gc8Jr3cDI3tZHpDc0j0uBQJZLUZ4kvFOV 2XXvJzTqCH4TfOyR64jnnWqwbRFCx/wWYEvQeBtgHFLrujYdBXCyrRJa9BsywHrZhWhp isI46bttR6WxuvTQx6HFmPBizEg714YKd415f8U74U62LfHqho4diA+kj4I9sE4tVQuz s14g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FmeCORb8; 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-90234-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90234-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id it10-20020a056a00458a00b006e48baa333dsi7729265pfb.402.2024.03.04.00.49.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 00:49:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90234-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=FmeCORb8; 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-90234-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90234-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 1B973281114 for ; Mon, 4 Mar 2024 08:49:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF7171BC3A; Mon, 4 Mar 2024 08:44:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FmeCORb8" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 B254B3B783 for ; Mon, 4 Mar 2024 08:44:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709541849; cv=none; b=VGuGZzY83bFY7pD/7Z1TyQEJTcpL97Rsu7wdjNXGym4F0K613YsQrFbcuiaWItXsjztOY1wyr8+YEtx7/jG8w5bZDtrScAXi1M8EMuWoGUud5amMktMp04GFhvdkZMXOLAH/jHvXKnBRAUaFCn51D0WvGklulWVxfQZHSpgTaXY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709541849; c=relaxed/simple; bh=xqU7TdJ6uMoTB6NE2LCdz37Pqfl01I9/rlA/Td1pBIA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H95zZfJoTi5eq7bQi5EWoVBC7UtyyVOXI5CCWlmjyvuhJ/WmxRax5Sw0FIWl0sWvYs7lZPnP8L/x9OIU2JVf9W8NHn0r0wY0IxjP8bYG9JXpwzWEfo0fsysdMHFEqB8v6PNNLS6OAPpx48nffDlQq/vk8fU/xzBmL55jMb2JBIU= 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=FmeCORb8; arc=none smtp.client-ip=170.10.133.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=1709541845; 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=dFZQL0DrD/luJDZ0nEKBrlgAEZrrkxfF6eLg9CJqo1A=; b=FmeCORb8ldFQ/qMuC6t5ITgwIFoD0850UiXjJdXOoysDJaKalaxZDiPlpJsAtJJCz5ObRV jo7zSCIDrbS6xDWm61UIdCL+0NIL/1KAIdf4Mt9brYS6LCtzsK9vJ3Aoze+4QnFSb5MRwo VKsvP7G8OGi+A73iXx8Lc37e9LTWGbk= 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-160-KF9HvTUHOj2EgOdugEoTXg-1; Mon, 04 Mar 2024 03:44:02 -0500 X-MC-Unique: KF9HvTUHOj2EgOdugEoTXg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (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 B3CB938212C3; Mon, 4 Mar 2024 08:44:01 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.114]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0531E1121313; Mon, 4 Mar 2024 08:43:59 +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-next v2 16/21] rxrpc: Don't permit resending after all Tx packets acked Date: Mon, 4 Mar 2024 08:43:13 +0000 Message-ID: <20240304084322.705539-17-dhowells@redhat.com> In-Reply-To: <20240304084322.705539-1-dhowells@redhat.com> References: <20240304084322.705539-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.3 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792584904813824689 X-GMAIL-MSGID: 1792584904813824689 Once all the packets transmitted as part of a call have been acked, don't permit any resending. 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/call_event.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c index 58826710322d..ef28ebf37c7d 100644 --- a/net/rxrpc/call_event.c +++ b/net/rxrpc/call_event.c @@ -450,7 +450,9 @@ bool rxrpc_input_call_event(struct rxrpc_call *call, struct sk_buff *skb) rxrpc_send_ACK(call, RXRPC_ACK_PING, 0, rxrpc_propose_ack_ping_for_lost_ack); - if (resend && __rxrpc_call_state(call) != RXRPC_CALL_CLIENT_RECV_REPLY) + if (resend && + __rxrpc_call_state(call) != RXRPC_CALL_CLIENT_RECV_REPLY && + !test_bit(RXRPC_CALL_TX_ALL_ACKED, &call->flags)) rxrpc_resend(call, NULL); if (test_and_clear_bit(RXRPC_CALL_RX_IS_IDLE, &call->flags))