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 47914A0093; Mon, 7 Mar 2022 14:43:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D262440688; Mon, 7 Mar 2022 14:43:22 +0100 (CET) Received: from out203-205-221-153.mail.qq.com (out203-205-221-153.mail.qq.com [203.205.221.153]) by mails.dpdk.org (Postfix) with ESMTP id 86FC04014E for ; Mon, 7 Mar 2022 14:43:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1646660573; bh=bqNc7jqhxljVP8Qw8Arp8YkMwS/qXhMJiXaKSciuhlw=; h=From:To:Cc:Subject:Date; b=Zb1FtcKy5i0jAp0XJWS1LV7DzxVjD+Ho9uWW/Yd/+2+fIDGIOwF0knc4MzuaNS5r3 P/e8UtO+xbjLn8XwZYhEuSVh7ZPEq4deMkNnQ+CefZ5aKrF721Xq0nTMISiKQEx1+L jPGihOLK54A7d3ZndJvTDShkTspgF/cxO8rfaLKg= Received: from localhost.localdomain.localdomain ([119.3.119.19]) by newxmesmtplogicsvrszc9.qq.com (NewEsmtp) with SMTP id A9EA20AA; Mon, 07 Mar 2022 21:42:30 +0800 X-QQ-mid: xmsmtpt1646660550tjxha44xk Message-ID: X-QQ-XMAILINFO: N89bjyf9tBCOK8eK6WuXElKY5dQiy5GefYvW3eID/QwtoN0jF94VUg5dsKtxI1 bdMT9pFBiQEqND9P7Z5ExBQSA4FHU5FWdvGEC8vlxeaEnjPffa1vctRHm1RZyr1shGcEmhoVzwLP M8TR780QWlMaUDmnnjqiPPklDd5sPhSMVbW+kofEhpsV0j2sX27ax6Gpp0/tSgrHzGjQNkz0KQsJ ELdSl8yuw/ROGjE74LL0cDp0EZD1eXnFPRnysFLjPJThIQP8tJXgBhGYgNd/axjgKsuKzswLz6BF 3aChQnKC93Oneg8AVa2gMrAQnUlgdYFYkDGCsbKFcMfSJ7fwjLjdLq2XPAjaBt07PRu1DgzAvp4a oNSAeyLZx7e5nq+YVUz/xRfQDyshNMViyH0tLorR38jJKXGekPq+hj3jURyUHE16uyyA70h57JWA a2A5MYX8bZHAB8omiStAFhBtCEAUdyyMrV/EzsgEP6EH1zUH1e2bXGr77s7z4M7wcj/klOmDKeJn kOwKsIqMVaJj+RWyvR7ZdUdVfi3QAiFGHbaUYUWUJ2l02DVeBok/3mnxdNnaW34TrWmJCCkmJ0Zi N1Op4eWSQld3W2EU/Kw8/gkYimDUcxuLd+ziEHIjOMDcYcC8VrtD7zygDNpu3lA4aZANTOtSNiY6 BdWrubigJnQgU89/VfEUFwRolzqEKNJqhKYDwzusaqpyVp0V/kvTlfGy4hMV3cXtx4gJBI2aZBrT bb99HlooaV2HprQGp+FKZY6vy2OeQYzLs1Sdf5sv4blKOI4Ftf9LX0WocDjEATDTqf3EVF8K12zv n1fcNY2pElsQOJEYQyNrUh95lcCxQoUMhdfBiFmWx6H8uthoJssjdZwKwbx5G+Pk3MGvOBE1TBi2 08/M1WF+dkj8kY0jx+gTb3k6oNmC6nugE/MH9m2714hrCK7j7lpa4= From: Junjie Lin <277600718@qq.com> To: dev@dpdk.org Cc: linjunjie6@huawei.com, xuanziyang2@huawei.com, zhouguoyang@huawei.com Subject: [PATCH] net/hinic: fix Tx mbuf lenght problem Date: Mon, 7 Mar 2022 21:56:10 +0800 X-OQ-MSGID: <1646661370-97479-1-git-send-email-277600718@qq.com> X-Mailer: git-send-email 1.8.3.1 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: Junjie Lin The Tx mbuf needs to be ignored if the pkt_len member is zero. Fixes: 54faba2295bd ("net/hinic:adds Tx queue xstats members") Cc: stable@dpdk.org Signed-off-by: Junjie Lin --- drivers/net/hinic/hinic_pmd_tx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c index f09b1a6..99a5e3a 100644 --- a/drivers/net/hinic/hinic_pmd_tx.c +++ b/drivers/net/hinic/hinic_pmd_tx.c @@ -1144,6 +1144,12 @@ u16 hinic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, u16 nb_pkts) mbuf_pkt = *tx_pkts++; queue_info = 0; + if (unlikely(mbuf_pkt->pkt_len == 0)) { + rte_pktmbuf_free(mbuf_pkt); + txq->txq_stats.off_errs++; + continue; + } + /* 1. parse sge and tx offload info from mbuf */ if (unlikely(!hinic_get_sge_txoff_info(mbuf_pkt, &sqe_info, &off_info))) { -- 1.8.3.1