patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Xiao Zhang <xiao.zhang@intel.com>
Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>,
	Xiaolong Ye <xiaolong.ye@intel.com>,
	dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/ixgbe: check for illegal Tx packets' has been queued to LTS release 18.11.7
Date: Thu, 27 Feb 2020 17:37:56 +0000	[thread overview]
Message-ID: <20200227173807.28004-5-ktraynor@redhat.com> (raw)
In-Reply-To: <20200227173807.28004-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/0b6691a41938f8844575f9426ad8b69f39bbfaad

Thanks.

Kevin.

---
From 0b6691a41938f8844575f9426ad8b69f39bbfaad Mon Sep 17 00:00:00 2001
From: Xiao Zhang <xiao.zhang@intel.com>
Date: Mon, 17 Feb 2020 22:51:15 +0800
Subject: [PATCH] net/ixgbe: check for illegal Tx packets

[ upstream commit fc6f59a0d61b3a27b04bf0603c3fc62afb2fa49a ]

For ixgbe, there is restriction that data buffers of any transmitted
packet must include at least 12 bytes of the src/dst Ethernet MAC
addresses as well as 2 bytes of the Type/Len field, otherwise, tx hang
would happen.

This patch adds check for those illegal packets and protects TX from
hanging.

Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation")

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 6 ++++++
 drivers/net/ixgbe/ixgbe_rxtx.h | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 7f98db15a4..08a79a0ea9 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -986,4 +986,10 @@ ixgbe_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		}
 
+		/* check the size of packet */
+		if (m->pkt_len < IXGBE_TX_MIN_PKT_LEN) {
+			rte_errno = EINVAL;
+			return i;
+		}
+
 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.h b/drivers/net/ixgbe/ixgbe_rxtx.h
index 39378f7547..7ae16967c6 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.h
+++ b/drivers/net/ixgbe/ixgbe_rxtx.h
@@ -54,4 +54,6 @@
 #define IXGBE_TX_MAX_SEG                    40
 
+#define IXGBE_TX_MIN_PKT_LEN		     14
+
 #define IXGBE_PACKET_TYPE_MASK_82599        0X7F
 #define IXGBE_PACKET_TYPE_MASK_X550         0X10FF
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-27 17:26:23.961231347 +0000
+++ 0005-net-ixgbe-check-for-illegal-Tx-packets.patch	2020-02-27 17:26:23.625831617 +0000
@@ -1 +1 @@
-From fc6f59a0d61b3a27b04bf0603c3fc62afb2fa49a Mon Sep 17 00:00:00 2001
+From 0b6691a41938f8844575f9426ad8b69f39bbfaad Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fc6f59a0d61b3a27b04bf0603c3fc62afb2fa49a ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 7b398f1a1b..f839bcaab7 100644
+index 7f98db15a4..08a79a0ea9 100644
@@ -29 +30 @@
-@@ -987,4 +987,10 @@ ixgbe_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -986,4 +986,10 @@ ixgbe_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
@@ -41 +42 @@
-index 000c5b1194..20a8b291d4 100644
+index 39378f7547..7ae16967c6 100644


  parent reply	other threads:[~2020-02-27 17:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 17:37 [dpdk-stable] patch 'examples/fips_validation: fix AES-GCM cipher length parsing' " Kevin Traynor
2020-02-27 17:37 ` [dpdk-stable] patch 'examples/fips_validation: fix string token for CT length' " Kevin Traynor
2020-02-27 17:37 ` [dpdk-stable] patch 'net/qede: fix VF reload' " Kevin Traynor
2020-02-27 17:37 ` [dpdk-stable] patch 'net/qede: do not stop vport if not started' " Kevin Traynor
2020-02-27 17:37 ` Kevin Traynor [this message]
2020-02-27 17:37 ` [dpdk-stable] patch 'net/mlx5: fix tunnel flow priority' " Kevin Traynor
2020-02-27 17:37 ` [dpdk-stable] patch 'net/ixgbe: fix flow control mode setting' " Kevin Traynor
2020-02-27 17:37 ` [dpdk-stable] patch 'net/vhost: allocate interface name from heap' " Kevin Traynor
2020-02-27 17:38 ` [dpdk-stable] patch 'net/vhost: fix probing in secondary process' " Kevin Traynor
2020-02-27 17:38 ` [dpdk-stable] patch 'net/mlx5: fix L3 VXLAN RSS expansion' " Kevin Traynor
2020-02-27 17:38 ` [dpdk-stable] patch 'net/sfc: fix log format specifiers' " Kevin Traynor
2020-02-27 17:38 ` [dpdk-stable] patch 'net/fm10k: fix non-x86 build' " Kevin Traynor
2020-02-27 17:38 ` [dpdk-stable] patch 'examples/tep_term: remove redundant info get' " Kevin Traynor
2020-02-27 17:38 ` [dpdk-stable] patch 'app/testpmd: fix identifier size for port attach' " Kevin Traynor
2020-02-27 17:38 ` [dpdk-stable] patch 'net/mlx5: fix match on ethertype and CVLAN tag' " Kevin Traynor
2020-02-27 17:38 ` [dpdk-stable] patch 'doc: fix multi-producer enqueue figure in ring guide' " Kevin Traynor

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20200227173807.28004-5-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=stable@dpdk.org \
    --cc=xiao.zhang@intel.com \
    --cc=xiaolong.ye@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).