patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Dekel Peled <dekelp@mellanox.com>
Cc: Yongseok Koh <yskoh@mellanox.com>, dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/mlx5: fix Tx metadata for multi-segment packet' has been queued to LTS release 18.11.2
Date: Wed, 10 Apr 2019 17:43:17 +0100	[thread overview]
Message-ID: <20190410164411.10546-9-ktraynor@redhat.com> (raw)
In-Reply-To: <20190410164411.10546-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

Kevin Traynor

---
From 2664e32795d8a459f76aa691819eaf9f3fa80fa1 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 30 Jan 2019 08:43:29 +0200
Subject: [PATCH] net/mlx5: fix Tx metadata for multi-segment packet

[ upstream commit 7f4019d370f6edbd9d6ef26a9bc62442b0fd80a6 ]

Original patch implemented the use of match_metadata offload in the
different burst functions.
The concurrent use of match_metadata and multi_segs offloads was
not handled.

This patch updates function txq_scatter_v(), to pass metadata value
from mbuf to wqe, when indicated by offload flags.

Fixes: 6bd7fbd03c62 ("net/mlx5: support metadata as flow rule criteria")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 12 +++++++++---
 drivers/net/mlx5/mlx5_rxtx_vec_sse.h  | 11 ++++++++---
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index 883fe1bf9..38e915c5c 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -105,4 +105,6 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 	unsigned int n;
 	volatile struct mlx5_wqe *wqe = NULL;
+	bool metadata_ol =
+		txq->offloads & DEV_TX_OFFLOAD_MATCH_METADATA ? true : false;
 
 	assert(elts_n > pkts_n);
@@ -128,4 +130,7 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 		uint8_t *dseg;
 		uint8x16_t ctrl;
+		rte_be32_t metadata =
+			metadata_ol && (buf->ol_flags & PKT_TX_METADATA) ?
+			buf->tx_metadata : 0;
 
 		assert(segs_n);
@@ -165,7 +170,8 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 		vst1q_u8((void *)t_wqe, ctrl);
 		/* Fill ESEG in the header. */
-		vst1q_u16((void *)(t_wqe + 1),
-			  ((uint16x8_t) { 0, 0, cs_flags, rte_cpu_to_be_16(len),
-					  0, 0, 0, 0 }));
+		vst1q_u32((void *)(t_wqe + 1),
+			  ((uint32x4_t){ 0,
+					 cs_flags << 16 | rte_cpu_to_be_16(len),
+					 metadata, 0 }));
 		txq->wqe_ci = wqe_ci;
 	}
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index 14117c4bb..fb384efde 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -105,4 +105,6 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 	unsigned int n;
 	volatile struct mlx5_wqe *wqe = NULL;
+	bool metadata_ol =
+		txq->offloads & DEV_TX_OFFLOAD_MATCH_METADATA ? true : false;
 
 	assert(elts_n > pkts_n);
@@ -126,4 +128,7 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 		__m128i *t_wqe, *dseg;
 		__m128i ctrl;
+		rte_be32_t metadata =
+			metadata_ol && (buf->ol_flags & PKT_TX_METADATA) ?
+			buf->tx_metadata : 0;
 
 		assert(segs_n);
@@ -166,7 +171,7 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 		/* Fill ESEG in the header. */
 		_mm_store_si128(t_wqe + 1,
-				_mm_set_epi16(0, 0, 0, 0,
-					      rte_cpu_to_be_16(len), cs_flags,
-					      0, 0));
+				_mm_set_epi32(0, metadata,
+					      (rte_cpu_to_be_16(len) << 16) |
+					      cs_flags, 0));
 		txq->wqe_ci = wqe_ci;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-10 14:06:08.711865131 +0100
+++ 0009-net-mlx5-fix-Tx-metadata-for-multi-segment-packet.patch	2019-04-10 14:06:07.779296189 +0100
@@ -1,8 +1,10 @@
-From 7f4019d370f6edbd9d6ef26a9bc62442b0fd80a6 Mon Sep 17 00:00:00 2001
+From 2664e32795d8a459f76aa691819eaf9f3fa80fa1 Mon Sep 17 00:00:00 2001
 From: Dekel Peled <dekelp@mellanox.com>
 Date: Wed, 30 Jan 2019 08:43:29 +0200
 Subject: [PATCH] net/mlx5: fix Tx metadata for multi-segment packet
 
+[ upstream commit 7f4019d370f6edbd9d6ef26a9bc62442b0fd80a6 ]
+
 Original patch implemented the use of match_metadata offload in the
 different burst functions.
 The concurrent use of match_metadata and multi_segs offloads was
@@ -12,7 +14,6 @@
 from mbuf to wqe, when indicated by offload flags.
 
 Fixes: 6bd7fbd03c62 ("net/mlx5: support metadata as flow rule criteria")
-Cc: stable@dpdk.org
 
 Signed-off-by: Dekel Peled <dekelp@mellanox.com>
 Acked-by: Yongseok Koh <yskoh@mellanox.com>

  parent reply	other threads:[~2019-04-10 16:44 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 16:43 [dpdk-stable] patch 'net/pcap: fix memory leak' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/bonding: fix values of descriptor limits' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/sfc: log port ID as 16-bit unsigned integer on panic' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/sfc: remove control path logging from Rx queue count' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/sfc: fix logging from secondary process' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/virtio: set offload flag for jumbo frames' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/virtio: remove forward declaration' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'mbuf: fix a typo' " Kevin Traynor
2019-04-10 16:43 ` Kevin Traynor [this message]
2019-04-10 16:43 ` [dpdk-stable] patch 'net/bonding: fix Tx in 802.3ad mode' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/bnxt: support IOVA VA " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/avf: fix admin queue interrupt for ICE' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/bonding: fix slave Tx burst for mode 4' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/bonding: fix link status' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'doc: fix a minor typo in testpmd guide' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'ethdev: remove unused variable' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/qede: fix Tx packet prepare for tunnel packets' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/bonding: avoid warning for invalid port' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'test/pmd_perf: fix the way to drain the " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/virtio: fix in-order Tx path for split ring' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'vhost: fix sprintf with snprintf' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'mk: fix build of shared library with libbsd' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'devtools: add libelf dependency to build test' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'devtools: test build of zlib PMD' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'devtools: fix test of some build options' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'test/compress: fix missing header include' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'examples/ip_pipeline: disable build when no epoll' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'examples/vhost_crypto: fix dependency on vhost library' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'devtools: fix build test on FreeBSD' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/mlx: prefix private structure' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/tap: fix multi-process request' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'mempool/dpaa2: fix continuous print on empty pool' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'vhost: restore mbuf first when freeing zmbuf' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'vhost: fix potential use-after-free for zero copy mbuf' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'vhost: fix potential use-after-free for memory region' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'app/pdump: remove only created vdevs' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'crypto/virtio: use local log type' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/softnic: fix possible buffer overflow' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'drivers/net: fix shifting 32-bit signed variable 31 times' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'devtools: fix result of svg include check' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'doc: remove reference to rte.doc.mk in programmers guide' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'examples/ethtool: fix two typos' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'doc: fix link in Linux getting started guide' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'doc: fix PCI whitelist typo in prog " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'mk: fix AVX512 disabled warning on non x86' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'bus/vdev: fix debug message on probing' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'bus/vdev: fix hotplug twice' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'eal: fix check when retrieving current CPU affinity' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'eal: fix control threads pinnning' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'eal: restrict control threads to startup CPU affinity' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'eal: remove dead code in core list parsing' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'eal: fix core list validation with disabled cores' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/enic: fix flow director SCTP matching' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/enic: fix SCTP match for flow API' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/enic: allow flow mark ID 0' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/enic: check for unsupported flow item types' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/enic: reset VXLAN port regardless of overlay offload' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/enic: fix VXLAN match' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/enic: fix endianness in VLAN " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'doc: fix tag for inner RSS feature' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/mlx5: fix flow priorities probing error path' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/mlx5: fix hex dump of error completion' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/mlx5: fix sync when handling Tx completions' " 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=20190410164411.10546-9-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=dekelp@mellanox.com \
    --cc=stable@dpdk.org \
    --cc=yskoh@mellanox.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).