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>
.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 = {
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;
}