]> git.droids-corp.org - dpdk.git/commitdiff
net/ionic: fix Tx fragment limits
authorAndrew Boyer <aboyer@pensando.io>
Thu, 4 Feb 2021 20:37:10 +0000 (12:37 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 5 Feb 2021 11:44:16 +0000 (12:44 +0100)
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: 561176361047 ("net/ionic: clean up Tx queue version support")
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
drivers/net/ionic/ionic_ethdev.c
drivers/net/ionic/ionic_rxtx.c

index c9d8493f4971486cef25c24203060ca85deea2c8..cffe899c078c870ab76128a122890f6149843f7e 100644 (file)
@@ -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 = {
index 5ae9ecf400e6f045e0407a24fa89a56fd45a56b9..99920109eb906399c7d8e487b2f9e7c6778c3d6b 100644 (file)
@@ -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;
                }