From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7E2C1A00C5; Tue, 15 Feb 2022 13:56:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 98ECC41158; Tue, 15 Feb 2022 13:56:05 +0100 (CET) Received: from office2.cesnet.cz (office2.cesnet.cz [195.113.144.244]) by mails.dpdk.org (Postfix) with ESMTP id 32CEE41150 for ; Tue, 15 Feb 2022 13:56:03 +0100 (CET) Received: from emil.fit.vutbr.cz (unknown [IPv6:2001:67c:1220:80c:eb:e00e:9e81:ff5f]) (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 office2.cesnet.cz (Postfix) with ESMTPSA id EC43340006C; Tue, 15 Feb 2022 13:56:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2-2020; t=1644929763; bh=Z7WpiQubh23t99GzlwdT4S4Ro+9Oa7nm3+mNNwQtvdw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=HPTvqNxHizHxY7L58pjOlpUOExT50VXBmbe24yT691NLSQuzrUzSpClDrQ1qsd5Bv JtY2g5fV5ZJqmBhC0mmT4GRm5AyI8c6Hj/MHBcQYih6gd43om4ycKShYWwlRmNwTbg tud19yX6ogBKiIAh9EpDjELxcv6oblcU6cT6uKqZ9KC94C5nCKs/rScWCQSLovWqyo BBH9/E/YpryqY/xQUaPN1E+mnZtzsJy0XhzV9bdHls4Ys8GJodz/mJOLcU+kicUceV lWFqkt4NWXGaeVUad4NTk1b9zFYbOOMp+uT9gULpo4vtk19dlm7tsQi0Vr+TW0P0tE s5TPy5G5YY80g== From: spinler@cesnet.cz To: dev@dpdk.org Cc: Martin Spinler Subject: [PATCH v2 2/5] net/nfb: do not report zero-sized TX burst Date: Tue, 15 Feb 2022 13:55:40 +0100 Message-Id: <20220215125543.142108-3-spinler@cesnet.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220215125543.142108-1-spinler@cesnet.cz> References: <20220214112541.29782-1-spinler@cesnet.cz> <20220215125543.142108-1-spinler@cesnet.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Martin Spinler Zero-sized TX burst floods the log no more. Signed-off-by: Martin Spinler --- drivers/net/nfb/nfb_tx.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfb/nfb_tx.h b/drivers/net/nfb/nfb_tx.h index d3cbe3e6b3..910020e9e9 100644 --- a/drivers/net/nfb/nfb_tx.h +++ b/drivers/net/nfb/nfb_tx.h @@ -136,7 +136,10 @@ nfb_eth_ndp_tx(void *queue, struct ndp_packet packets[nb_pkts]; - if (unlikely(ndp->queue == NULL || nb_pkts == 0)) { + if (unlikely(nb_pkts == 0)) + return 0; + + if (unlikely(ndp->queue == NULL)) { RTE_LOG(ERR, PMD, "TX invalid arguments!\n"); return 0; } -- 2.35.1