Bill Fischofer(Bill-Fischofer-Linaro) replied on github web page:

include/odp/api/spec/packet.h
line 17
@@ -71,6 +71,51 @@ extern "C" {
   * Packet is red
   */
 
+/**
+ * Protocol
+ */
+typedef enum odp_proto_t {
+       /** No protocol defined */
+       ODP_PROTO_NONE = 0,
+
+       /** Ethernet (including VLAN) */
+       ODP_PROTO_ETH,
+
+       /** IP (including IPv4 and IPv6) */
+       ODP_PROTO_IP,
+
+       /** UDP */


Comment:
@lumag IPsec operating in transport mode is, I'd imagine, the main use case 
here.

> Dmitry Eremin-Solenikov(lumag) wrote:
> What is the usecase for parsing a packet starting from L4 header? Also there 
> are several (lots) of other L4 protocols. Do we want to support them all here?


>> Dmitry Eremin-Solenikov(lumag) wrote:
>> Maybe it would be better to split this into separate IPv4 and IPv6 packets. 
>> It would be an error to pass IPv6 packet with ethtype (or IP tunnel type) 
>> being set to IPv4. 


>>> Petri Savolainen(psavol) wrote:
>>> A vector of packets is CPU vector instructions friendly.


>>>> Petri Savolainen(psavol) wrote:
>>>> The use case is mentioned in log message: parse after decrypt/IP 
>>>> reassembly. Application has recreated an inner packet and needs to parse 
>>>> it before continue. This is inherently SW parse which may be accelerated 
>>>> with CPU vector instructions, etc.


>>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>>>> What's the use case for a multi() form of this API? Might VPP use it? 
>>>>> Perhaps Sachin can comment?


>>>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>>>>> We had considered an `odp_packet_parse()` function some time back but it 
>>>>>> was rejected as something that would not fit well with hardware parsers. 
>>>>>> What's changed?


https://github.com/Linaro/odp/pull/273#discussion_r149437614
updated_at 2017-11-07 17:02:45

Reply via email to