muvarov replied on github web page:

platform/linux-generic/odp_packet.c
line 18
@@ -1982,12 +1983,31 @@ static inline void parse_tcp(packet_parser_t *prs,
        *parseptr += (uint32_t)tcp->hl * 4;
 }
 
+static inline void parse_vxlan(packet_parser_t *prs, packet_parser_t *in_prs,
+                              const uint8_t **parseptr, uint32_t *offset,
+                              uint32_t frame_len, uint32_t seg_len)
+{
+       const _odp_vxlanhdr_t *vxlan = (const _odp_vxlanhdr_t *)*parseptr;
+
+       if (ODPH_VXLAN_BIT(vxlan->flags))


Comment:
do not use helper in platform code. Theoretically that should not even compile. 
(I hope I will add automatic check for that some day.)

> muvarov wrote
> `_ODPH_VXLAN_`


>> muvarov wrote
>> Please make name more common. ODPH_VXLAN_something everywhere.


>>> Balasubramanian Manoharan(bala-manoharan) wrote:
>>> Even if we add the capability currently we don't have ODP APIs expose them 
>>> as packet metadata functions. i.e odp_packet_has_inner_tcp() 
>>> 
>>> Should we add the capability and defer this to after tiger-moth?


>>>> Balasubramanian Manoharan(bala-manoharan) wrote:
>>>> Will migrate to api-next


>>>>> Balasubramanian Manoharan(bala-manoharan) wrote:
>>>>> Okay


>>>>>> Balasubramanian Manoharan(bala-manoharan) wrote:
>>>>>> Will change the typo.


>>>>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>>>>>> The "TODO" can't stand by itself. Sounds like we need an additional 
>>>>>>> `odp_classification_capability()` bit to indicate whether inner packets 
>>>>>>> are included in the parse?


>>>>>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>>>>>>> Typo: modified


>>>>>>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>>>>>>>> Need to validate that the packet (and specified UDP length) is large 
>>>>>>>>> enough to contain the VXLAN header and the encapsulated packet.


>>>>>>>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>>>>>>>>> Inclusion of new APIs means this PR must be against api-next, not 
>>>>>>>>>> master.


>>>>>>>>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>>>>>>>>>> [RFC 7348](https://tools.ietf.org/html/rfc7348) uses VXLAN, not 
>>>>>>>>>>> VxLAN. I think we should use that throughout ODP as well as it 
>>>>>>>>>>> avoids unnecessary CamelCase.


>>>>>>>>>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>>>>>>>>>>> Same comments here as for helper version of file.


>>>>>>>>>>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>>>>>>>>>>>> Typo: reserve, not reseve? Perhaps better for these to be 
>>>>>>>>>>>>> anonymous bitfields if they are truly unreferenced?


https://github.com/Linaro/odp/pull/345#discussion_r157219154
updated_at 2017-12-15 14:56:03

Reply via email to