X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Fsecurity%2Frte_security.h;h=1228b6c8b16d3433cc1beab4d60cf491e344e1fb;hb=6e858b4d9244cf53505589673755ab18ac2a4a83;hp=7b066e758bc81dc50c66baf6f4c885e190bb1063;hpb=f7e3aa693d995c9ca67a544812c58e1f117eed2a;p=dpdk.git diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h index 7b066e758b..1228b6c8b1 100644 --- a/lib/security/rte_security.h +++ b/lib/security/rte_security.h @@ -128,6 +128,11 @@ struct rte_security_ipsec_tunnel_param { }; }; +struct rte_security_ipsec_udp_param { + uint16_t sport; + uint16_t dport; +}; + /** * IPsec Security Association option flags */ @@ -227,6 +232,46 @@ struct rte_security_ipsec_sa_options { * * 0: Do not match UDP ports */ uint32_t udp_ports_verify : 1; + + /** Compute/verify inner packet IPv4 header checksum in tunnel mode + * + * * 1: For outbound, compute inner packet IPv4 header checksum + * before tunnel encapsulation and for inbound, verify after + * tunnel decapsulation. + * * 0: Inner packet IP header checksum is not computed/verified. + * + * The checksum verification status would be set in mbuf using + * RTE_MBUF_F_RX_IP_CKSUM_xxx flags. + * + * Inner IP checksum computation can also be enabled(per operation) + * by setting the flag RTE_MBUF_F_TX_IP_CKSUM in mbuf. + */ + uint32_t ip_csum_enable : 1; + + /** Compute/verify inner packet L4 checksum in tunnel mode + * + * * 1: For outbound, compute inner packet L4 checksum before + * tunnel encapsulation and for inbound, verify after + * tunnel decapsulation. + * * 0: Inner packet L4 checksum is not computed/verified. + * + * The checksum verification status would be set in mbuf using + * RTE_MBUF_F_RX_L4_CKSUM_xxx flags. + * + * Inner L4 checksum computation can also be enabled(per operation) + * by setting the flags RTE_MBUF_F_TX_TCP_CKSUM or RTE_MBUF_F_TX_SCTP_CKSUM or + * RTE_MBUF_F_TX_UDP_CKSUM or RTE_MBUF_F_TX_L4_MASK in mbuf. + */ + uint32_t l4_csum_enable : 1; + + /** Reserved bit fields for future extension + * + * User should ensure reserved_opts is cleared as it may change in + * subsequent releases to support new options. + * + * Note: Reduce number of bits in reserved_opts for every new option. + */ + uint32_t reserved_opts : 18; }; /** IPSec security association direction */ @@ -287,6 +332,16 @@ struct rte_security_ipsec_xform { /**< Anti replay window size to enable sequence replay attack handling. * replay checking is disabled if the window size is 0. */ + union { + uint64_t value; + struct { + uint32_t low; + uint32_t hi; + }; + } esn; + /**< Extended Sequence Number */ + struct rte_security_ipsec_udp_param udp; + /**< UDP parameters, ignored when udp_encap option not specified */ }; /**