From nobody Fri Aug 18 23:18:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RSHqt1Hhyz4fs0b; Fri, 18 Aug 2023 23:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RSHqs3xbWz4nNr; Fri, 18 Aug 2023 23:18:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692400729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XuO75da1Yroy7TYuvmRHpe7XRJqVlIqW1PxJkKPfWFE=; b=Tg65g4ILqHJ/Mc/HgZEVEJdiylTXXH6mWfR6PsOxheFdXtY2B7RdyIexi7wVBOWOJ3YN/W TaNxScpiTn1MGaxK342EUyp03zL45l+cSha+TnCraON6sYjciBfuEjvCHDRdLRZeY8bhIC EO6TF5andVpNYGXodOzesxMAOkqgXX5ftsM5pnuNIzezIXFNDfJxUWYYRdRu6ScoflQ8Ul VFI44987nsHjaXWyENQ69qb3gRTAnkX8Yg+SWHceHkTj6kduubHn0pbqy6ERdIGaZ2I5gZ c6HMxeWloLxzMlMU7Qj5kHjNNsIHd3LvH2Wgfwg4B0ZT+eiRcwNwHMCG3WuvGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692400729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XuO75da1Yroy7TYuvmRHpe7XRJqVlIqW1PxJkKPfWFE=; b=PRWQi+DdAw7WIOPqvEecAeGERm0cMVx2veOQ7R3e3kpcJmGijw7ml2lva5iv0DhXoqzT+x Rm8RKl9AFtA8RuHPDeedx3n4FU1pbAOpj3fzzPTdzpFCUry+rUis1/b+IHAANseHzf35xw ovgdfH1SuSbjWsfqRweCc5E8+GYC3YyaIfAzYvHw2VHrAFUUQBpF4QHxFjdZ1QNvCRKDSz PXaRJcO49lcoUDjsMhALkGsJZQ93YdtfgeK9lqiBkRxDSjr2U6y+aX21+domoWD6wRtb2g XvNrgvC4m57z2zyhc+dapTZQFS733KAfTbYuRNsKg1FLuQeyXlMLuFPfJsh8SQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692400729; a=rsa-sha256; cv=none; b=N2mtFv4udi2Fvz6bBng1SmxsTBlbI1fSqnPvASePprA+XaTkqEI3GeK9cSTVaWwxJo6Gn6 vMnoN7p7Z65UoUkWzqw6UyFHLzAeZTgRBJdhnyFTBsQPfNfdaOq3tul8pX7XsuM+OAygYE blqASoTq9UbrMV+V6KVxIsAi4wXqS6AiWbRik+BB4UonZiPpB20oGegowVIB22HqPyn63v Qt4Sus+WwG7tmClIJZg0ocNeQOdUvxBscd3k13ZHIsn1QkSTGnk97NraqOQKfDbAGt2Ak0 jijAE140VNopstlTJXiNn2V1mAMxW5NT6rlGd12qfKxs/E306IclAS4OxS6Nzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RSHqs32Czzb6R; Fri, 18 Aug 2023 23:18:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37INInEQ018773; Fri, 18 Aug 2023 23:18:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37INInfw018770; Fri, 18 Aug 2023 23:18:49 GMT (envelope-from git) Date: Fri, 18 Aug 2023 23:18:49 GMT Message-Id: <202308182318.37INInfw018770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: d3ca462c94b2 - stable/13 - gve: Simplify tx loop over buffer ring List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d3ca462c94b268cfa04cb66101fa41a3c752651d Auto-Submitted: auto-generated The branch stable/13 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=d3ca462c94b268cfa04cb66101fa41a3c752651d commit d3ca462c94b268cfa04cb66101fa41a3c752651d Author: Shailend Chand AuthorDate: 2023-08-12 07:59:26 +0000 Commit: Xin LI CommitDate: 2023-08-18 23:18:16 +0000 gve: Simplify tx loop over buffer ring Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41281 (cherry picked from commit 543cf924bcdcf064fed417ec3d66000ef66194d2) --- sys/dev/gve/gve_tx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/dev/gve/gve_tx.c b/sys/dev/gve/gve_tx.c index db3f7415f412..1e62e1226be1 100644 --- a/sys/dev/gve/gve_tx.c +++ b/sys/dev/gve/gve_tx.c @@ -696,10 +696,9 @@ gve_xmit_br(struct gve_tx_ring *tx) struct ifnet *ifp = priv->ifp; struct mbuf *mbuf; - while (!drbr_empty(ifp, tx->br) && - (if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0) { + while ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0 && + (mbuf = drbr_peek(ifp, tx->br)) != NULL) { - mbuf = drbr_peek(ifp, tx->br); if (__predict_false(gve_xmit(tx, mbuf) != 0)) { drbr_putback(ifp, tx->br, mbuf); taskqueue_enqueue(tx->xmit_tq, &tx->xmit_task);