This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, api-next has been updated via 0c7769e1e8e7893f3631d7c8b8297f87b718d27d (commit) via 87ec9465899591ddc2125740d19a395d4b8b9608 (commit) from 411629a3e9efb8e44f5d0c6337c565720418d653 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 0c7769e1e8e7893f3631d7c8b8297f87b718d27d Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Thu Nov 30 00:32:16 2017 +0300
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 dmitry.ereminsolenikov@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index d57815ed..6f00a2c9 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;
commit 87ec9465899591ddc2125740d19a395d4b8b9608 Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Thu Nov 30 00:31:17 2017 +0300
api: packet: separate checksum check flags
Separate union controlling different checksum checks. It will be used by IPsec API.
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index 1dbbfafe..19572034 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -1178,6 +1178,31 @@ int odp_packet_move_data(odp_packet_t pkt, uint32_t dst_offset, * */
+/** + * Flags to control packet data checksum checking + */ +typedef union odp_proto_chksums_t { + /** Individual checksum bits. */ + struct { + /** IPv4 header checksum */ + uint32_t ipv4 : 1; + + /** UDP checksum */ + uint32_t udp : 1; + + /** TCP checksum */ + uint32_t tcp : 1; + + /** SCTP checksum */ + uint32_t sctp : 1; + + } chksum; + + /** All checksum bits. This can be used to set/clear all flags. */ + uint32_t all_chksum; + +} odp_proto_chksums_t; + /** * Packet parse parameters */ @@ -1190,30 +1215,12 @@ typedef struct odp_packet_parse_param_t { * layer than the layer of 'proto'. */ odp_proto_layer_t layer;
- /** Flags to control payload data checks up to the selected parse - * layer. Checksum checking status can be queried for each packet with - * odp_packet_l3_chksum_status() and odp_packet_l4_chksum_status(). + /** Flags to control payload data checksums checks up to the selected + * parse layer. Checksum checking status can be queried for each packet + * with odp_packet_l3_chksum_status() and + * odp_packet_l4_chksum_status(). */ - union { - /** Individual check bits. */ - struct { - /** Check IPv4 header checksum */ - uint32_t ipv4_chksum : 1; - - /** Check UDP checksum */ - uint32_t udp_chksum : 1; - - /** Check TCP checksum */ - uint32_t tcp_chksum : 1; - - /** Check SCTP checksum */ - uint32_t sctp_chksum : 1; - - } check; - - /** All check bits. This can be used to set/clear all flags. */ - uint32_t all_check; - }; + odp_proto_chksums_t chksums;
} odp_packet_parse_param_t;
diff --git a/test/validation/api/packet/packet.c b/test/validation/api/packet/packet.c index ce4d66c0..703dfb56 100644 --- a/test/validation/api/packet/packet.c +++ b/test/validation/api/packet/packet.c @@ -2451,7 +2451,7 @@ void packet_test_parse(void)
parse.proto = ODP_PROTO_ETH; parse.layer = ODP_PROTO_LAYER_ALL; - parse.all_check = 0; + parse.chksums.all_chksum = 0;
CU_ASSERT(odp_packet_parse(pkt[0], offset[0], &parse) == 0); CU_ASSERT(odp_packet_parse_multi(&pkt[1], &offset[1], @@ -2482,7 +2482,7 @@ void packet_test_parse(void)
parse.proto = ODP_PROTO_IPV4; parse.layer = ODP_PROTO_LAYER_L4; - parse.all_check = 0; + parse.chksums.all_chksum = 0;
CU_ASSERT(odp_packet_parse(pkt[0], offset[0], &parse) == 0); CU_ASSERT(odp_packet_parse_multi(&pkt[1], &offset[1], @@ -2512,7 +2512,7 @@ void packet_test_parse(void)
parse.proto = ODP_PROTO_ETH; parse.layer = ODP_PROTO_LAYER_L4; - parse.all_check = 0; + parse.chksums.all_chksum = 0;
CU_ASSERT(odp_packet_parse(pkt[0], offset[0], &parse) == 0); CU_ASSERT(odp_packet_parse_multi(&pkt[1], &offset[1], @@ -2542,7 +2542,7 @@ void packet_test_parse(void)
parse.proto = ODP_PROTO_ETH; parse.layer = ODP_PROTO_LAYER_L4; - parse.all_check = 0; + parse.chksums.all_chksum = 0;
CU_ASSERT(odp_packet_parse(pkt[0], offset[0], &parse) == 0); CU_ASSERT(odp_packet_parse_multi(&pkt[1], &offset[1], @@ -2573,7 +2573,7 @@ void packet_test_parse(void)
parse.proto = ODP_PROTO_ETH; parse.layer = ODP_PROTO_LAYER_ALL; - parse.all_check = 0; + parse.chksums.all_chksum = 0;
CU_ASSERT(odp_packet_parse(pkt[0], offset[0], &parse) == 0); CU_ASSERT(odp_packet_parse_multi(&pkt[1], &offset[1],
-----------------------------------------------------------------------
Summary of changes: include/odp/api/spec/ipsec.h | 28 ++------------------ include/odp/api/spec/packet.h | 53 +++++++++++++++++++++---------------- test/validation/api/packet/packet.c | 10 +++---- 3 files changed, 37 insertions(+), 54 deletions(-)
hooks/post-receive