patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
To: stable@dpdk.org, Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: "Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>,
	"Adrien Mazarguil" <adrien.mazarguil@6wind.com>
Subject: [dpdk-stable] [PATCH v2 01/12] net/mlx5: support Mellanox OFED 3.4
Date: Wed,  9 Nov 2016 10:57:40 +0100	[thread overview]
Message-ID: <939798ff32790eebc1fd59655222d20d163caf3c.1478683594.git.nelio.laranjeiro@6wind.com> (raw)
In-Reply-To: <cover.1478683594.git.nelio.laranjeiro@6wind.com>
In-Reply-To: <cover.1478683594.git.nelio.laranjeiro@6wind.com>

From: Nélio Laranjeiro <nelio.laranjeiro@6wind.com>

[ backported from upstream commit c904ae25feb4de94683963a774f726cff5b08a0c ]

Some macros are renamed by Mellanox OFED 3.4.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx5/Makefile    | 5 +++++
 drivers/net/mlx5/mlx5_prm.h  | 6 ++++++
 drivers/net/mlx5/mlx5_rxtx.c | 4 ++--
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
index f6d3938..2c13c30 100644
--- a/drivers/net/mlx5/Makefile
+++ b/drivers/net/mlx5/Makefile
@@ -116,6 +116,11 @@ mlx5_autoconf.h.new: $(RTE_SDK)/scripts/auto-config-h.sh
 		infiniband/mlx5_hw.h \
 		enum MLX5_ETH_VLAN_INLINE_HEADER_SIZE \
 		$(AUTOCONF_OUTPUT)
+	$Q sh -- '$<' '$@' \
+		HAVE_VERBS_MLX5_OPCODE_TSO \
+		infiniband/mlx5_hw.h \
+		enum MLX5_OPCODE_TSO \
+		$(AUTOCONF_OUTPUT)
 
 # Create mlx5_autoconf.h or update it in case it differs from the new one.
 
diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
index 4383009..e23d5cb 100644
--- a/drivers/net/mlx5/mlx5_prm.h
+++ b/drivers/net/mlx5/mlx5_prm.h
@@ -44,6 +44,8 @@
 #pragma GCC diagnostic error "-Wpedantic"
 #endif
 
+#include "mlx5_autoconf.h"
+
 /* Get CQE owner bit. */
 #define MLX5_CQE_OWNER(op_own) ((op_own) & MLX5_CQE_OWNER_MASK)
 
@@ -71,6 +73,10 @@
 /* Room for inline data in multi-packet WQE. */
 #define MLX5_MWQE64_INL_DATA 28
 
+#ifndef HAVE_VERBS_MLX5_OPCODE_TSO
+#define MLX5_OPCODE_TSO MLX5_OPCODE_LSO_MPW /* Compat with OFED 3.3. */
+#endif
+
 /* Subset of struct mlx5_wqe_eth_seg. */
 struct mlx5_wqe_eth_seg_small {
 	uint32_t rsvd0;
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index a13cbc7..cc62e78 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -908,7 +908,7 @@ mlx5_mpw_new(struct txq *txq, struct mlx5_mpw *mpw, uint32_t length)
 	mpw->wqe->mpw.eseg.rsvd2 = 0;
 	mpw->wqe->mpw.ctrl.data[0] = htonl((MLX5_OPC_MOD_MPW << 24) |
 					   (txq->wqe_ci << 8) |
-					   MLX5_OPCODE_LSO_MPW);
+					   MLX5_OPCODE_TSO);
 	mpw->wqe->mpw.ctrl.data[2] = 0;
 	mpw->wqe->mpw.ctrl.data[3] = 0;
 	mpw->data.dseg[0] = &mpw->wqe->mpw.dseg[0];
@@ -1107,7 +1107,7 @@ mlx5_mpw_inline_new(struct txq *txq, struct mlx5_mpw *mpw, uint32_t length)
 	mpw->wqe = &(*txq->wqes)[idx];
 	mpw->wqe->mpw_inl.ctrl.data[0] = htonl((MLX5_OPC_MOD_MPW << 24) |
 					       (txq->wqe_ci << 8) |
-					       MLX5_OPCODE_LSO_MPW);
+					       MLX5_OPCODE_TSO);
 	mpw->wqe->mpw_inl.ctrl.data[2] = 0;
 	mpw->wqe->mpw_inl.ctrl.data[3] = 0;
 	mpw->wqe->mpw_inl.eseg.mss = htons(length);
-- 
2.1.4

  parent reply	other threads:[~2016-11-09  9:58 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-08 10:36 [dpdk-stable] [PATCH 00/14] Patches for 16.07.2 stable branch Nelio Laranjeiro
2016-11-08 10:36 ` [dpdk-stable] [PATCH 01/14] net/mlx5: support Mellanox OFED 3.4 Nelio Laranjeiro
2016-11-08 10:36 ` [dpdk-stable] [PATCH 02/14] net/mlx5: fix possible NULL dereference in Rx path Nelio Laranjeiro
2016-11-08 10:36 ` [dpdk-stable] [PATCH 03/14] net/mlx5: fix inconsistent return value in flow director Nelio Laranjeiro
2016-11-08 10:36 ` [dpdk-stable] [PATCH 04/14] net/mlx5: fix Rx VLAN offload capability report Nelio Laranjeiro
2016-11-08 10:36 ` [dpdk-stable] [PATCH 05/14] net/mlx5: fix removing VLAN filter Nelio Laranjeiro
2016-11-08 10:36 ` [dpdk-stable] [PATCH 06/14] net/mlx5: refactor allocation of flow director queues Nelio Laranjeiro
2016-11-08 10:36 ` [dpdk-stable] [PATCH 07/14] net/mlx5: fix flow director drop mode Nelio Laranjeiro
2016-11-08 10:36 ` [dpdk-stable] [PATCH 08/14] net/mlx5: re-factorize functions Nelio Laranjeiro
2016-11-08 10:36 ` [dpdk-stable] [PATCH 09/14] net/mlx5: fix inline logic Nelio Laranjeiro
2016-11-08 10:36 ` [dpdk-stable] [PATCH 10/14] net/mlx5: fix Rx function selection Nelio Laranjeiro
2016-11-08 10:36 ` [dpdk-stable] [PATCH 11/14] net/mlx5: fix link status report Nelio Laranjeiro
2016-11-08 10:36 ` [dpdk-stable] [PATCH 12/14] net/mlx5: fix initialization in secondary process Nelio Laranjeiro
2016-11-08 10:36 ` [dpdk-stable] [PATCH 13/14] net/mlx5: fix link speed capability information Nelio Laranjeiro
2016-11-08 10:36 ` [dpdk-stable] [PATCH 14/14] net/mlx5: fix support for newer link speeds Nelio Laranjeiro
2016-11-09  5:39 ` [dpdk-stable] [PATCH 00/14] Patches for 16.07.2 stable branch Yuanhan Liu
2016-11-09  9:38   ` Nélio Laranjeiro
2016-11-09  9:57 ` [dpdk-stable] [PATCH v2 00/12] " Nelio Laranjeiro
2016-11-09 11:01   ` Yuanhan Liu
2016-11-09  9:57 ` Nelio Laranjeiro [this message]
2016-11-09  9:57 ` [dpdk-stable] [PATCH v2 02/12] net/mlx5: fix possible NULL dereference in Rx path Nelio Laranjeiro
2016-11-09  9:57 ` [dpdk-stable] [PATCH v2 03/12] net/mlx5: fix inconsistent return value in flow director Nelio Laranjeiro
2016-11-09  9:57 ` [dpdk-stable] [PATCH v2 04/12] net/mlx5: fix Rx VLAN offload capability report Nelio Laranjeiro
2016-11-09  9:57 ` [dpdk-stable] [PATCH v2 05/12] net/mlx5: fix removing VLAN filter Nelio Laranjeiro
2016-11-09  9:57 ` [dpdk-stable] [PATCH v2 06/12] net/mlx5: refactor allocation of flow director queues Nelio Laranjeiro
2016-11-09  9:57 ` [dpdk-stable] [PATCH v2 07/12] net/mlx5: fix flow director drop mode Nelio Laranjeiro
2016-11-09  9:57 ` [dpdk-stable] [PATCH v2 08/12] net/mlx5: re-factorize functions Nelio Laranjeiro
2016-11-09  9:57 ` [dpdk-stable] [PATCH v2 09/12] net/mlx5: fix inline logic Nelio Laranjeiro
2016-11-09  9:57 ` [dpdk-stable] [PATCH v2 10/12] net/mlx5: fix initialization in secondary process Nelio Laranjeiro
2016-11-09  9:57 ` [dpdk-stable] [PATCH v2 11/12] net/mlx5: fix link speed capability information Nelio Laranjeiro
2016-11-09  9:57 ` [dpdk-stable] [PATCH v2 12/12] net/mlx5: fix support for newer link speeds Nelio Laranjeiro

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=939798ff32790eebc1fd59655222d20d163caf3c.1478683594.git.nelio.laranjeiro@6wind.com \
    --to=nelio.laranjeiro@6wind.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=stable@dpdk.org \
    --cc=yuanhan.liu@linux.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).