From nobody Sat Aug 12 08:02:00 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 4RNCmm2YgPz4m764; Sat, 12 Aug 2023 08:02:00 +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 4RNCmm1rZtz4Gw4; Sat, 12 Aug 2023 08:02:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691827320; 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=GPp8buyL4rEL2kBq1cF4wHR5ABeZCBiyVTXfTU2JfoY=; b=AuQRHUcxm6WPSbW0ZUsvjYGRByIXGrn9VWuRN7zC4fBRnYg79WopJ6w/zRWU7T+Mu2jeFD kMP5yDjNAeWTY8dfrwA1TYjyu/bbsuHhDO04FQWSb2gusYM/7sWnqVzblcModhJ1qUPXQ5 5O73ik0kj5chnjRI0TBS+wU40iK4olhYi4x2IzWfBtxII4rWB41cQBRwirBNNUx2lCtBUA 0ld48IJeWpxPBOSQUQ4vUG+OJxnPRSMzzJnEtX88L9KQnUpWArIYeUF91P2lAZkUcAAbVq QaSXwuuoF0omPa2Ow3cefYoQKVqOVS5P3rzA6ieJQljXJdZ+cam8TsqfP1JsNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691827320; 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=GPp8buyL4rEL2kBq1cF4wHR5ABeZCBiyVTXfTU2JfoY=; b=DF2ZIC/bmG+qEj7jQ8Cm3wnYQJJJLw94vTJ/W6428iz/RoWC0nxMiZ5B9yqQDTLtW0FnF3 Rg6vLzmGcj1zIIiu0/hAhl66eYclgaIJmOKQzSnW+GerDiigwgjUZUSTgs/8Q52sSKW6kf 2DJZiZfsC9mpsI8ETjxM28kyvmQtYFXNMmpOozbaV6B3R7E5IoF7svHfJAeJF6/d1fVtjg 9JKAbxa9wmwm8D89OgYparSFsYTHnubKC/8C+p+4h9p2vim8sXqQzX6qJJ8o7eUBRP1vN4 IkB3/r4kTeIdV2ytRCrSyRnVM/SGBjcdi8G4FywBJ28VmckohVsdxiWlptV9eQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691827320; a=rsa-sha256; cv=none; b=NRMoT5hIIAiJQFcqz+UQLW0roU5xaajasgJMidUnEmfBwxZKA8zJ8ehKLRNIqz+tT/yRs+ kviCMdymA4Ag4j2eP5w2K4TkAq8/BxFujf+YU9LMKdZ7oihS0mKz6rzKfjNh1wmdf9CCXQ qZgnfqidQeoAfXjbEaRXkxTkO9NWWii7wIdf/JCF/Shl6VQwGdg8/KK3BZOsOcEtaHoZue z6hVDXjanvqQe11w6DqapkcSiqWkJWhPvmwStlapJhxCY3KfsW85uvNn6/P5DdmBflCpew WN64mbxmMJU5kFelu2Tyn/FsZCzFzTroSlaigvaj6AfcFodTE5+21u5J3prpiw== 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 4RNCmm0wR2z1CLg; Sat, 12 Aug 2023 08:02:00 +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 37C820U9091109; Sat, 12 Aug 2023 08:02:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37C820uA091106; Sat, 12 Aug 2023 08:02:00 GMT (envelope-from git) Date: Sat, 12 Aug 2023 08:02:00 GMT Message-Id: <202308120802.37C820uA091106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 543cf924bcdc - main - 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/main X-Git-Reftype: branch X-Git-Commit: 543cf924bcdcf064fed417ec3d66000ef66194d2 Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=543cf924bcdcf064fed417ec3d66000ef66194d2 commit 543cf924bcdcf064fed417ec3d66000ef66194d2 Author: Shailend Chand AuthorDate: 2023-08-12 07:59:26 +0000 Commit: Xin LI CommitDate: 2023-08-12 08:01:53 +0000 gve: Simplify tx loop over buffer ring Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41281 --- 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);