diff mbox series

[API-NEXT,v2,4/6] api: ipsec: inbound TFC padding and dummy packets

Message ID 1516719624-9914-5-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v2,1/6] api: ipsec: IP header parameter types | expand

Commit Message

Github ODP bot Jan. 23, 2018, 3 p.m. UTC
From: Petri Savolainen <petri.savolainen@linaro.org>


Specify how application can recognize TFC padding and dummy
packets at input. Packet metadata flags for IPv4 and IPv6
indicate if the original packet was an IP or a TFC dummy packet.
When packet length is larger than protocol fields indicate,
some TFC padding remain in the packet.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
/** Email created from pull request 403 (psavol:next-ipsec-tfc)
 ** https://github.com/Linaro/odp/pull/403
 ** Patch: https://github.com/Linaro/odp/pull/403.patch
 ** Base sha: 44974a09b01c79adb9637a5dff38539598a76737
 ** Merge commit sha: 537da7cd2083945c4673ac0dd7b29beb6825bce7
 **/
 include/odp/api/spec/ipsec.h | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index 08533d80d..27ff16691 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -1224,16 +1224,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 in tunnel mode have both IPv4 and IPv6 flags cleared and
+ * may contain some (dummy) data.
  *
  * 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 packet. The value
+ *               is implementation specific for tunnel mode TFC dummy packets.
+ * - has_ipv4/6: Specifies if the original packet is IPv4 or IPv6. For tunnel
+ *               mode TFC dummy packets neither flag is set.
+ * - pktio:      For inline IPSEC processed packets, original packet input
+ *               interface
  *
  * Other metadata for parse results and error checks depend on configuration
  * (selected parse and error check levels).