]> git.proxmox.com Git - ceph.git/blame - ceph/src/spdk/intel-ipsec-mb/asm.h
import 15.2.0 Octopus source
[ceph.git] / ceph / src / spdk / intel-ipsec-mb / asm.h
CommitLineData
11fdf7f2
TL
1/*******************************************************************************
2 Copyright (c) 2012-2018, Intel Corporation
3
4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions are met:
6
7 * Redistributions of source code must retain the above copyright notice,
8 this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in the
11 documentation and/or other materials provided with the distribution.
12 * Neither the name of Intel Corporation nor the names of its contributors
13 may be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
20 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*******************************************************************************/
27
28/* interface to asm routines */
29
30#ifndef IMB_ASM_H
31#define IMB_ASM_H
32
33#include "intel-ipsec-mb.h"
34
35/* Define interface to base asm code */
36
37/* AES-CBC */
38void aes_cbc_enc_128_x8(AES_ARGS_x8 *args, uint64_t len_in_bytes);
39void aes_cbc_enc_192_x8(AES_ARGS_x8 *args, uint64_t len_in_bytes);
40void aes_cbc_enc_256_x8(AES_ARGS_x8 *args, uint64_t len_in_bytes);
41
42void aes_cbc_dec_128_avx(const void *in, const uint8_t *IV, const void *keys,
43 void *out, uint64_t len_bytes);
44void aes_cbc_dec_192_avx(const void *in, const uint8_t *IV, const void *keys,
45 void *out, uint64_t len_bytes);
46void aes_cbc_dec_256_avx(const void *in, const uint8_t *IV, const void *keys,
47 void *out, uint64_t len_bytes);
48
49void aes_cbc_dec_128_sse(const void *in, const uint8_t *IV, const void *keys,
50 void *out, uint64_t len_bytes);
51void aes_cbc_dec_192_sse(const void *in, const uint8_t *IV, const void *keys,
52 void *out, uint64_t len_bytes);
53void aes_cbc_dec_256_sse(const void *in, const uint8_t *IV, const void *keys,
54 void *out, uint64_t len_bytes);
55
9f95a23c
TL
56void aes_cbc_dec_128_sse_no_aesni(const void *in, const uint8_t *IV,
57 const void *keys, void *out,
58 uint64_t len_bytes);
59void aes_cbc_dec_192_sse_no_aesni(const void *in, const uint8_t *IV,
60 const void *keys, void *out,
61 uint64_t len_bytes);
62void aes_cbc_dec_256_sse_no_aesni(const void *in, const uint8_t *IV,
63 const void *keys, void *out,
64 uint64_t len_bytes);
65
11fdf7f2
TL
66/* AES-CTR */
67void aes_cntr_256_sse(const void *in, const void *IV, const void *keys,
68 void *out, uint64_t len_bytes, uint64_t IV_len);
69void aes_cntr_192_sse(const void *in, const void *IV, const void *keys,
70 void *out, uint64_t len_bytes, uint64_t IV_len);
71void aes_cntr_128_sse(const void *in, const void *IV, const void *keys,
72 void *out, uint64_t len_bytes, uint64_t IV_len);
73
9f95a23c
TL
74void aes_cntr_256_sse_no_aesni(const void *in, const void *IV, const void *keys,
75 void *out, uint64_t len_bytes, uint64_t IV_len);
76void aes_cntr_192_sse_no_aesni(const void *in, const void *IV, const void *keys,
77 void *out, uint64_t len_bytes, uint64_t IV_len);
78void aes_cntr_128_sse_no_aesni(const void *in, const void *IV, const void *keys,
79 void *out, uint64_t len_bytes, uint64_t IV_len);
80
81
11fdf7f2
TL
82void aes_cntr_256_avx(const void *in, const void *IV, const void *keys,
83 void *out, uint64_t len_bytes, uint64_t IV_len);
84void aes_cntr_192_avx(const void *in, const void *IV, const void *keys,
85 void *out, uint64_t len_bytes, uint64_t IV_len);
86void aes_cntr_128_avx(const void *in, const void *IV, const void *keys,
87 void *out, uint64_t len_bytes, uint64_t IV_len);
88
89/* AES128-ECBENC */
90void aes128_ecbenc_x3_sse(const void *in, void *keys,
91 void *out1, void *out2, void *out3);
9f95a23c
TL
92void aes128_ecbenc_x3_sse_no_aesni(const void *in, void *keys,
93 void *out1, void *out2, void *out3);
11fdf7f2
TL
94void aes128_ecbenc_x3_avx(const void *in, void *keys,
95 void *out1, void *out2, void *out3);
96
97#endif /* IMB_ASM_H */
98
99