From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
To: Adrien Mazarguil <adrien.mazarguil@6wind.com>, dev@dpdk.org
Cc: Shahaf Shuler <shahafs@mellanox.com>
Subject: [dpdk-dev] [PATCH 4/5] net/mlx5: remove multiple drop RSS queues
Date: Tue, 1 Aug 2017 14:09:30 +0200 [thread overview]
Message-ID: <d606a2e54e094457ad1c61a53c23df88f4d4f2f4.1501588970.git.nelio.laranjeiro@6wind.com> (raw)
In-Reply-To: <cover.1501588970.git.nelio.laranjeiro@6wind.com>
In-Reply-To: <cover.1501588970.git.nelio.laranjeiro@6wind.com>
Since MLNX_OFED 4.1 this code is no more useful.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
drivers/net/mlx5/Makefile | 5 ----
drivers/net/mlx5/mlx5_flow.c | 55 ++++++++++++++------------------------------
2 files changed, 17 insertions(+), 43 deletions(-)
diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
index 8736de5..14b739a 100644
--- a/drivers/net/mlx5/Makefile
+++ b/drivers/net/mlx5/Makefile
@@ -104,11 +104,6 @@ mlx5_autoconf.h.new: FORCE
mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh
$Q $(RM) -f -- '$@'
$Q sh -- '$<' '$@' \
- HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP \
- infiniband/verbs_exp.h \
- enum IBV_EXP_FLOW_SPEC_ACTION_DROP \
- $(AUTOCONF_OUTPUT)
- $Q sh -- '$<' '$@' \
HAVE_VERBS_IBV_EXP_CQ_COMPRESSED_CQE \
infiniband/verbs_exp.h \
enum IBV_EXP_CQ_COMPRESSED_CQE \
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index d62ccff..7dd3ebb 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -52,13 +52,6 @@
#include "mlx5.h"
#include "mlx5_prm.h"
-/* Number of Work Queue necessary for the DROP queue. */
-#ifndef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
-#define MLX5_DROP_WQ_N 4
-#else
-#define MLX5_DROP_WQ_N 1
-#endif
-
static int
mlx5_flow_create_eth(const struct rte_flow_item *item,
const void *default_mask,
@@ -290,7 +283,7 @@ struct mlx5_flow {
struct rte_flow_drop {
struct ibv_exp_rwq_ind_table *ind_table; /**< Indirection table. */
struct ibv_qp *qp; /**< Verbs queue pair. */
- struct ibv_exp_wq *wqs[MLX5_DROP_WQ_N]; /**< Verbs work queue. */
+ struct ibv_exp_wq *wq; /**< Verbs work queue. */
struct ibv_cq *cq; /**< Verbs completion queue. */
};
@@ -580,10 +573,8 @@ priv_flow_validate(struct priv *priv,
}
if (action->mark && !flow->ibv_attr && !action->drop)
flow->offset += sizeof(struct ibv_exp_flow_spec_action_tag);
-#ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
if (!flow->ibv_attr && action->drop)
flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
-#endif
if (!action->queue && !action->drop) {
rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_HANDLE,
NULL, "no valid action");
@@ -1001,10 +992,8 @@ priv_flow_create_action_queue_drop(struct priv *priv,
struct rte_flow_error *error)
{
struct rte_flow *rte_flow;
-#ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
struct ibv_exp_flow_spec_action_drop *drop;
unsigned int size = sizeof(struct ibv_exp_flow_spec_action_drop);
-#endif
assert(priv->pd);
assert(priv->ctx);
@@ -1015,7 +1004,6 @@ priv_flow_create_action_queue_drop(struct priv *priv,
return NULL;
}
rte_flow->drop = 1;
-#ifdef HAVE_VERBS_IBV_EXP_FLOW_SPEC_ACTION_DROP
drop = (void *)((uintptr_t)flow->ibv_attr + flow->offset);
*drop = (struct ibv_exp_flow_spec_action_drop){
.type = IBV_EXP_FLOW_SPEC_ACTION_DROP,
@@ -1023,7 +1011,6 @@ priv_flow_create_action_queue_drop(struct priv *priv,
};
++flow->ibv_attr->num_of_specs;
flow->offset += sizeof(struct ibv_exp_flow_spec_action_drop);
-#endif
rte_flow->ibv_attr = flow->ibv_attr;
if (!priv->started)
return rte_flow;
@@ -1386,7 +1373,6 @@ static int
priv_flow_create_drop_queue(struct priv *priv)
{
struct rte_flow_drop *fdq = NULL;
- unsigned int i;
assert(priv->pd);
assert(priv->ctx);
@@ -1403,25 +1389,23 @@ priv_flow_create_drop_queue(struct priv *priv)
WARN("cannot allocate CQ for drop queue");
goto error;
}
- for (i = 0; i != MLX5_DROP_WQ_N; ++i) {
- fdq->wqs[i] = ibv_exp_create_wq(priv->ctx,
- &(struct ibv_exp_wq_init_attr){
- .wq_type = IBV_EXP_WQT_RQ,
- .max_recv_wr = 1,
- .max_recv_sge = 1,
- .pd = priv->pd,
- .cq = fdq->cq,
- });
- if (!fdq->wqs[i]) {
- WARN("cannot allocate WQ for drop queue");
- goto error;
- }
+ fdq->wq = ibv_exp_create_wq(priv->ctx,
+ &(struct ibv_exp_wq_init_attr){
+ .wq_type = IBV_EXP_WQT_RQ,
+ .max_recv_wr = 1,
+ .max_recv_sge = 1,
+ .pd = priv->pd,
+ .cq = fdq->cq,
+ });
+ if (!fdq->wq) {
+ WARN("cannot allocate WQ for drop queue");
+ goto error;
}
fdq->ind_table = ibv_exp_create_rwq_ind_table(priv->ctx,
&(struct ibv_exp_rwq_ind_table_init_attr){
.pd = priv->pd,
.log_ind_tbl_size = 0,
- .ind_tbl = fdq->wqs,
+ .ind_tbl = &fdq->wq,
.comp_mask = 0,
});
if (!fdq->ind_table) {
@@ -1457,10 +1441,8 @@ priv_flow_create_drop_queue(struct priv *priv)
claim_zero(ibv_destroy_qp(fdq->qp));
if (fdq->ind_table)
claim_zero(ibv_exp_destroy_rwq_ind_table(fdq->ind_table));
- for (i = 0; i != MLX5_DROP_WQ_N; ++i) {
- if (fdq->wqs[i])
- claim_zero(ibv_exp_destroy_wq(fdq->wqs[i]));
- }
+ if (fdq->wq)
+ claim_zero(ibv_exp_destroy_wq(fdq->wq));
if (fdq->cq)
claim_zero(ibv_destroy_cq(fdq->cq));
if (fdq)
@@ -1479,7 +1461,6 @@ static void
priv_flow_delete_drop_queue(struct priv *priv)
{
struct rte_flow_drop *fdq = priv->flow_drop_queue;
- unsigned int i;
if (!fdq)
return;
@@ -1487,10 +1468,8 @@ priv_flow_delete_drop_queue(struct priv *priv)
claim_zero(ibv_destroy_qp(fdq->qp));
if (fdq->ind_table)
claim_zero(ibv_exp_destroy_rwq_ind_table(fdq->ind_table));
- for (i = 0; i != MLX5_DROP_WQ_N; ++i) {
- if (fdq->wqs[i])
- claim_zero(ibv_exp_destroy_wq(fdq->wqs[i]));
- }
+ if (fdq->wq)
+ claim_zero(ibv_exp_destroy_wq(fdq->wq));
if (fdq->cq)
claim_zero(ibv_destroy_cq(fdq->cq));
rte_free(fdq);
--
2.1.4
next prev parent reply other threads:[~2017-08-01 12:09 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-01 12:09 [dpdk-dev] [PATCH 0/5] net/mlx5: cleanups Nelio Laranjeiro
2017-08-01 12:09 ` [dpdk-dev] [PATCH 1/5] net/mlx5: remove flow drop useless if branches Nelio Laranjeiro
2017-08-01 12:09 ` [dpdk-dev] [PATCH 2/5] net/mlx5: remove pdentic pragma Nelio Laranjeiro
2017-08-17 14:38 ` Ferruh Yigit
2017-08-22 9:10 ` Nélio Laranjeiro
2017-08-01 12:09 ` [dpdk-dev] [PATCH 3/5] net/mlx5: fix non working secondary process by removing it Nelio Laranjeiro
2017-08-17 14:38 ` Ferruh Yigit
2017-08-22 9:08 ` Nélio Laranjeiro
2017-08-01 12:09 ` Nelio Laranjeiro [this message]
2017-08-17 14:38 ` [dpdk-dev] [PATCH 4/5] net/mlx5: remove multiple drop RSS queues Ferruh Yigit
2017-08-22 8:59 ` Nélio Laranjeiro
2017-08-01 12:09 ` [dpdk-dev] [PATCH 5/5] net/mlx5: remove old MLNX_OFED 3.3 verification Nelio Laranjeiro
2017-08-17 14:38 ` Ferruh Yigit
2017-08-22 8:25 ` Nélio Laranjeiro
2017-08-02 15:36 ` [dpdk-dev] [PATCH 0/5] net/mlx5: cleanups Nélio Laranjeiro
2017-08-23 8:15 ` [dpdk-dev] [PATCH v2 0/8] " Nelio Laranjeiro
2017-08-23 10:07 ` Ferruh Yigit
2017-08-23 8:15 ` [dpdk-dev] [PATCH v2 1/8] net/mlx5: avoid reusing old queue's mbuf on reconfigure Nelio Laranjeiro
2017-08-23 8:15 ` [dpdk-dev] [PATCH v2 2/8] net/mlx5: prepare vector Rx ring at setup time Nelio Laranjeiro
2017-08-23 8:15 ` [dpdk-dev] [PATCH v2 3/8] net/mlx5: cleanup Rx ring in free functions Nelio Laranjeiro
2017-08-23 8:15 ` [dpdk-dev] [PATCH v2 4/8] net/mlx5: remove flow drop useless if branches Nelio Laranjeiro
2017-08-23 8:15 ` [dpdk-dev] [PATCH v2 5/8] net/mlx5: remove pdentic pragma Nelio Laranjeiro
2017-08-23 8:15 ` [dpdk-dev] [PATCH v2 6/8] net/mlx5: fix non working secondary process by removing it Nelio Laranjeiro
2017-08-23 8:15 ` [dpdk-dev] [PATCH v2 7/8] net/mlx5: remove multiple drop RSS queues Nelio Laranjeiro
2017-08-23 8:15 ` [dpdk-dev] [PATCH v2 8/8] net/mlx5: remove old MLNX_OFED 3.3 verification 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=d606a2e54e094457ad1c61a53c23df88f4d4f2f4.1501588970.git.nelio.laranjeiro@6wind.com \
--to=nelio.laranjeiro@6wind.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=shahafs@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).