DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/iavf: remove extra check in iavf vector Tx
@ 2022-02-22 22:48 Kathleen Capella
  2022-03-01 11:51 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Kathleen Capella @ 2022-02-22 22:48 UTC (permalink / raw)
  To: Bruce Richardson, Konstantin Ananyev, Jingjing Wu, Beilei Xing
  Cc: dev, nd, honnappa.nagarahalli, Kathleen Capella

In the vector Tx path, the function iavf_xmit_pkts_vec_xxx compares nb_pkts
and the txq->rs_thresh and passes the minimum of these as an argument to
iavf_xmit_fixed_burst_vec_xxx. Inside iavf_xmit_fixed_burst_vec_xxx, the
same check is performed again. This patch removes the redundant check from
the iavf_xmit_fixed_burst_vec_xxx function.

Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   | 4 +---
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 4 +---
 drivers/net/iavf/iavf_rxtx_vec_sse.c    | 4 +---
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
index b6ef1aea77..d6243b96e2 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
@@ -1450,9 +1450,6 @@ iavf_xmit_fixed_burst_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
 	uint64_t flags = IAVF_TX_DESC_CMD_EOP | IAVF_TX_DESC_CMD_ICRC;
 	uint64_t rs = IAVF_TX_DESC_CMD_RS | flags;
 
-	/* cross rx_thresh boundary is not allowed */
-	nb_pkts = RTE_MIN(nb_pkts, txq->rs_thresh);
-
 	if (txq->nb_free < txq->free_thresh)
 		iavf_tx_free_bufs(txq);
 
@@ -1516,6 +1513,7 @@ iavf_xmit_pkts_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
 	while (nb_pkts) {
 		uint16_t ret, num;
 
+		/* cross rs_thresh boundary is not allowed */
 		num = (uint16_t)RTE_MIN(nb_pkts, txq->rs_thresh);
 		ret = iavf_xmit_fixed_burst_vec_avx2(tx_queue, &tx_pkts[nb_tx],
 						     num);
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
index 6ff38ac368..7319d4cb65 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
@@ -1907,9 +1907,6 @@ iavf_xmit_fixed_burst_vec_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,
 	uint64_t flags = IAVF_TX_DESC_CMD_EOP | IAVF_TX_DESC_CMD_ICRC;
 	uint64_t rs = IAVF_TX_DESC_CMD_RS | flags;
 
-	/* cross rx_thresh boundary is not allowed */
-	nb_pkts = RTE_MIN(nb_pkts, txq->rs_thresh);
-
 	if (txq->nb_free < txq->free_thresh)
 		iavf_tx_free_bufs_avx512(txq);
 
@@ -1975,6 +1972,7 @@ iavf_xmit_pkts_vec_avx512_cmn(void *tx_queue, struct rte_mbuf **tx_pkts,
 	while (nb_pkts) {
 		uint16_t ret, num;
 
+		/* cross rs_thresh boundary is not allowed */
 		num = (uint16_t)RTE_MIN(nb_pkts, txq->rs_thresh);
 		ret = iavf_xmit_fixed_burst_vec_avx512(tx_queue, &tx_pkts[nb_tx],
 						       num, offload);
diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index d582a36326..717a227b2c 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -1120,9 +1120,6 @@ iavf_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 	uint64_t rs = IAVF_TX_DESC_CMD_RS | flags;
 	int i;
 
-	/* cross rx_thresh boundary is not allowed */
-	nb_pkts = RTE_MIN(nb_pkts, txq->rs_thresh);
-
 	if (txq->nb_free < txq->free_thresh)
 		iavf_tx_free_bufs(txq);
 
@@ -1189,6 +1186,7 @@ iavf_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 	while (nb_pkts) {
 		uint16_t ret, num;
 
+		/* cross rs_thresh boundary is not allowed */
 		num = (uint16_t)RTE_MIN(nb_pkts, txq->rs_thresh);
 		ret = iavf_xmit_fixed_burst_vec(tx_queue, &tx_pkts[nb_tx], num);
 		nb_tx += ret;
-- 
2.27.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH] net/iavf: remove extra check in iavf vector Tx
  2022-02-22 22:48 [PATCH] net/iavf: remove extra check in iavf vector Tx Kathleen Capella
@ 2022-03-01 11:51 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2022-03-01 11:51 UTC (permalink / raw)
  To: Kathleen Capella, Richardson, Bruce, Ananyev, Konstantin, Wu,
	Jingjing, Xing, Beilei
  Cc: dev, nd, honnappa.nagarahalli



> -----Original Message-----
> From: Kathleen Capella <kathleen.capella@arm.com>
> Sent: Wednesday, February 23, 2022 6:48 AM
> To: Richardson, Bruce <bruce.richardson@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; nd@arm.com; honnappa.nagarahalli@arm.com; Kathleen
> Capella <kathleen.capella@arm.com>
> Subject: [PATCH] net/iavf: remove extra check in iavf vector Tx
> 

remove "iavf" in the title.

> In the vector Tx path, the function iavf_xmit_pkts_vec_xxx compares nb_pkts
> and the txq->rs_thresh and passes the minimum of these as an argument to
> iavf_xmit_fixed_burst_vec_xxx. Inside iavf_xmit_fixed_burst_vec_xxx, the
> same check is performed again. This patch removes the redundant check
> from the iavf_xmit_fixed_burst_vec_xxx function.
> 
> Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-01 11:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-22 22:48 [PATCH] net/iavf: remove extra check in iavf vector Tx Kathleen Capella
2022-03-01 11:51 ` Zhang, Qi Z

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).