DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
To: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH 3/5] net/hns3: fix preparing sending packets less than 60 bytes
Date: Fri, 22 May 2020 17:21:16 +0800	[thread overview]
Message-ID: <1590139278-11046-4-git-send-email-xavier.huwei@huawei.com> (raw)
In-Reply-To: <1590139278-11046-1-git-send-email-xavier.huwei@huawei.com>

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
"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) <xavier.huwei@huawei.com>
Signed-off-by: Hao Chen <chenhao164@huawei.com>
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 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))) {

  parent reply	other threads:[~2020-05-22  9:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22  9:21 [dpdk-dev] [PATCH 0/5] misc updates for hns3 PMD driver Wei Hu (Xavier)
2020-05-22  9:21 ` [dpdk-dev] [PATCH 1/5] net/hns3: replace PF vport id zero with private macro Wei Hu (Xavier)
2020-05-22  9:21 ` [dpdk-dev] [PATCH 2/5] net/hns3: fix promiscuous config not clear for PF on uninit Wei Hu (Xavier)
2020-05-22  9:21 ` Wei Hu (Xavier) [this message]
2020-05-22  9:21 ` [dpdk-dev] [PATCH 4/5] net/hns3: add RSS hash offload to port Rx configuration Wei Hu (Xavier)
2020-05-22  9:21 ` [dpdk-dev] [PATCH 5/5] net/hns3: fix key length when configuring RSS Wei Hu (Xavier)
2020-05-22 11:20 ` [dpdk-dev] [PATCH 0/5] misc updates for hns3 PMD driver Ferruh Yigit
2020-05-23  1:33   ` Wei Hu (Xavier)
2020-05-27 15:36 ` Ferruh Yigit
2020-05-28  1:35   ` Wei Hu (Xavier)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1590139278-11046-4-git-send-email-xavier.huwei@huawei.com \
    --to=xavier.huwei@huawei.com \
    --cc=dev@dpdk.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).