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 C3A6EA00C5; Mon, 14 Feb 2022 12:25:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E70AC41152; Mon, 14 Feb 2022 12:25:47 +0100 (CET) Received: from office2.cesnet.cz (office2.cesnet.cz [195.113.144.244]) by mails.dpdk.org (Postfix) with ESMTP id 7BB6D41141 for ; Mon, 14 Feb 2022 12:25:46 +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 49825400075; Mon, 14 Feb 2022 12:25:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2-2020; t=1644837946; bh=Z7WpiQubh23t99GzlwdT4S4Ro+9Oa7nm3+mNNwQtvdw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=K5ScO4ZPZ0xT743SKGqOMIUYXKNk+xoo+4Y4XCE47/aXi71n9sTIaxzReeffLdHKW 0xIytVRGN5gWsH5oUQJPSI951LVVEYkDUosMl5yX/7reTjfuiwJ6Ec2yj80qqRabP/ czbC3LZxeS4It5SugTf43OqbpLH/zHTCPaYXlUUjb8/eHFu86Fuz4umzGT/hxr57T9 BDYIrCKDonfUnNVckUPmiXfc0BKALHgmRiXBSw6lw4My+cjZEsKzaGYJv0OhwZw5Z/ zXVtE96TsHGFc2MqX1rmutELVaRpl7yqs91siRQNyVUsowRyrlhIZSbDViM8Soc6pY syrXZ+NBOJ8kA== From: spinler@cesnet.cz To: dev@dpdk.org Cc: Martin Spinler Subject: [PATCH 3/6] drivers/nfb: do not report zero-sized TX burst Date: Mon, 14 Feb 2022 12:25:38 +0100 Message-Id: <20220214112541.29782-3-spinler@cesnet.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220214112541.29782-1-spinler@cesnet.cz> References: <20220214112541.29782-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