From d5542bd04f25525334311bdac08f6dd4e613a404 Mon Sep 17 00:00:00 2001 From: Dmitry Eremin-Solenikov Date: Thu, 30 Nov 2017 00:32:16 +0300 Subject: api: ipsec: reuse checksum checking flags from packet API Reuse odp_packet_parse_chksum_t from packet API to ease passing checksum flags to packet parsing functions. Signed-off-by: Dmitry Eremin-Solenikov Reviewed-by: Petri Savolainen Reviewed-by: Bill Fischofer Signed-off-by: Maxim Uvarov --- include/odp/api/spec/ipsec.h | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'include/odp/api') 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; -- cgit v1.2.3