From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id EBABA2BA9 for ; Wed, 21 Sep 2016 15:48:27 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id b130so92946740wmc.0 for ; Wed, 21 Sep 2016 06:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=Qaab7PfPpyGRXRqTL0KWW9n/1Zh6PInSjYKLipBqhVc=; b=u3mxi0tVQsNIafaMpHaxC6qLIN6p32JJYTPgToXK4MBk6VV9PH0UMb8uD3KRP6dyvV VdHl/m+27KnGuB6bfJSMpq8Z3zwI1mwf1shXFBOZbyw3bGJOSjtG1AGyZhOqpGxQ0rYr ovdOej4Fvlhiedhh209akir2Iy0JNbTZLWSutQlvoOrGJsb/ySESQGWshpu7lGsK6/Rf HQ0cRRtBJgbE4gzeKeAsSyzNk6dFCCVUvBXGnCVgIC+9p31sS+ech6egLk+Rqe05m3Qx abFa30B26dKAEZlOvVjnAdJ1wuf405QPog4B+LLYeyYH5qMmb7Z/iwe/Lc/TrJbVtRyA pjkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Qaab7PfPpyGRXRqTL0KWW9n/1Zh6PInSjYKLipBqhVc=; b=cRlJ675+VIOq77J77ERVuqhiD3uo7rlKP9X2Mb6uEHqa1RVtV4Qty4CGFC4VPEwRv2 AaNKwyozVL0nLhaVsVl4AD8aFGTWg5zjUVeKRuKRg6LDg7HmyydRg2sBZ/1/Vh+Ntk38 WZK1TPJyVw/xPGYryvL2gmrYDZzIgtWPJrJETZHI34vEm1JdhnbD6AOfExvkWx+skTRP BXK1sIB+KgaCXJt31ru0JN9/WxzxJID6kmruzqaeWDx6okuq+Q596mkxYdFFrUfY9MoO 1gMSzwhlyTiaTLrF13vWUExF9GDEHziz0W2iQZ0ityriOl21sbIf67Dbah1TtAmzbRUe xcaw== X-Gm-Message-State: AE9vXwOInddl3HyUJamFwRryXdpYkD7N+0UKr0Ma5/yn0ixWnXSh4Xw1tZE+M6e4igFGKkvR X-Received: by 10.28.74.21 with SMTP id x21mr3499759wma.16.1474465707287; Wed, 21 Sep 2016 06:48:27 -0700 (PDT) Received: from ping.vm.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id qf2sm33682742wjc.19.2016.09.21.06.48.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Sep 2016 06:48:26 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Adrien Mazarguil Date: Wed, 21 Sep 2016 15:48:12 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 Subject: [dpdk-dev] [PATCH] net/mlx5: support Mellanox OFED 3.4 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 13:48:28 -0000 Some macros are renamed by Mellanox OFED 3.4. Signed-off-by: Nelio Laranjeiro --- 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 3ef1949..90b47f0 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) @@ -78,6 +80,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 2a66d52..43dccc2 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -628,7 +628,7 @@ mlx5_mpw_new(struct txq *txq, struct mlx5_mpw *mpw, uint32_t length) mpw->wqe->eseg.rsvd1 = 0; mpw->wqe->eseg.rsvd2 = 0; mpw->wqe->ctrl[0] = htonl((MLX5_OPC_MOD_MPW << 24) | - (txq->wqe_ci << 8) | MLX5_OPCODE_LSO_MPW); + (txq->wqe_ci << 8) | MLX5_OPCODE_TSO); mpw->wqe->ctrl[2] = 0; mpw->wqe->ctrl[3] = 0; mpw->data.dseg[0] = (volatile struct mlx5_wqe_data_seg *) @@ -830,7 +830,7 @@ mlx5_mpw_inline_new(struct txq *txq, struct mlx5_mpw *mpw, uint32_t length) mpw->wqe = (volatile struct mlx5_wqe *)&(*txq->wqes)[idx].hdr; mpw->wqe->ctrl[0] = htonl((MLX5_OPC_MOD_MPW << 24) | (txq->wqe_ci << 8) | - MLX5_OPCODE_LSO_MPW); + MLX5_OPCODE_TSO); mpw->wqe->ctrl[2] = 0; mpw->wqe->ctrl[3] = 0; mpw->wqe->eseg.mss = htons(length); -- 2.1.4