From: Thomas Monjalon <thomas@monjalon.net>
To: "Legacy, Allain (Wind River)" <allain.legacy@windriver.com>
Cc: dev@dpdk.org, "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Subject: Re: [dpdk-dev] ip_frag: handle MTU sizes not aligned to 8 bytes
Date: Thu, 22 Jun 2017 18:00:25 +0200 [thread overview]
Message-ID: <3344778.x1AQTSzbEx@xps> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB9772583FB058D0@IRSMSX109.ger.corp.intel.com>
> > The rte_ipv4_fragment_packet API expects that the link/interface MTU value
> > passed in be divisible by 8 bytes. Given the name of the parameter is
> > "mtu" rather than "frag_size" it is not necessarily the case that it will
> > be divisible by 8. An MTU of 1500 happens to produce a max fragment size
> > of 1480 (1500 - sizeof(ipv4_hdr)) which is divisible by 8 but other MTU
> > values such as 1600 or 9000 do not produce values that are divisible by 8.
> >
> > Unfortunately, the API checks that the frag_size value produced is
> > divisible by 8 with a call to RTE_ASSERT which is only enabled when the
> > RTE_LOG_LEVEL >= RTE_LOG_DEBUG. In cases where the log level is set
> > normally the code silently continues and produces IP fragments that have
> > invalid fragment offset values.
> >
> > An application may not have control over what MTU a user selects and rather
> > than have each application adjust the MTU to pass a suitable value to the
> > fragmentation API this change modifies the fragmentation API to handle
> > cases where the "mtu" argument is not divisible by 8 and automatically
> > adjust the internal "frag_size".
> >
> > Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Applied, thanks
prev parent reply other threads:[~2017-06-22 16:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 15:14 [dpdk-dev] [PATCH] " Allain Legacy
2017-06-04 16:55 ` [dpdk-dev] " Ananyev, Konstantin
2017-06-22 16:00 ` Thomas Monjalon [this message]
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=3344778.x1AQTSzbEx@xps \
--to=thomas@monjalon.net \
--cc=allain.legacy@windriver.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.com \
/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).