diff mbox series

[API-NEXT,v2,1/4] linux-gen: packet: add L3/L4 checksum validation flags

Message ID 1510218017-21165-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v2,1/4] linux-gen: packet: add L3/L4 checksum validation flags | expand

Commit Message

Github ODP bot Nov. 9, 2017, 9 a.m. UTC
From: Bogdan Pricope <bogdan.pricope@linaro.org>


Add L3/L4 checksum validation flags to signal if operation was performed
by the platform and its result.

Signed-off-by: Bogdan Pricope <bogdan.pricope@linaro.org>

---
/** Email created from pull request 269 (bogdanPricope:api_next_csum_status_pr)
 ** https://github.com/Linaro/odp/pull/269
 ** Patch: https://github.com/Linaro/odp/pull/269.patch
 ** Base sha: d22c949cc466bf28de559855a1cb525740578137
 ** Merge commit sha: 31b12178be4753494e806513020d7706600c8382
 **/
 platform/linux-generic/include/odp/api/plat/packet_types.h | 3 +++
 platform/linux-generic/include/odp_packet_internal.h       | 2 ++
 2 files changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/platform/linux-generic/include/odp/api/plat/packet_types.h b/platform/linux-generic/include/odp/api/plat/packet_types.h
index 68c66312b..050f69dc5 100644
--- a/platform/linux-generic/include/odp/api/plat/packet_types.h
+++ b/platform/linux-generic/include/odp/api/plat/packet_types.h
@@ -150,6 +150,9 @@  typedef union {
 
 		uint64_t color:2;     /**< Packet color for traffic mgmt */
 		uint64_t nodrop:1;    /**< Drop eligibility status */
+
+		uint64_t l3_chksum_done:1; /**< L3 checksum validation done */
+		uint64_t l4_chksum_done:1; /**< L4 checksum validation done */
 	};
 
 } _odp_packet_input_flags_t;
diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h
index fed562aa3..950e1bb5c 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -51,8 +51,10 @@  typedef union {
 		uint32_t snap_len:1;  /**< Snap length error */
 		uint32_t l2_chksum:1; /**< L2 checksum error, checks TBD */
 		uint32_t ip_err:1;    /**< IP error,  checks TBD */
+		uint32_t l3_chksum:1; /**< L3 checksum error */
 		uint32_t tcp_err:1;   /**< TCP error, checks TBD */
 		uint32_t udp_err:1;   /**< UDP error, checks TBD */
+		uint32_t l4_chksum:1; /**< L4 checksum error */
 	};
 } error_flags_t;