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 A8D0DA0518 for ; Fri, 24 Jul 2020 14:00:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A0FF41C010; Fri, 24 Jul 2020 14:00:40 +0200 (CEST) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id 19C201C02A for ; Fri, 24 Jul 2020 14:00:40 +0200 (CEST) Received: by mail-wm1-f66.google.com with SMTP id f18so8040929wml.3 for ; Fri, 24 Jul 2020 05:00:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zYi38ef0CnNoyH2qQpJkWA/wksYi2XXljPsxmHGiowA=; b=q46IiTHFez+52SnNDqfrva/7WEz1Px6ftPyjzf1Dpbw5hGwN06sVpXdvMRkp94zy7o mn3rcn2xxVA09oMs2eUznUO9dTtf2+voQaMjI20dOTQeVHecxSwFvKLVAsQLVcY4g9zN AI5zvtZ/wbo67rcVNygWEjEJyWs37x8P4OiEVE4FzevLAmTgSl2SLmfjymi49w6rdtiz BS+A0TSGZwW2WYuOAJSNiog5M83Q+wdPTxXmP66GN0fU9NeMrluaJdCY9KY0VIeWoqLI PkcM67gQC51lrWnn9RqOt6RXWAw1YqWV5EYOBXqQDJTDMFrSSTKVIf7JgpcTSuvxcWyF xk8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zYi38ef0CnNoyH2qQpJkWA/wksYi2XXljPsxmHGiowA=; b=PCL/Qwpr3BjVmqyQmcSW12MPpkJn+ZFNgxcv+nvIno+LJaUXI0XxNq9JoECczpp+BX Z3MEiuGKc37aK8T7mEudPjT2bK9smiVpipgP8HeqX1C+6epeKMi6KRoPu/xgjguQK4mg NnPcNrao78lc9sY2vP9pzxEMLgYU85RqMAXIyZNegwpOeL4f5BxuO/usYENXdgphB/Dt SZvLfq6ZmGgRFI7cGOtyTzpPt4jP7ki/v4IM8ynRzrHnhYRGjEYGyiijS2YfDrwdycWa 6hlOURJWa+w3HGEPWnwAMSt+dRf6wcDAiST9AumWfYGHMHGAiMGDxj4ywYCb4BmoQNaF v1zA== X-Gm-Message-State: AOAM530ZVn6Y0We4p12V0x1yMcImkPhggD5XJlY98TVoj9w1etjk48I2 JpADUY9hvdaLXibHyLG1En0qmec2qvk= X-Google-Smtp-Source: ABdhPJxMuocXktHcS07RBb/sGicw3ed3FUZx+yCNQcPYsYzsck9JWpr9osGrYI6KqehXqGIP0cZrng== X-Received: by 2002:a1c:7f17:: with SMTP id a23mr8146399wmd.28.1595592039749; Fri, 24 Jul 2020 05:00:39 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id w14sm1143810wrt.55.2020.07.24.05.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:00:39 -0700 (PDT) From: luca.boccassi@gmail.com To: "Wei Hu (Xavier)" Cc: Hao Chen , Chengchang Tang , dpdk stable Date: Fri, 24 Jul 2020 12:57:22 +0100 Message-Id: <20200724120030.1863487-4-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/hns3: fix Tx less than 60 bytes' has been queued to stable release 19.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/26/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 6dbb90a12522d0d840821570b1ba9ed062a25bae Mon Sep 17 00:00:00 2001 From: "Wei Hu (Xavier)" Date: Fri, 22 May 2020 17:21:16 +0800 Subject: [PATCH] net/hns3: fix Tx less than 60 bytes [ upstream commit 16c374402fb88e9b9cb004e794156991da7a79a4 ] 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") 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 34dc389d9..dcaeab267 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -2104,12 +2104,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 < HNS3_MIN_FRAME_LEN) { - rte_errno = EINVAL; - return i; - } - #ifdef RTE_LIBRTE_ETHDEV_DEBUG ret = rte_validate_tx_offload(m); if (ret != 0) { -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-24 12:53:48.750857417 +0100 +++ 0004-net-hns3-fix-Tx-less-than-60-bytes.patch 2020-07-24 12:53:48.143003777 +0100 @@ -1,8 +1,10 @@ -From 16c374402fb88e9b9cb004e794156991da7a79a4 Mon Sep 17 00:00:00 2001 +From 6dbb90a12522d0d840821570b1ba9ed062a25bae Mon Sep 17 00:00:00 2001 From: "Wei Hu (Xavier)" Date: Fri, 22 May 2020 17:21:16 +0800 Subject: [PATCH] net/hns3: fix Tx less than 60 bytes +[ upstream commit 16c374402fb88e9b9cb004e794156991da7a79a4 ] + 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 @@ -18,7 +20,6 @@ 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 @@ -28,22 +29,22 @@ 1 file changed, 6 deletions(-) diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c -index 8b3ced116..25ba3b820 100644 +index 34dc389d9..dcaeab267 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, +@@ -2104,12 +2104,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) { +- if (m->pkt_len < HNS3_MIN_FRAME_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))) { + #ifdef RTE_LIBRTE_ETHDEV_DEBUG + ret = rte_validate_tx_offload(m); + if (ret != 0) { -- 2.20.1