From: Sofia Baran <sofia.baran@gmx.net>
To: "users@dpdk.org" <users@dpdk.org>
Subject: [dpdk-users] order of 'segmented' UDP packets
Date: Wed, 26 Sep 2018 10:25:07 +0200 [thread overview]
Message-ID: <d2a50a8e-5c5e-7c44-ef5d-371ff87d79a1@gmx.net> (raw)
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
reply other threads:[~2018-09-26 8:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d2a50a8e-5c5e-7c44-ef5d-371ff87d79a1@gmx.net \
--to=sofia.baran@gmx.net \
--cc=users@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).