From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 84A5BA0093; Fri, 22 May 2020 11:23:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 74D2B1D96E; Fri, 22 May 2020 11:22:50 +0200 (CEST) Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by dpdk.org (Postfix) with ESMTP id 4341E1D94F for ; Fri, 22 May 2020 11:22:44 +0200 (CEST) Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 1473ADFC0160A38CB0AE for ; Fri, 22 May 2020 17:22:39 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Fri, 22 May 2020 17:22:36 +0800 From: "Wei Hu (Xavier)" To: Date: Fri, 22 May 2020 17:21:16 +0800 Message-ID: <1590139278-11046-4-git-send-email-xavier.huwei@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590139278-11046-1-git-send-email-xavier.huwei@huawei.com> References: <1590139278-11046-1-git-send-email-xavier.huwei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 3/5] net/hns3: fix preparing sending packets less than 60 bytes X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Currently, when running testpmd application based on hns3 network engine with csum fwd mode by "set fwd csum" command in the prompt line, sending 42 consecutive bytes of arp packets to network port with packets generator, But in fact hardware can't send the arp packets and the related logs as below: "Preparing packet burst to failed: Invalid argument" The hardware doesn't support transmit packets less than 60 bytes, and in the '.tx_pkt_burst' ops implementation function named hns3_xmit_pkts appending operation has been added for less than 60 bytes packets. So the interception needs to be removed in the '.tx_pkt_prepare' ops implementation function named hns3_prep_pkts. Fixes: de620754a109 ("net/hns3: fix sending packets less than 60 bytes") Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations") Cc: stable@dpdk.org Signed-off-by: Wei Hu (Xavier) Signed-off-by: Hao Chen Signed-off-by: Chengchang Tang --- drivers/net/hns3/hns3_rxtx.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 8b3ced1..25ba3b8 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -2313,12 +2313,6 @@ hns3_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, for (i = 0; i < nb_pkts; i++) { m = tx_pkts[i]; - /* check the size of packet */ - if (m->pkt_len < RTE_ETHER_MIN_LEN) { - rte_errno = EINVAL; - return i; - } - if (hns3_pkt_is_tso(m) && (hns3_pkt_need_linearized(m, m->nb_segs) || hns3_check_tso_pkt_valid(m))) { -- 2.7.4