From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id EEC36A0096 for ; Wed, 10 Apr 2019 18:44:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E6A141B105; Wed, 10 Apr 2019 18:44:33 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 180321B150 for ; Wed, 10 Apr 2019 18:44:32 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7CD5089C42; Wed, 10 Apr 2019 16:44:31 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-94.ams2.redhat.com [10.36.117.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6D5C95D961; Wed, 10 Apr 2019 16:44:30 +0000 (UTC) From: Kevin Traynor To: Dekel Peled Cc: Yongseok Koh , dpdk stable Date: Wed, 10 Apr 2019 17:43:17 +0100 Message-Id: <20190410164411.10546-9-ktraynor@redhat.com> In-Reply-To: <20190410164411.10546-1-ktraynor@redhat.com> References: <20190410164411.10546-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 10 Apr 2019 16:44:31 +0000 (UTC) Subject: [dpdk-stable] patch 'net/mlx5: fix Tx metadata for multi-segment packet' has been queued to LTS release 18.11.2 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 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 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 Acked-by: Yongseok Koh --- 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 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 Acked-by: Yongseok Koh