From: Olivier Matz <olivier.matz@6wind.com>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"Tan, Jianfeng" <jianfeng.tan@intel.com>,
Adrien Mazarguil <adrien.mazarguil@6wind.com>
Subject: Re: supported packet types
Date: Tue, 21 Jun 2016 10:58:43 +0200 [thread overview]
Message-ID: <576901C3.2040906@6wind.com> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB97725836B7222E@irsmsx105.ger.corp.intel.com>
Hi Konstantin,
On 06/16/2016 01:29 PM, Ananyev, Konstantin wrote:
>>>> I suggest instead to set the ptype
>>>> in an opportunistic fashion instead:
>>>> - if the driver/hw knows the ptype, set it
>>>> - else, set it to unknown
>>>
>>> That's what PMD does now... and I don't think it can do much more -
>>> only interpret information provided by the HW in a proper way.
>>> Probably I misunderstood you here...
>>
>> My suggestion was to remove get_supported_ptypes an set the ptype in
>> mbuf when the pmd recognize a type.
>>
>> But we could also keep get_supported_ptypes() for ptypes that will
>> always be recognized, allowing a PMD to set any other ptype if it
>> is recognized. This is probably what we have today in some PMDs, I
>> think it just requires some clarification.
>
> Yes, +1 to the second option.
What about the following API comment?
'''
Retrieve the supported packet types of an Ethernet device.
When a packet type is announced as supported, it *must* be recognized by
the PMD. For instance, if RTE_PTYPE_L2_ETHER, RTE_PTYPE_L2_ETHER_VLAN
and RTE_PTYPE_L3_IPV4 are announced, the PMD must return the following
packet types for these packets:
- Ether/IPv4 -> RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4
- Ether/Vlan/IPv4 -> RTE_PTYPE_L2_ETHER_VLAN | RTE_PTYPE_L3_IPV4
- Ether/<anything else> -> RTE_PTYPE_L2_ETHER
- Ether/Vlan/<anything else> -> RTE_PTYPE_L2_ETHER_VLAN
When a packet is received by a PMD, the most precise type must be
returned among the ones supported. However a PMD is allowed to set
packet type that is not in the supported list, at the condition that it
is more precise. Therefore, a PMD announcing no supported packet types
can still set a matching packet type in a received packet.
'''
If it's fine I'll submit it as a patch.
Regards,
Olivier
next prev parent reply other threads:[~2016-06-21 8:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-29 15:15 supported packet types Olivier Matz
2016-04-29 16:03 ` Ananyev, Konstantin
2016-06-09 7:57 ` Olivier Matz
2016-06-09 10:37 ` Adrien Mazarguil
2016-06-15 14:08 ` Ananyev, Konstantin
2016-06-16 7:49 ` Olivier MATZ
2016-06-16 11:29 ` Ananyev, Konstantin
2016-06-21 8:58 ` Olivier Matz [this message]
2016-06-21 9:15 ` Ananyev, Konstantin
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=576901C3.2040906@6wind.com \
--to=olivier.matz@6wind.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=jianfeng.tan@intel.com \
--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 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.