diff mbox series

[API-NEXT,v10,2/2] api: ipsec: reuse checksum checking flags from packet API

Message ID 1513080017-17733-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v10,1/2] api: packet: separate checksum check flags | expand

Commit Message

Github ODP bot Dec. 12, 2017, noon UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Reuse odp_packet_parse_chksum_t from packet API to ease passing checksum
flags to packet parsing functions.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 314 (lumag:ipsec-chksum)
 ** https://github.com/Linaro/odp/pull/314
 ** Patch: https://github.com/Linaro/odp/pull/314.patch
 ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2
 ** Merge commit sha: 1cf25bb4d02d0f93713aa7ce0881e6a3d6e6846c
 **/
 include/odp/api/spec/ipsec.h | 28 ++--------------------------
 1 file changed, 2 insertions(+), 26 deletions(-)
diff mbox series

Patch

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index d57815ed2..6f00a2c9c 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -158,33 +158,9 @@  typedef struct odp_ipsec_inbound_config_t {
 	/** Flags to control IPSEC payload data checks up to the selected parse
 	 *  level. Checksum checking status can be queried for each packet with
 	 *  odp_packet_l3_chksum_status() and odp_packet_l4_chksum_status().
+	 *  Default value for all bits is 0 (skip all checksum checks).
 	 */
-	union {
-		/** Mapping for individual bits */
-		struct {
-			/** Check IPv4 header checksum in IPSEC payload.
-			 *  Default value is 0. */
-			uint32_t ipv4_chksum   : 1;
-
-			/** Check UDP checksum in IPSEC payload.
-			 *  Default value is 0. */
-			uint32_t udp_chksum    : 1;
-
-			/** Check TCP checksum in IPSEC payload.
-			 *  Default value is 0. */
-			uint32_t tcp_chksum    : 1;
-
-			/** Check SCTP checksum in IPSEC payload.
-			 *  Default value is 0. */
-			uint32_t sctp_chksum   : 1;
-		} check;
-
-		/** All bits of the bit field structure
-		  *
-		  * This field can be used to set/clear all flags, or bitwise
-		  * operations over the entire structure. */
-		uint32_t all_check;
-	};
+	odp_proto_chksums_t chksums;
 
 } odp_ipsec_inbound_config_t;