On Tue, Aug 8, 2017 at 1:43 PM, Liron Himi <lir...@marvell.com> wrote:

> Hi,
>
> I have a query regarding the new parser configuration.
> Let's say application set it to 'ODP_PKTIO_PARSER_LAYER_L2', does it means
> that the platform implementation must parse and recognize all eth-type that
> have ODP API such as ARP,VLAN, etc.? same for ICMP, etc for L3?
>

ODP defines the protocols it supports at a given layer and implementations
that parse at that layer are expected to support those protocols.
Implementations are free to parse deeper than requested, but must parse to
at least the configured layer on a per-pktio basis. The parse results are
accessed by the various odp_packet_has_xxx() APIs, and these are exercised
by the pktio validation test suite.

However, while VLAN is a Layer 2 protocol, ARP is a Layer 3 protocol and
ICMP is a Layer 4 protocol.


>
> I'm asking it as I tried to run the parser validation tests and only the
> ones with ARP and ICMP are failing.
> It seems that the validation tests expect from the platform implementation
> to flag it.
>

The validation test sets ODP_PKTIO_PARSER_LAYER_ALL and then tests
individual packet types on a per-layer basis. Does your platform not parse
ARP or ICMP?


>
> Is that only validation test assumption or this is the real assumption and
> expectation from the platform?
> Maybe it is good to extend the parser with supported protocol per layer in
> the capabilities. Same as we have for checksum support.
>

That might be an interesting addition, but may not buy much. The parser
layer controls were added to allow applications to hint platforms that do
SW parsing since in such platforms parsing to a depth that isn't needed by
the application wastes cycles. Platforms that have HW parsers typically
parse everything at line rate anyway, so these controls are effectively
ignored.


>
> Regards,
> Liron
>

Reply via email to