diff options
author | Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> | 2017-11-30 00:31:17 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2017-12-27 21:41:46 +0300 |
commit | 9f5ac67b1aa3d0239332ad7e7de410c4e9412492 (patch) | |
tree | d54890178c23be744fb569fb9d6016ee8dea6642 /include/odp | |
parent | 4ed1ca5d9b48914dea07ed657dce9a77115d6d87 (diff) |
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>
Diffstat (limited to 'include/odp')
-rw-r--r-- | include/odp/api/spec/packet.h | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index da522c6c0..4f360daea 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -1179,6 +1179,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 */ typedef struct odp_packet_parse_param_t { @@ -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; |