DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Leroy <maxime.leroy@6wind.com>
To: Matan Azrad <matan@nvidia.com>,
	Shahaf Shuler <shahafs@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 4/4] mlx5: re-add support of rx_queue_count for mlx5_rx_burst_mprq
Date: Tue, 10 Nov 2020 15:09:38 +0100	[thread overview]
Message-ID: <20201110140938.15046-5-maxime.leroy@6wind.com> (raw)
In-Reply-To: <20201110140938.15046-1-maxime.leroy@6wind.com>

The commit 014a6936008b ("Revert "net/mlx5: fix Rx queue count
calculation"")' has removed the support of rx_queue_count for
mlx5_rx_burst_mprq.

This commit has been revert because the fixes done on rx_queue_count
computation was wrong. Anyway, it's still true that the Rx queue count
calculation is same for any rx burts method since CQ handling is the
same for regular, vectorized, and multi-packet Rx queues.

Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 2cabd650..db3c6100 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -492,7 +492,7 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
 		used += n;
 		cqe = &(*rxq->cqes)[cq_ci & cqe_cnt];
 	}
-	used = RTE_MIN(used * sges_n, 1U << rxq->elts_n);
+	used = RTE_MIN(used * sges_n, cqe_cnt);
 	return used;
 }
 
@@ -515,7 +515,8 @@ mlx5_rx_descriptor_status(void *rx_queue, uint16_t offset)
 			container_of(rxq, struct mlx5_rxq_ctrl, rxq);
 	struct rte_eth_dev *dev = ETH_DEV(rxq_ctrl->priv);
 
-	if (dev->rx_pkt_burst != mlx5_rx_burst) {
+	if (dev->rx_pkt_burst == NULL ||
+	    dev->rx_pkt_burst == removed_rx_burst) {
 		rte_errno = ENOTSUP;
 		return -rte_errno;
 	}
-- 
2.27.0


      parent reply	other threads:[~2020-11-10 14:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 14:09 [dpdk-dev] [PATCH 0/4] net/mlx5: fixes for rx queue count calculation Maxime Leroy
2020-11-10 14:09 ` [dpdk-dev] [PATCH 1/4] Revert "net/mlx5: fix Rx queue count calculation" Maxime Leroy
2020-11-11 19:51   ` Slava Ovsiienko
2020-11-12 15:43     ` Maxime Leroy
2020-11-10 14:09 ` [dpdk-dev] [PATCH 2/4] net/mlx5: fixed used initialization in rx_queue_count Maxime Leroy
2020-11-10 14:09 ` [dpdk-dev] [PATCH 3/4] net/mlx5: fix Rx descriptor status returned value Maxime Leroy
2020-11-10 14:09 ` Maxime Leroy [this message]

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=20201110140938.15046-5-maxime.leroy@6wind.com \
    --to=maxime.leroy@6wind.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=shahafs@nvidia.com \
    --cc=viacheslavo@nvidia.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).