Bill Fischofer(Bill-Fischofer-Linaro) replied on github web page:
include/odp/api/spec/ipsec.h
line 179
@@ -1210,16 +1256,22 @@ typedef struct odp_ipsec_status_t {
*
* The operation does packet transformation according to IPSEC standards (see
* e.g. RFC 4302 and 4303). Resulting packets are well formed, reconstructed
- * original IP packets, with IPSEC headers removed and valid header field
values
- * restored. The amount and content of packet data before the IP header is
- * undefined.
+ * original IP (or TFC dummy) packets, with IPSEC headers removed and valid
+ * header field values restored. The amount and content of packet data before
+ * the IP header is undefined. TFC padding may follow the IP packet payload,
+ * in which case packet length is larger than protocol headers indicate.
+ * TFC dummy packets have both IPv4 and IPv6 flags cleared, although L3 offset
+ * is set also for those.
*
* Each successfully transformed packet has a valid value for these metadata
* regardless of the inner packet parse configuration
* (odp_ipsec_inbound_config_t):
- * - L3 offset: Offset to the first byte of the (outmost) IP header
- * - pktio: For inline IPSEC processed packets, original packet input
- * interface
+ * - l3_offset: Offset to the first byte of the original IP (or TFC dummy)
+ * packet
+ * - has_ipv4/6: Specifies if the original packet is IPv4 or IPv6. For tunnel
+ * mode TFC dummy packets neither flag is set.
Comment:
I assume this is referring to the `odp_packet_has_ipv4()` and
`odp_packet_has_ipv6()` accessor functions? Since these bits are only
accessible via these functions, this forces applications to play a guessing
game with them and their L4 counterparts. Might it be better to consider having
`odp_packet_l3_proto()` and `odp_packet_l4_proto()` functions?
> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
> Can `flabel` be placed after `dst_addr`? This would avoid the pad bytes that
> would otherwise be inserted between `dspc` and `flabel`.
https://github.com/Linaro/odp/pull/403#discussion_r162446156
updated_at 2018-01-18 19:34:52