Balasubramanian Manoharan(bala-manoharan) replied on github web page:
helper/include/odp/helper/vxlan.h
line 42
@@ -0,0 +1,58 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODPH VxLAN header
+ */
+
+#ifndef ODPH_VXLAN_H_
+#define ODPH_VXLAN_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp_api.h>
+
+/** @addtogroup odp_header ODP HEADER
+ * @{
+ */
+
+/** VXLAN header length */
+#define ODPH_VXLANHDR_LEN 8
+
+/** VNI from VXLAN header format */
+#define ODPH_VXLAN_VNI(vxlan_vni) ((vxlan_vni & 0xffffff00) >> 8)
+
+/** UDP VXLAN destination port */
+#define ODPH_UDP_VXLAN_PORT 4789
+
+/** VNI to VXLAN header format */
+#define ODPH_VNI_VXLAN(vxlan_vni) (vxlan_vni << 8)
+
+/** VXLAN header */
+typedef struct ODP_PACKED {
+ uint8_t flags; /**< Vxlan flags */
+ uint8_t reserve1; /**< reserved bits */
+ uint16_t reseve2; /**< reserved bits */
Comment:
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_r157151440
updated_at 2017-12-15 09:08:04