net/hns3: fix typos on comments
[dpdk.git] / drivers / net / txgbe / txgbe_ipsec.h
index 2f0d813..5edd6b5 100644 (file)
@@ -17,6 +17,9 @@
 #define IPSEC_MAX_RX_IP_COUNT           128
 #define IPSEC_MAX_SA_COUNT              1024
 
+#define ESP_ICV_SIZE 16
+#define ESP_TRAILER_SIZE 2
+
 enum txgbe_operation {
        TXGBE_OP_AUTHENTICATED_ENCRYPTION,
        TXGBE_OP_AUTHENTICATED_DECRYPTION
@@ -68,10 +71,27 @@ struct txgbe_crypto_tx_sa_table {
        uint8_t  used;
 };
 
+union txgbe_crypto_tx_desc_md {
+       uint64_t data;
+       struct {
+               /**< SA table index */
+               uint32_t sa_idx;
+               /**< ICV and ESP trailer length */
+               uint8_t pad_len;
+               /**< enable encryption */
+               uint8_t enc;
+       };
+};
+
 struct txgbe_ipsec {
        struct txgbe_crypto_rx_ip_table rx_ip_tbl[IPSEC_MAX_RX_IP_COUNT];
        struct txgbe_crypto_rx_sa_table rx_sa_tbl[IPSEC_MAX_SA_COUNT];
        struct txgbe_crypto_tx_sa_table tx_sa_tbl[IPSEC_MAX_SA_COUNT];
 };
 
+int txgbe_crypto_enable_ipsec(struct rte_eth_dev *dev);
+int txgbe_crypto_add_ingress_sa_from_flow(const void *sess,
+                                         const void *ip_spec,
+                                         uint8_t is_ipv6);
+
 #endif /*TXGBE_IPSEC_H_*/