vPMD Tx function assumes that after the scatter of the
multi-segment packets the next packet will be a single segment packet.
This is not current as the function can return due to lack of resources
without sending all of the multi-segment mbufs sequence.
Fixes:
6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
}
/**
- * Count the number of continuous single segment packets. The first packet must
- * be a single segment packet.
+ * Count the number of continuous single segment packets.
*
* @param pkts
* Pointer to array of packets.
if (!pkts_n)
return 0;
- assert(NB_SEGS(pkts[0]) == 1);
/* Count the number of continuous single segment packets. */
- for (pos = 1; pos < pkts_n; ++pos)
+ for (pos = 0; pos < pkts_n; ++pos)
if (NB_SEGS(pkts[pos]) > 1)
break;
return pos;