net/bnxt: ignore VLAN priority mask
[dpdk.git] / lib / librte_cryptodev / rte_crypto_sym.h
index deb4697..f29c980 100644 (file)
@@ -269,9 +269,12 @@ enum rte_crypto_auth_algorithm {
        /**< HMAC using MD5 algorithm */
 
        RTE_CRYPTO_AUTH_SHA1,
-       /**< 128 bit SHA algorithm. */
+       /**< 160 bit SHA algorithm. */
        RTE_CRYPTO_AUTH_SHA1_HMAC,
-       /**< HMAC using 128 bit SHA algorithm. */
+       /**< HMAC using 160 bit SHA algorithm.
+        * HMAC-SHA-1-96 can be generated by setting
+        * digest_length to 12 bytes in auth/aead xforms.
+        */
        RTE_CRYPTO_AUTH_SHA224,
        /**< 224 bit SHA algorithm. */
        RTE_CRYPTO_AUTH_SHA224_HMAC,
@@ -409,6 +412,8 @@ enum rte_crypto_aead_algorithm {
        /**< AES algorithm in CCM mode. */
        RTE_CRYPTO_AEAD_AES_GCM,
        /**< AES algorithm in GCM mode. */
+       RTE_CRYPTO_AEAD_CHACHA20_POLY1305,
+       /**< Chacha20 cipher with poly1305 authenticator */
        RTE_CRYPTO_AEAD_LIST_END
 };
 
@@ -452,6 +457,11 @@ struct rte_crypto_aead_xform {
                 * be allocated, even though the length field will
                 * have a value less than this.
                 *
+                * - For Chacha20-Poly1305 it is 96-bit nonce.
+                * PMD sets initial counter for Poly1305 key generation
+                * part to 0 and for Chacha20 encryption to 1 as per
+                * rfc8439 2.8. AEAD construction.
+                *
                 * For optimum performance, the data pointed to SHOULD
                 * be 8-byte aligned.
                 */
@@ -468,6 +478,8 @@ struct rte_crypto_aead_xform {
                 *
                 * - For CCM mode, this is the length of the nonce,
                 * which can be in the range 7 to 13 inclusive.
+                *
+                * - For Chacha20-Poly1305 this field is always 12.
                 */
        } iv;   /**< Initialisation vector parameters */
 
@@ -693,6 +705,14 @@ struct rte_crypto_sym_op {
                                          * For KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9,
                                          * this offset should be such that
                                          * data to authenticate starts at COUNT.
+                                         *
+                                         * @note
+                                         * For DOCSIS security protocol, this
+                                         * offset is the DOCSIS header length
+                                         * and, therefore, also the CRC offset
+                                         * i.e. the number of bytes into the
+                                         * packet at which CRC calculation
+                                         * should begin.
                                          */
                                        uint32_t length;
                                         /**< The message length, in bytes, of the source
@@ -711,6 +731,12 @@ struct rte_crypto_sym_op {
                                          * the length should include the COUNT,
                                          * FRESH, message, direction bit and padding
                                          * (to be multiple of 8 bits).
+                                         *
+                                         * @note
+                                         * For DOCSIS security protocol, this
+                                         * is the CRC length i.e. the number of
+                                         * bytes in the packet over which the
+                                         * CRC should be calculated
                                          */
                                } data;
                                /**< Data offsets and length for authentication */
@@ -861,7 +887,9 @@ __rte_crypto_sym_op_attach_sym_session(struct rte_crypto_sym_op *sym_op,
  * @param len
  *   Length of data to represent.
  * @param vec
+ *   Pointer to an output array of IO vectors.
  * @param num
+ *   Size of an output array.
  * @return
  *   - number of successfully filled entries in *vec* array.
  *   - negative number of elements in *vec* array required.