DPDK usage discussions
 help / color / mirror / Atom feed
From: "Александр Киселев" <kiselev99@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Matt Laswell <laswell@infinite.io>, users <users@dpdk.org>
Subject: Re: [dpdk-users] ipv4 fragmentation
Date: Sat, 13 Aug 2016 00:01:50 +0300	[thread overview]
Message-ID: <CAMKNYbxc3hVRCD-btrho74ou0a5uZzaHU_wDF_cJr4w=d3_RRA@mail.gmail.com> (raw)
In-Reply-To: <20160812124209.387a4c2f@xeon-e3>

2016-08-12 22:42 GMT+03:00 Stephen Hemminger <stephen@networkplumber.org>:

> > >> 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.
>
> Did you account for the fact that some of these might be indirect mbuf's
> where refcount > 1? If refcount is not 1 then mbuf is shared, and you can
> not safely write your L2 header directly.
>

No, I was following the ip_reassembly example.

Since rte_ipv4_fragment_packet() function requires as input parameter an
mbuf without L2 header,
it produces fragments without L2 too, so L2 header should be added. That is
exactly what the example application does.

And I've just checked the mbufs that are created by
the rte_ipv4_fragment_packet(). The are direct mbuf. They have non
zero buf_len size.

Also I checked the sources of rte_ipv4_fragment_packet() function. For each
fragment it creates direct mbuf,
then reserves space for the IP header in it and then adds one or more
indirect mbuf to it. Therefore it should be safe to prepend
L2 header to each resulting fragment, shouldn't be?

-- 
--
Kiselev Alexander

  reply	other threads:[~2016-08-12 21:01 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   ` Александр Киселев
2016-08-12 19:42     ` Stephen Hemminger
2016-08-12 21:01       ` Александр Киселев [this message]
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='CAMKNYbxc3hVRCD-btrho74ou0a5uZzaHU_wDF_cJr4w=d3_RRA@mail.gmail.com' \
    --to=kiselev99@gmail.com \
    --cc=laswell@infinite.io \
    --cc=stephen@networkplumber.org \
    --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).