DPDK patches and discussions
 help / color / mirror / Atom feed
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>, dev@dpdk.org
Subject: [dpdk-dev] [PATCH v1 2/4] net/mlx4: fix useless flow rules synchronization
Date: Thu, 19 Oct 2017 18:11:05 +0200	[thread overview]
Message-ID: <1508429034-27506-3-git-send-email-adrien.mazarguil@6wind.com> (raw)
In-Reply-To: <1508429034-27506-1-git-send-email-adrien.mazarguil@6wind.com>

According to the original commit, Rx queues cannot be created nor destroyed
while the device is started. Synchronizing flow rules during such events is
unnecessary as it occurs later when starting the device.

Fixes: 79770826499b ("net/mlx4: drop live queue reconfiguration support")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx4/mlx4_rxq.c | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c
index 6fa48bc..65cf123 100644
--- a/drivers/net/mlx4/mlx4_rxq.c
+++ b/drivers/net/mlx4/mlx4_rxq.c
@@ -407,7 +407,6 @@ mlx4_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 	struct mlx4dv_cq dv_cq;
 	uint32_t mb_len = rte_pktmbuf_data_room_size(mp);
 	struct rte_mbuf *(*elts)[rte_align32pow2(desc)];
-	struct rte_flow_error error;
 	struct rxq *rxq;
 	struct mlx4_malloc_vec vec[] = {
 		{
@@ -609,19 +608,11 @@ mlx4_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 	}
 	DEBUG("%p: adding Rx queue %p to list", (void *)dev, (void *)rxq);
 	dev->data->rx_queues[idx] = rxq;
-	/* Enable associated flows. */
-	ret = mlx4_flow_sync(priv, &error);
-	if (!ret) {
-		/* Update doorbell counter. */
-		rxq->rq_ci = desc >> rxq->sges_n;
-		rte_wmb();
-		*rxq->rq_db = rte_cpu_to_be_32(rxq->rq_ci);
-		return 0;
-	}
-	ERROR("cannot re-attach flow rules to queue %u"
-	      " (code %d, \"%s\"), flow error type %d, cause %p, message: %s",
-	      idx, -ret, strerror(-ret), error.type, error.cause,
-	      error.message ? error.message : "(unspecified)");
+	/* Update doorbell counter. */
+	rxq->rq_ci = desc >> rxq->sges_n;
+	rte_wmb();
+	*rxq->rq_db = rte_cpu_to_be_32(rxq->rq_ci);
+	return 0;
 error:
 	dev->data->rx_queues[idx] = NULL;
 	ret = rte_errno;
@@ -654,7 +645,6 @@ mlx4_rx_queue_release(void *dpdk_rxq)
 			priv->dev->data->rx_queues[i] = NULL;
 			break;
 		}
-	mlx4_flow_sync(priv, NULL);
 	mlx4_rxq_free_elts(rxq);
 	if (rxq->wq)
 		claim_zero(ibv_destroy_wq(rxq->wq));
-- 
2.1.4

  parent reply	other threads:[~2017-10-19 16:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-19 16:11 [dpdk-dev] [PATCH v1 0/4] net/mlx4: RSS fixes Adrien Mazarguil
2017-10-19 16:11 ` [dpdk-dev] [PATCH v1 1/4] net/mlx4: use dedicated list iterator Adrien Mazarguil
2017-10-19 16:11 ` Adrien Mazarguil [this message]
2017-10-19 16:11 ` [dpdk-dev] [PATCH v1 3/4] net/mlx4: fix indirection table error rollback Adrien Mazarguil
2017-10-19 16:11 ` [dpdk-dev] [PATCH v1 4/4] net/mlx4: relax Rx queue configuration order Adrien Mazarguil
2017-10-23 19:18 ` [dpdk-dev] [PATCH v1 0/4] net/mlx4: RSS fixes Ferruh Yigit

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=1508429034-27506-3-git-send-email-adrien.mazarguil@6wind.com \
    --to=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=nelio.laranjeiro@6wind.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).