[dpdk-dev] [RFC] function to parse packet headers
Andrew Rybchenko
arybchenko at solarflare.com
Fri Jan 11 09:28:45 CET 2019
On 1/11/19 11:16 AM, Morten Brørup wrote:
>> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Andrew Rybchenko
>> On 1/11/19 3:11 AM, Stephen Hemminger wrote:
>>> All drivers that don't have hardware support for getting l2/l3 and
>>> ptype information should be calling rte_net_get_ptype() already.
>> Is it documented somewhere?
>>
> The drivers need to parse the packet headers to set MBUF->packet_type, and without hardware support for it, the alternative to calling rte_net_get_ptype() is implementing duplicate code in the driver.
I'm sorry, but I see it a bit different. The driver provides
rte_eth_dev_get_supported_ptypes().
If nothing is promised, nothing may be provided. If application needs
more ptypes, it can
call the library function and obtain required information. If
application does not need ptypes,
what the point to do ptype discovery in SW and through it away?
> In other words, you can interpret Stephen's "should be" as "would be silly if not". :-)
>
>
> Med venlig hilsen / kind regards
> - Morten Brørup
>
>
>
More information about the dev
mailing list