From patchwork Mon Mar 4 08:43:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 209427 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp1294189dyc; Mon, 4 Mar 2024 00:49:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV39m8WKizjqDZQ1PRrrCN16hFQmyhJN6gQ0um1eFvgcJXxEQ3zopqK/sFG05MIrm+xqFq8E+sc9BRbm1Mrk3sbbq3vUQ== X-Google-Smtp-Source: AGHT+IGuO5HhaDAl53C+601O0LN9FlAuCrse+zDGNcvkQKtSO9M5SxyzrX/LkF7SK2uuQ60ZiL8F X-Received: by 2002:a05:6a20:7f83:b0:1a1:3a4a:e075 with SMTP id d3-20020a056a207f8300b001a13a4ae075mr5645260pzj.57.1709542173462; Mon, 04 Mar 2024 00:49:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709542173; cv=pass; d=google.com; s=arc-20160816; b=GvTYaKb+Ku5mcS0gCbZUFP0LoEN6wtuNJhp6kMDn2xdhqXbZaPKtudvrCL8qWfAMSB fHt5TYlgfTqUpFxsORdeYPj9+/MQl+QU9U0DcRvaMCr/fw8PurDaTgqqchOrbwrTHdki JpOVZPwjhRL5taIflUIaTSNRVn8BTIW95IVFdodfblQNS6lCUpMJASLmcYYnCyJvgYyX 3PEHfQxEPuMm7cAUSTOk/Kiljn5nAmBwBrNlqV6Cbl3sySin4FV6kTiq0JPtZ+8/anuS YeqcSP2lyZ2Tg/4XqgW2VU5OVzhNv7DtAe10IUpXFEUhYVj0PcQaD6DnYxhKDstGk97r 6cHA== 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=E5AUx7yIzfKd4QjuMWluENnnnPZkBpDZmSme9BhaoSY=; fh=icnuzcdbhXgwjK0pgvJXK7xplE+Och0jvyZv2PxZJ18=; b=I6fpQvGN+x7hBzm1U2EZHd2Pf8r7FIFk54O4tcMHPTowG0GdU4fdroMy0I8dqk0tsp xNs/jSwt+4uoUjl23cod9aI/5/c5Tfh43d7BnwYgI7EqoTnggDccpU+Bp2fkOCoIWjj5 5zPhbZmB6KUecGfML6NHiRiKEwgJmbO7b9bYq9ZWXKiucjsnsKEle+i8+EhwxjXGLqGE 5OKeKFHYup3BmK9+Sxx92SmGguOB8LgJIIXxI19Mbd4PTa4z1sEC9qoksdQ0+rrOeuxt tayA39CysxQGgG28tt3Mh2O0vh4KMp47wLf4BIxQUwkkBYjKi8NiE4JruSjG7zlMT9Gu Q7Cw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="L3/KD4HT"; 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-90233-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90233-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id lm16-20020a056a003c9000b006e6265d966fsi995550pfb.359.2024.03.04.00.49.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 00:49:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90233-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="L3/KD4HT"; 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-90233-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90233-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A56AEB21C8C for ; Mon, 4 Mar 2024 08:49:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5BFC23BB26; Mon, 4 Mar 2024 08:44:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="L3/KD4HT" 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 2D5BF3A1CA for ; Mon, 4 Mar 2024 08:44:03 +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=1709541845; cv=none; b=JC6ZJuH1NzfVpM9H3PLAe2Ov4NCugXpB6E5QULCeH0kBjsGWqPIwuFYdCsbrM80k4r4mkP8lUh7GMecGIQslsjVmWTphtwpC9KA3DxvhKnJCi82w0wD4dXixWTYUsuYBrz/6n8eRlsB6SkqqUIaFNcYEniYq6lPQxhAbdyebGek= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709541845; c=relaxed/simple; bh=ljMsL1C2LYCeeJeMBEdzm9LuanQgXWoC+/BDvOiBmDY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OqRhd6r9GYJJGCFUNlzsh0+RhnykEHbAfCIXgHInNDvjbyUvvDlzYvcN9GToZwK4NJA/67v1hfrt/EiGCAcY/ld7cmdyeNK+fYkZnQvUrlV1ku5pYAGgU7IVA2ktKPX6epAn8YJa+OquuU2619umDqmdQ63SlUVPWPuI3FTfC58= 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=L3/KD4HT; 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=1709541843; 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=E5AUx7yIzfKd4QjuMWluENnnnPZkBpDZmSme9BhaoSY=; b=L3/KD4HTLahncmtBvuKJbDaGKoWEyRIgGq7mdzhAf8JXOq9ZLiGHGfYm28QkAfA0LzTK2l kYj2Dim+qNBjfBEPiT/lQ63c2H2jC6fYITYahe78P84y+RsP6KhBs7hXORxhGYAavhNoAT tO/ZSldWm88+48E+ls8cgmS8slCkCGo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-487-1xZjqKa6M8iAdCauiNNf6w-1; Mon, 04 Mar 2024 03:43:59 -0500 X-MC-Unique: 1xZjqKa6M8iAdCauiNNf6w-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 0ED3C185A782; Mon, 4 Mar 2024 08:43:59 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.114]) by smtp.corp.redhat.com (Postfix) with ESMTP id C71B7422A9; Mon, 4 Mar 2024 08:43:56 +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 15/21] rxrpc: Parse received packets before dealing with timeouts Date: Mon, 4 Mar 2024 08:43:12 +0000 Message-ID: <20240304084322.705539-16-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.5 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792584894124594088 X-GMAIL-MSGID: 1792584894124594088 Parse the received packets before going and processing timeouts as the timeouts may be reset by the reception of a packet. 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c index e19ea54dce54..58826710322d 100644 --- a/net/rxrpc/call_event.c +++ b/net/rxrpc/call_event.c @@ -358,6 +358,9 @@ bool rxrpc_input_call_event(struct rxrpc_call *call, struct sk_buff *skb) if (skb && skb->mark == RXRPC_SKB_MARK_ERROR) goto out; + if (skb) + rxrpc_input_call_packet(call, skb); + /* If we see our async-event poke, check for timeout trippage. */ now = jiffies; t = call->expect_rx_by; @@ -417,9 +420,6 @@ bool rxrpc_input_call_event(struct rxrpc_call *call, struct sk_buff *skb) resend = true; } - if (skb) - rxrpc_input_call_packet(call, skb); - rxrpc_transmit_some_data(call); if (skb) {