These functions are scheduled for rework as part of the packet API
revisions.  Will be sure to address this point as part of that rework.
Thanks.

Bill

On Tuesday, November 25, 2014, Shmulik Ladkani <[email protected]>
wrote:

> Hi,
>
> I'm having a positive 'odp_packet_error()' in a test environment.
>
> The source for these are in 'odp_packet_parse', specifically:
>
>         if (odp_unlikely(len < ODPH_ETH_LEN_MIN)) {
>                 pkt_hdr->error_flags.frame_len = 1;
>                 return;
>         } else if (len > ODPH_ETH_LEN_MAX) {
>
> Thing is, in Linux, packets originated from host's net-stack may be
> shorter than 64 bytes. Usually the HW takes care of padding to a legal
> Ethernet frame size upon transmission.
>
> The test setup is a sandboxed setup involving a 'veth' pair.
> Host fires (ping) on 'veth0', ODP application listens on the peer
> interface.
>
> As 'veth' interfaces are virtual (software interfaces), the ethernet
> packets arriving at the "veth peer" may be short.
>
> Thus, when ODP parses these packets using linux-generic's helper
> function 'odp_packet_parse', these are classified errorneous.
>
> IMO the 'len < ODPH_ETH_LEN_MIN' is too strict.
>
> The consequence is linux-generic ODP implementation can't be used on
> some _virtual_ interfaces (as these may "receive" packets originated
> by host netstack).
>
> Is such a usecase of interest?
>
> Can't we assume, that in case of physical interfaces, HW already took
> care of validating Eth frame length, and as such, avoid this sanity
> check?
>
> Regards,
> Shmulik
>
> _______________________________________________
> lng-odp mailing list
> [email protected] <javascript:;>
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to