test/bonding: fix RSS test when disable RSS
[dpdk.git] / drivers / crypto / caam_jr / caam_jr_pvt.h
index 58fd257..52f872b 100644 (file)
@@ -5,6 +5,9 @@
 #ifndef CAAM_JR_PVT_H
 #define CAAM_JR_PVT_H
 
+#include <desc/ipsec.h>
+#include <dpaax_iova_table.h>
+
 /* NXP CAAM JR PMD device name */
 
 #define CAAM_JR_ALG_UNSUPPORT  (-1)
@@ -110,6 +113,7 @@ struct caam_jr_session {
        enum rte_crypto_cipher_algorithm cipher_alg; /* Cipher Algorithm*/
        enum rte_crypto_auth_algorithm auth_alg; /* Authentication Algorithm*/
        enum rte_crypto_aead_algorithm aead_alg; /* AEAD Algorithm*/
+       enum rte_security_session_protocol proto_alg; /* Security Algorithm*/
        union {
                struct {
                        uint8_t *data;  /* pointer to key data */
@@ -132,7 +136,9 @@ struct caam_jr_session {
        } iv;   /* Initialisation vector parameters */
        uint16_t auth_only_len; /* Length of data for Auth only */
        uint32_t digest_length;
+       struct ipsec_encap_pdb encap_pdb;
        struct ip ip4_hdr;
+       struct ipsec_decap_pdb decap_pdb;
        struct caam_jr_qp *qp;
        struct sec_cdb *cdb;    /* cmd block associated with qp */
        struct rte_mempool *ctx_pool; /* session mempool for caam_jr_op_ctx */
@@ -163,7 +169,7 @@ struct sec4_sg_entry {
 
 /* Structure encompassing a job descriptor which is to be processed
  * by SEC. User should also initialise this structure with the callback
- * function pointer which will be called by driver after recieving proccessed
+ * function pointer which will be called by driver after receiving processed
  * descriptor from SEC. User data is also passed in this data structure which
  * will be sent as an argument to the user callback function.
  */
@@ -210,7 +216,7 @@ calc_chksum(void *buffer, int len)
 }
 struct uio_job_ring {
        uint32_t jr_id;
-       uint32_t uio_fd;
+       int uio_fd;
        void *register_base_addr;
        int map_size;
        int uio_minor_number;
@@ -218,8 +224,9 @@ struct uio_job_ring {
 
 int sec_cleanup(void);
 int sec_configure(void);
+void sec_uio_job_rings_init(void);
 struct uio_job_ring *config_job_ring(void);
-void free_job_ring(uint32_t uio_fd);
+void free_job_ring(int uio_fd);
 
 /* For Dma memory allocation of specified length and alignment */
 static inline void *
@@ -249,6 +256,11 @@ caam_jr_mem_vtop(void *vaddr)
 static inline void *
 caam_jr_dma_ptov(rte_iova_t paddr)
 {
+       void *va;
+       va = dpaax_iova_table_get_va(paddr);
+       if (likely(va != NULL))
+               return va;
+
        return rte_mem_iova2virt(paddr);
 }
 
@@ -268,7 +280,7 @@ static inline rte_iova_t caam_jr_dma_vtop(void *ptr)
  * @retval 0 for success
  * @retval -1 value for error
  */
-uint32_t caam_jr_enable_irqs(uint32_t uio_fd);
+int caam_jr_enable_irqs(int uio_fd);
 
 /** @brief Request to SEC kernel driver to disable interrupts for descriptor
  *  finished processing
@@ -276,11 +288,11 @@ uint32_t caam_jr_enable_irqs(uint32_t uio_fd);
  *  value that indicates an IRQ disable action into UIO file descriptor
  *  of this job ring.
  *
- * @param [in]  uio_fd    UIO File descripto
+ * @param [in]  uio_fd    UIO File descriptor
  * @retval 0 for success
  * @retval -1 value for error
  *
  */
-uint32_t caam_jr_disable_irqs(uint32_t uio_fd);
+int caam_jr_disable_irqs(int uio_fd);
 
 #endif