DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ionic: fix Tx fragment limits
@ 2021-02-04 20:37 Andrew Boyer
  2021-02-05 11:45 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Boyer @ 2021-02-04 20:37 UTC (permalink / raw)
  To: dev; +Cc: Alfredo Cardigliano, Andrew Boyer

The reported nb_seg_max should include the main fragment in the
descriptor and the fragments in the accompanying SGL.

Update the Tx prep check as well.

These were missed when updating to the v1 Tx queue structures.

Fixes: 786c64763b50 ("net/ionic: clean up Tx queue version support")
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
---
 drivers/net/ionic/ionic_ethdev.c | 4 ++--
 drivers/net/ionic/ionic_rxtx.c   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index c9d8493f49..cffe899c07 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -74,8 +74,8 @@ static const struct rte_eth_desc_lim tx_desc_lim_v1 = {
 	.nb_max = IONIC_MAX_RING_DESC,
 	.nb_min = IONIC_MIN_RING_DESC,
 	.nb_align = 1,
-	.nb_seg_max = IONIC_TX_MAX_SG_ELEMS_V1,
-	.nb_mtu_seg_max = IONIC_TX_MAX_SG_ELEMS_V1,
+	.nb_seg_max = IONIC_TX_MAX_SG_ELEMS_V1 + 1,
+	.nb_mtu_seg_max = IONIC_TX_MAX_SG_ELEMS_V1 + 1,
 };
 
 static const struct eth_dev_ops ionic_eth_dev_ops = {
diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index 5ae9ecf400..99920109eb 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -596,7 +596,7 @@ ionic_prep_pkts(void *tx_queue __rte_unused, struct rte_mbuf **tx_pkts,
 	for (i = 0; i < nb_pkts; i++) {
 		txm = tx_pkts[i];
 
-		if (txm->nb_segs > IONIC_TX_MAX_SG_ELEMS) {
+		if (txm->nb_segs > IONIC_TX_MAX_SG_ELEMS_V1 + 1) {
 			rte_errno = -EINVAL;
 			break;
 		}
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH] net/ionic: fix Tx fragment limits
  2021-02-04 20:37 [dpdk-dev] [PATCH] net/ionic: fix Tx fragment limits Andrew Boyer
@ 2021-02-05 11:45 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2021-02-05 11:45 UTC (permalink / raw)
  To: Andrew Boyer, dev; +Cc: Alfredo Cardigliano

On 2/4/2021 8:37 PM, Andrew Boyer wrote:
> The reported nb_seg_max should include the main fragment in the
> descriptor and the fragments in the accompanying SGL.
> 
> Update the Tx prep check as well.
> 
> These were missed when updating to the v1 Tx queue structures.
> 
> Fixes: 786c64763b50 ("net/ionic: clean up Tx queue version support" >
> Signed-off-by: Andrew Boyer <aboyer@pensando.io>

Applied to dpdk-next-net/main, thanks.

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

end of thread, other threads:[~2021-02-05 11:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 20:37 [dpdk-dev] [PATCH] net/ionic: fix Tx fragment limits Andrew Boyer
2021-02-05 11:45 ` Ferruh Yigit

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