From: Olivier MATZ <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: "Liu,
Jijiang" <jijiang.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"dev-VfR2kkLFssw@public.gmane.org"
<dev-VfR2kkLFssw@public.gmane.org>
Subject: Re: [PATCH 1/4] rte_mbuf:add packet types
Date: Fri, 21 Nov 2014 14:25:38 +0100 [thread overview]
Message-ID: <546F3D52.3070300@6wind.com> (raw)
In-Reply-To: <1ED644BD7E0A5F4091CF203DAFB8E4CC01D9D8D6-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
Hello Jijiang,
On 11/21/2014 01:26 PM, Liu, Jijiang wrote:
>> I have one question about the packet_type: it is not clear to me what the
>> software can expect, for instance when RTE_PTYPE_IPv4_IPv4 is set. What does
>> that mean exactly? Which fields must be valid in the packet to have this type?
>> - L2 ethertype
>> - Presence of vlan?
>> - IP version
>> - IP checksum
>> - IP header length
>> - IP length (compared to packet len)
>> - anything about IP options?
> The RTE_PTYPE_IPv4_IPv4 means that packet format is MAC, IPV4, IPV4, PAY3. The following fields are valid,
> L2 ethertype
> No VLAN
> IPv4,
OK. But IPv4 is not a field, it's a header composed of several fields.
When a network stack receives a packet, it checks the validity of the
IPv4 fields. The offload flags helps the application to avoid doing
some checks, that's why it's important to know what the hardware
already verified when a flag is set.
Here is a example of what the application may check. Knowing the
meaning of the flag is having an answer to these questions. I probably
forgot some, but I think you get the point.
When RTE_PTYPE_IPv4 is set does it mean that IP.version is 4?
When RTE_PTYPE_IPv4 is set does it mean that IP.ihl is not smaller
than 5?
When RTE_PTYPE_IPv4 is set does it mean that IP.ihl is not higher
than 15?
When RTE_PTYPE_IPv4 is set does it mean that IP.checksum is
verified?
When RTE_PTYPE_IPv4 is set does it mean that IP.total_len is
not lower than 20?
When RTE_PTYPE_IPv4 is set does it mean that IP.total_len is
not higher than m_len(m) + 14?
When RTE_PTYPE_IPv4 is set does it mean that IP.total_len is
not lower than m_len(m) + 14? (there is a trap here)
When RTE_PTYPE_IPv4 is set does it mean that (IP.flags & 1) is 0?
When RTE_PTYPE_IPv4 is set does it mean that IP.offset is lower
than 65528?
When RTE_PTYPE_IPv4 is set, can the packet be a fragment?
When RTE_PTYPE_IPv4 is set does it mean that there is no options?
Any condition on source/dest address?
The same questions (but adapted to the protocol) could be asked for
any packet type, that was just an example.
>> - remove similar things in ol_flags to avoid having a redundant API.
>
> Yes, when all i40e/ixgbe/igb PMDs done, the related IP header offload should be removed.
> I just changed for i40e, there still are igb&ixgbe need to be changed in DPDK2.0, so we can't remove the IP ol_flags now.
How can an application deal with 2 different APIs ?
The application should work with any driver. It can have a i40e
interface and an ixgbe interface at the same time.
Regards,
Olivier
next prev parent reply other threads:[~2014-11-21 13:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 7:37 [PATCH 0/4] Translate packet types for i40e Jijiang Liu
[not found] ` <1416296251-7534-1-git-send-email-jijiang.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-11-18 7:37 ` [PATCH 1/4] rte_mbuf:add packet types Jijiang Liu
[not found] ` <1416296251-7534-2-git-send-email-jijiang.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-11-19 10:38 ` Olivier MATZ
[not found] ` <546C733C.1020404-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-11-21 12:26 ` Liu, Jijiang
[not found] ` <1ED644BD7E0A5F4091CF203DAFB8E4CC01D9D8D6-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-11-21 13:25 ` Olivier MATZ [this message]
2014-11-18 7:37 ` [PATCH 2/4] rte_mbuf:remove tunneling IP offload flags Jijiang Liu
2014-11-18 7:37 ` [PATCH 3/4] i40e:translate i40e packet types Jijiang Liu
2014-11-18 7:37 ` [PATCH 4/4] testpmd:application changes Jijiang Liu
2014-11-18 11:33 ` [PATCH 0/4] Translate packet types for i40e Ananyev, Konstantin
[not found] ` <2601191342CEEE43887BDE71AB977258213B581A-kPTMFJFq+rEu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-11-18 13:08 ` Bruce Richardson
2014-11-18 15:29 ` Ananyev, Konstantin
[not found] ` <2601191342CEEE43887BDE71AB977258213B58D0-kPTMFJFq+rEu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-11-19 3:52 ` Liu, Jijiang
[not found] ` <1ED644BD7E0A5F4091CF203DAFB8E4CC01D9C02C-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-11-19 9:47 ` Ananyev, Konstantin
2014-11-18 14:12 ` Zhang, Helin
[not found] ` <F35DEAC7BCE34641BA9FAC6BCA4A12E70A7C8757-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-11-18 15:26 ` Ananyev, Konstantin
[not found] ` <2601191342CEEE43887BDE71AB977258213B58B9-kPTMFJFq+rEu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-11-18 15:55 ` Ananyev, Konstantin
2014-11-19 0:29 ` Zhang, Helin
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=546F3D52.3070300@6wind.com \
--to=olivier.matz-pdr9zngts4eavxtiumwx3w@public.gmane.org \
--cc=dev-VfR2kkLFssw@public.gmane.org \
--cc=jijiang.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.