* [dpdk-users] order of 'segmented' UDP packets
@ 2018-09-26 8:25 Sofia Baran
0 siblings, 0 replies; only message in thread
From: Sofia Baran @ 2018-09-26 8:25 UTC (permalink / raw)
To: users
Hi,
when creating an UDP packet, I need to use two mbufs - one containing
the UDP header (hdr) and another holding the payload (pay):
struct rte_mbuf* hdr = rte_pktmbuf_alloc(hdrmp);
struct rte_mbuf* pay = rte_pktmbuf_alloc(paymp);
// filling ether, IP, UDP header
...
ip_hdr->version_ihl = 0x40 | 0x05; // (*) without 0x05 order it ok
...
// setting sizes and linkage
hdr->data_len = sizeof(struct ether_hdr) + sizeof(struct ipv4_hdr) +
sizeof(struct udp_hdr);
pay->data_len = payloadSize;
hdr->pkt_len = hdr->data_len + pay->data_len;
pay->pkt_len = hdr->pkt_len;
hdr->next = pay;
hdr->nb_segs = 2;
When sending plenty of such UDP packets using rte_eth_tx_burst(), all of
them were sent correctly, but the sending order seems to be random. When
using just a single mbuf for an UDP packet, the sending order is always
the order of the packets in the tx array - which is what I expect. Using
the header-payload-separation approach and omitting the IP header size
info in the ip_hdr field - resulting in a wrong IP packet - the sending
order gets ok.
I'm using the mlx5 PMD. Could it be some offload mechanisms, influencing
the sending order? Maybe someone can help.
Thanks and best regards
Sofia Baran
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-09-26 8:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26 8:25 [dpdk-users] order of 'segmented' UDP packets Sofia Baran
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).