A bug in the vhost library for VDUSE devices resulted in multi-segments mbufs being treated by OVS.
This hard to debug situation resulted in incorrectly segmented packets with mlx5 nics, as the DPDK driver handles multi-segments mbufs fine even without requiring RTE_ETH_TX_OFFLOAD_MULTI_SEGS. While the bug is fixed in the vhost library, we could still hit similar situations with "normal" DPDK ports: for example, RTE_ETH_RX_OFFLOAD_SCATTER is requested for jumbo frames and a bug could be hidden there. Enforce only mono-segment mbufs are received. Link: https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/ Reported-at: https://issues.redhat.com/browse/FDP-2121 Signed-off-by: David Marchand <[email protected]> --- lib/netdev-dpdk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 3704145a57..0cb9fae9f0 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -2598,6 +2598,9 @@ netdev_dpdk_batch_init_packet_fields(struct dp_packet_batch *batch) struct dp_packet *packet; DP_PACKET_BATCH_FOR_EACH (i, packet, batch) { + /* Datapath does not support multi-segment buffers. */ + ovs_assert(packet->mbuf.nb_segs == 1); + dp_packet_reset_cutlen(packet); packet->packet_type = htonl(PT_ETH); packet->has_hash = !!(packet->mbuf.ol_flags & RTE_MBUF_F_RX_RSS_HASH); -- 2.51.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
