From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF3B5C433DF for ; Fri, 22 May 2020 09:23:22 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id A5395206C3 for ; Fri, 22 May 2020 09:23:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A5395206C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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