DPDK usage discussions
 help / color / mirror / Atom feed
From: "Александр Киселев" <kiselev99@gmail.com>
To: Matt Laswell <laswell@infinite.io>
Cc: users <users@dpdk.org>
Subject: Re: [dpdk-users] ipv4 fragmentation
Date: Fri, 12 Aug 2016 20:59:19 +0300	[thread overview]
Message-ID: <CAMKNYbyObBMn7TEY_1mhAY4sBjoL66mee080hEtteQgMcmMExA@mail.gmail.com> (raw)
In-Reply-To: <CA+GnqAoZBrRdAZfZP+a+A=5Mu12OX1y5FZPOGif=dtBKEY+Z7Q@mail.gmail.com>

It looks like the packet length and data length are set properly.

According to my log data I have two fragments:

#1 fragment
pkt_len=1518, 2 segments:
data_len=38 and data_len=1480

#2 fragment
pkt_len=1066, 2 segments:
data_len=38 and data_len=1028

For each fragment sum of the data lengths of all segmens equal to the
pkt_len value.



2016-08-12 20:44 GMT+03:00 Matt Laswell <laswell@infinite.io>:

> I've found that if both the packet length and data length fields in an
> mbuf aren't set properly, DPDK will quietly drop it on the floor when I try
> to send it.  I don't know if that's the cause of your problems, but it's
> one of the first places that I would look.
>
> --
> Matt Laswell
> Principal Software Engineer, infinite io
> laswell@infinite.io
>
>
> On Fri, Aug 12, 2016 at 12:32 PM, Александр Киселев <kiselev99@gmail.com>
> wrote:
>
>> Hi!
>>
>> I am trying to use rte_ipv4_fragment_packet() function, but so far all
>> attemps has been unsuccessful.
>>
>> Fragment function gets a packet, successfuly splits it to the two packets,
>> then I add an L2 header to the each of resulting fragments
>> and send the fragments using rte_eth_tx_burst() to the wire. All steps of
>> the above process are succesfully completed without any error, but I don't
>> see the fragments on the wire and PMD stat function also reports that no
>> packets were transmitted.
>>
>> I've rechecked many times that L2 header of each fragments is correct,
>> that
>> values of l2_len and l3_len rte_mbuf members are correct,
>> that the rte_eth_tx_burst() result is correct (2 packets). The sizes of
>> fragments are also correct.
>>
>> What did I miss?
>>
>> I am using DPDK 2.2.0 and ixgbe PMD driver.
>>
>> This is some log data of a test run.
>> ==
>> ==
>> The original packet that has to be fragmented (including L2 header data)
>>
>> dump mbuf at 0x0x7f7d103870c0, phys=215787140, buf_len=2176
>>   pkt_len=2546, ol_flags=40000000000003, nb_segs=2, in_port=0
>>   segment at 0x0x7f7d103870c0, data=0x0x7f7d103871c0, data_len=1518
>>   Dump data at [0x7f7d103871c0], len=50
>> 00000000: 00 1B 21 3C 69 45 90 E2 BA 00 3C CC 81 00 00 86 |
>> ..!<iE....<.....
>> 00000010: 08 00 45 00 09 E0 7E D1 00 00 40 01 00 00 C0 A8 |
>> ..E...~...@.....
>> 00000020: 7D 01 C0 A8 7D 02 00 00 FD FD 0B 2D 00 01 56 FF |
>> }...}......-..V.
>> 00000030: AD 57 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | .W
>>   segment at 0x0x7f7d10386780, data=0x0x7f7d103868a6, data_len=1028
>>
>>
>> fragmentation is needed. mtu 1500, pkt len 2546, data len 1518, l2 len 18,
>> l3 len 20
>> num fragment needed: 2
>>
>> ==
>> ==
>> Fragments (including L2 header data):
>>
>> fragment #0, pkt len 1518, l2 len 18, l3 len 20, data len 38
>>
>> dump mbuf at 0x0x7f7d10388340, phys=2157883c0, buf_len=2176
>>   pkt_len=1518, ol_flags=40000000000000, nb_segs=2, in_port=255
>>   segment at 0x0x7f7d10388340, data=0x0x7f7d1038842e, data_len=38
>>   Dump data at [0x7f7d1038842e], len=38
>> 00000000: 00 1B 21 3C 69 45 90 E2 BA 00 3C CC 81 00 00 86 |
>> ..!<iE....<.....
>> 00000010: 08 00 45 00 05 DC 7E D1 20 00 40 01 00 00 C0 A8 | ..E...~.
>> .@.....
>> 00000020: 7D 01 C0 A8 7D 02 |  |  |  |  |  |  |  |  |  |  | }...}.
>>   segment at 0x0x7f7d0ef87dc0, data=0x0x7f7d103871e6, data_len=1480
>>   Dump data at [0x7f7d103871e6], len=12
>> 00000000: 00 00 FD FD 0B 2D 00 01 56 FF AD 57 |  |  |  |  | .....-..V..W
>>
>>
>> fragment #1, pkt len 1066, l2 len 18, l3 len 20, data len 38
>>
>> dump mbuf at 0x0x7f7d10388c80, phys=215788d00, buf_len=2176
>>   pkt_len=1066, ol_flags=40000000000000, nb_segs=2, in_port=255
>>   segment at 0x0x7f7d10388c80, data=0x0x7f7d10388d6e, data_len=38
>>   Dump data at [0x7f7d10388d6e], len=38
>> 00000000: 00 1B 21 3C 69 45 90 E2 BA 00 3C CC 81 00 00 86 |
>> ..!<iE....<.....
>> 00000010: 08 00 45 00 04 18 7E D1 00 B9 40 01 00 00 C0 A8 |
>> ..E...~...@.....
>> 00000020: 7D 01 C0 A8 7D 02 |  |  |  |  |  |  |  |  |  |  | }...}.
>>   segment at 0x0x7f7d0ef87480, data=0x0x7f7d103868a6, data_len=1028
>>   Dump data at [0x7f7d103868a6], len=12
>> 00000000: C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB |  |  |  |  | ............
>> lcore 1 SEND
>>
>> ==
>> ==
>> sending 2 packets
>> sending result: 2
>>
>>
>> --
>> --
>> Kiselev Alexander
>>
>
>


-- 
--
Kiselev Alexander

  reply	other threads:[~2016-08-12 17:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12 17:32 Александр Киселев
2016-08-12 17:44 ` Matt Laswell
2016-08-12 17:59   ` Александр Киселев [this message]
2016-08-12 19:42     ` Stephen Hemminger
2016-08-12 21:01       ` Александр Киселев
2016-08-12 21:08         ` Александр Киселев
2016-08-13 16:34           ` Александр Киселев

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=CAMKNYbyObBMn7TEY_1mhAY4sBjoL66mee080hEtteQgMcmMExA@mail.gmail.com \
    --to=kiselev99@gmail.com \
    --cc=laswell@infinite.io \
    --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).