Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4132903pxk; Tue, 8 Sep 2020 11:30:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwO7+Q/bxh0A4+oVyqN4sXDyKug6hN5CYvPYifXVNag9ELxKeA16FUFQf9OmqHWngC5Crmg X-Received: by 2002:a05:6402:489:: with SMTP id k9mr261391edv.287.1599589805112; Tue, 08 Sep 2020 11:30:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599589805; cv=none; d=google.com; s=arc-20160816; b=QOwKCRd6VX+hmiIQvqB9Dh8B5V7il7a7X6WOubLD86aQV6EjNw1VWTGCP2w0T1TGbf kAS8jABnoyYoTUZBhPZtHQbBkODAFemny+GRaC/fE32+TnoHU/pQLLP8K9kwkV4Oii3a gOyt6vZTPjp7RYqJ4b6afPXMZTBfa3fJDyW/YvKLHyj1/Vj25yB4CIuVVnw4wlyUsduY xQnV4nlhF7lg+r7lI/0h5mYzisgl/uD8I2VSRIMl4+FCqe0ElVwQAYGAB1Eb72a9n268 0MTmoo4DASEqlT+HloQ3DQhCKkITDsO7SxFEdgN7Wwsp2orcEBWjxbIi7CcluT/h1pHN ubBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6GPzIzP4KfbJ72IC9RUu+f6TyWYnmDLJdJEpNhsp7Zs=; b=iaYQsG2sDRCy5h13qztfoNmeo7Yai0b7YJ+tiBm/DSxkYZ/mfKBXJIouUWAtADuBSs We+ni3/lQGzSqikFX81oQJT23iytCo7Nh/P9thF8vuQWpE808PFQVC2ZoDsU7A3Tyw8M BBFJjXwbYqRdlG9/+kPrYawyupBUtqJzO1th+DWVUl8GIP/aEDFe2Y1i6IZPN3ceMJbZ OfKrBx5OnILO8mqyOwa1rpwm21vlI00hCeWTMPFoZEFRXKupFnNMQFuXajoFeCKoqbWd fOUA/VLgkYeGX49iiMCjshP5KcO0SVrVhKqoNcI0tw5xw6ZxxdXJCdF/IY5/ltAmk6Ap Kp7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cII4VTeU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s7si12041350edj.515.2020.09.08.11.29.42; Tue, 08 Sep 2020 11:30:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cII4VTeU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732177AbgIHSVq (ORCPT + 99 others); Tue, 8 Sep 2020 14:21:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:56086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731462AbgIHQLL (ORCPT ); Tue, 8 Sep 2020 12:11:11 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0486C247F5; Tue, 8 Sep 2020 15:42:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599579769; bh=lixp8BxmKE9x3A7XjRdy/g2rDI2HUaEJA24QkMcIIMs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cII4VTeUvmHJJtdgVZplTdV/nwOY9rwMb+xIdpE7iiubTxBze4sPpnceJNVt820dE z0pJjCbNPKrNeLz9RBZvdzVqo8GcywLNeTKdVdGSFGP8KyUbWXGSXHHYtzTZsjN2Aj mXm1sZ91eTzhksvfUgH+uQL1RcyxiGZWHzSGsSqs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Howells , Sasha Levin Subject: [PATCH 5.4 027/129] rxrpc: Keep the ACK serial in a var in rxrpc_input_ack() Date: Tue, 8 Sep 2020 17:24:28 +0200 Message-Id: <20200908152231.046700012@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152229.689878733@linuxfoundation.org> References: <20200908152229.689878733@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Howells [ Upstream commit 68528d937dcd675e79973061c1a314db598162d1 ] Keep the ACK serial number in a variable in rxrpc_input_ack() as it's used frequently. Signed-off-by: David Howells Signed-off-by: Sasha Levin --- net/rxrpc/input.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c index 22dec6049e1bb..6cace43b217ee 100644 --- a/net/rxrpc/input.c +++ b/net/rxrpc/input.c @@ -844,7 +844,7 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb) struct rxrpc_ackinfo info; u8 acks[RXRPC_MAXACKS]; } buf; - rxrpc_serial_t acked_serial; + rxrpc_serial_t ack_serial, acked_serial; rxrpc_seq_t first_soft_ack, hard_ack, prev_pkt; int nr_acks, offset, ioffset; @@ -857,6 +857,7 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb) } offset += sizeof(buf.ack); + ack_serial = sp->hdr.serial; acked_serial = ntohl(buf.ack.serial); first_soft_ack = ntohl(buf.ack.firstPacket); prev_pkt = ntohl(buf.ack.previousPacket); @@ -865,31 +866,31 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb) summary.ack_reason = (buf.ack.reason < RXRPC_ACK__INVALID ? buf.ack.reason : RXRPC_ACK__INVALID); - trace_rxrpc_rx_ack(call, sp->hdr.serial, acked_serial, + trace_rxrpc_rx_ack(call, ack_serial, acked_serial, first_soft_ack, prev_pkt, summary.ack_reason, nr_acks); if (buf.ack.reason == RXRPC_ACK_PING_RESPONSE) rxrpc_input_ping_response(call, skb->tstamp, acked_serial, - sp->hdr.serial); + ack_serial); if (buf.ack.reason == RXRPC_ACK_REQUESTED) rxrpc_input_requested_ack(call, skb->tstamp, acked_serial, - sp->hdr.serial); + ack_serial); if (buf.ack.reason == RXRPC_ACK_PING) { - _proto("Rx ACK %%%u PING Request", sp->hdr.serial); + _proto("Rx ACK %%%u PING Request", ack_serial); rxrpc_propose_ACK(call, RXRPC_ACK_PING_RESPONSE, - sp->hdr.serial, true, true, + ack_serial, true, true, rxrpc_propose_ack_respond_to_ping); } else if (sp->hdr.flags & RXRPC_REQUEST_ACK) { rxrpc_propose_ACK(call, RXRPC_ACK_REQUESTED, - sp->hdr.serial, true, true, + ack_serial, true, true, rxrpc_propose_ack_respond_to_ack); } /* Discard any out-of-order or duplicate ACKs (outside lock). */ if (!rxrpc_is_ack_valid(call, first_soft_ack, prev_pkt)) { - trace_rxrpc_rx_discard_ack(call->debug_id, sp->hdr.serial, + trace_rxrpc_rx_discard_ack(call->debug_id, ack_serial, first_soft_ack, call->ackr_first_seq, prev_pkt, call->ackr_prev_seq); return; @@ -905,7 +906,7 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb) /* Discard any out-of-order or duplicate ACKs (inside lock). */ if (!rxrpc_is_ack_valid(call, first_soft_ack, prev_pkt)) { - trace_rxrpc_rx_discard_ack(call->debug_id, sp->hdr.serial, + trace_rxrpc_rx_discard_ack(call->debug_id, ack_serial, first_soft_ack, call->ackr_first_seq, prev_pkt, call->ackr_prev_seq); goto out; @@ -965,7 +966,7 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb) RXRPC_TX_ANNO_LAST && summary.nr_acks == call->tx_top - hard_ack && rxrpc_is_client_call(call)) - rxrpc_propose_ACK(call, RXRPC_ACK_PING, sp->hdr.serial, + rxrpc_propose_ACK(call, RXRPC_ACK_PING, ack_serial, false, true, rxrpc_propose_ack_ping_for_lost_reply); -- 2.25.1