From nobody Mon Feb 9 15:26:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1679906255; cv=none; d=zohomail.com; s=zohoarc; b=BuNdXFmUdsWFbHYvHj+ZjgHoe53a52eBVdp+v0X9v7lRrKhTo6ayNSUCDkJk6MmIdVPkmwvWhyiAf/l+dJ/1arCcFkjwG0MFl5+Htmm8RH7bJOqeUyNYKiR+EaQlnltielprUOtYZuvdkDjPdyFKHxNMLSzJBSpE4vWBfDe7km0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1679906255; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BYwAGMe1PfAGydSVqlgv0hiTKV8LxJz7Cfr4pQvks4M=; b=auGbMZjPJBOiVCc5tloRJcy0OTfgmYPI/HMmdG+dtQAUIGKW0gMXNz3Q13E/zzEjrU/5Ak5U2+rVrmNw48TLapROzuXljW3YJts5qQ4VOf8vbK+4lkHGVYBK1vrb0qYXS7Pfq0prJNkTQclf3SsXdjw+rmnCJ+3OyLZTR+oBNM4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 16799062557131001.7715956856065; Mon, 27 Mar 2023 01:37:35 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.515069.797594 (Exim 4.92) (envelope-from ) id 1pgiLf-0007Is-Ah; Mon, 27 Mar 2023 08:37:03 +0000 Received: by outflank-mailman (output) from mailman id 515069.797594; Mon, 27 Mar 2023 08:37:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pgiLf-0007Il-6x; Mon, 27 Mar 2023 08:37:03 +0000 Received: by outflank-mailman (input) for mailman id 515069; Mon, 27 Mar 2023 08:37:02 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pgiLe-00071F-Fd for xen-devel@lists.xenproject.org; Mon, 27 Mar 2023 08:37:02 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 8a2600f9-cc7a-11ed-b464-930f4c7d94ae; Mon, 27 Mar 2023 10:36:59 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8FDA81F8A8; Mon, 27 Mar 2023 08:37:00 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3D0B913329; Mon, 27 Mar 2023 08:37:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id rNmIDaxVIWS+SAAAMHmgww (envelope-from ); Mon, 27 Mar 2023 08:37:00 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8a2600f9-cc7a-11ed-b464-930f4c7d94ae DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1679906220; h=from:from:reply-to: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=BYwAGMe1PfAGydSVqlgv0hiTKV8LxJz7Cfr4pQvks4M=; b=pnRmRrpElIfOGh45HyDbGyTLv5HE1XJiCA+hgB75qnV0jL4KSVd4BTS/HMLMTgZ6vr5c/q EW2BxF/x9H47o/NyMlbMwkvnqPLcy3SN0f4vddtVKFgShfc+EvOgYvcl9QnYQkD2CuiNrS 8JiD6T2Fu41dFmCAKBsZ2kYeG2PvttU= From: Juergen Gross To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Juergen Gross , Wei Liu , Paul Durrant , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , xen-devel@lists.xenproject.org, Jan Beulich Subject: [PATCH 2/2] xen/netback: remove not needed test in xenvif_tx_build_gops() Date: Mon, 27 Mar 2023 10:36:46 +0200 Message-Id: <20230327083646.18690-3-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230327083646.18690-1-jgross@suse.com> References: <20230327083646.18690-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1679906256178100001 Content-Type: text/plain; charset="utf-8" The tests for the number of grant mapping or copy operations reaching the array size of the operations buffer at the end of the main loop in xenvif_tx_build_gops() isn't needed. The loop can handle at maximum MAX_PENDING_REQS transfer requests, as XEN_RING_NR_UNCONSUMED_REQUESTS() is taking unsent responses into consideration, too. Remove the tests. Suggested-by: Jan Beulich Signed-off-by: Juergen Gross Reviewed-by: Paul Durrant --- drivers/net/xen-netback/netback.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/ne= tback.c index 111c179f161b..4943be4fd99d 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -1082,10 +1082,6 @@ static void xenvif_tx_build_gops(struct xenvif_queue= *queue, __skb_queue_tail(&queue->tx_queue, skb); =20 queue->tx.req_cons =3D idx; - - if ((*map_ops >=3D ARRAY_SIZE(queue->tx_map_ops)) || - (*copy_ops >=3D ARRAY_SIZE(queue->tx_copy_ops))) - break; } =20 return; --=20 2.35.3