> -----Original Message-----
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of
> Dmitry Eremin-Solenikov
> Sent: Friday, November 10, 2017 1:36 PM
> To: lng-odp-forward <lng-odp@lists.linaro.org>
> Subject: [lng-odp] ODP vs Protocol headers
> 
> Hello,
> 
> Historically ODP helper provided protocol-related headers with
> linux-generic ODP implementation using modified private copy of them.
> The main reason for that was, if I remember correctly, that ODP should
> not provide protocol-related definitions.
> 
> I'd like to return to that question:
>  - I'm now adding more definitions to private protocol headers and I
> would not like for them to be too much out of sync.
>  - We started adding more and more protocol-specific handling in form of
> odp_packet_parse, odp packet flags, etc.
> 
> I'd propose to put protocol headers (ip.h, tcp.h, udp.h, eth.h) into
> public ODP namespace (to <odp/protocols/FOO.h>) with the following
> phrase specifying them:
> 
> ====
> These headers are not a part of ODP API specification, however they are
> provided to enable applications to use standard definitions for the
> protocol data. While neither of ODP API/ABI headers uses these protocol
> headers, an implementation SHOULD provide them AS IS to ease porting
> applications between ODP implementations.
> ====
> 
> --
> With best wishes
> Dmitry

Protocol definitions in ODP API are high level - e.g. has_ip, has_ipv6, 
ipv4_chksum_status. Full protocol header definitions are not needed for using 
those feature flags.

Protocol headers definitions in the API (when the API itself does not need 
those) is an extra maintenance burden. Headers have type, flag, option, etc 
fields which value/usage tend to extend over time (new RFCs define new values 
and usage for old fields, etc). Once you add first headers into ODP API, people 
start requesting "one more value", "one more extension header", etc. After a 
while there would be a full protocol suite worth of protocol definitions to 
maintain.

Application have better change to maintain protocol definitions, since they 
need to concentrate to only those they implement - ODP would need to define 
all, but would not implement anything.

-Petri


Reply via email to