Petri Savolainen(psavol) replied on github web page:
include/odp/api/spec/packet.h
line 10
@@ -83,6 +83,22 @@ typedef struct odp_packet_data_range {
} odp_packet_data_range_t;
+/**
+ * Checksum check status in packet
+ */
+typedef enum odp_packet_chksum_status_t {
+ /** Checksum was not checked. Checksum check was not attempted or
+ * the attempt failed. */
+ ODP_PACKET_CHKSUM_UNKNOWN = 0,
Comment:
OK and UNKNOWN are the most common cases: OK when checking is enabled, UNKNOWN
when checking disabled. E.g. a router would not need check L4 checksum, so IPv4
check would be on, but all L4 checksum checks off.
Initialization is more robust with UNKNOWN == 0. Odp-linux would save these
along the other packet flags (init would be flags.all_bits = 0). On the other
hand, HW specific implementation may not store this enum anywhere, but directly
mask HW specific packet descriptor flags to produce the status. In that case,
the values do not matter too much.
https://github.com/Linaro/odp/pull/167#discussion_r137493864
updated_at 2017-09-07 09:44:47