Nathan Skrzypczak | 0c936b1 | 2020-08-31 15:33:57 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2020 Cisco and/or its affiliates. |
| 3 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | * you may not use this file except in compliance with the License. |
| 5 | * You may obtain a copy of the License at: |
| 6 | * |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * |
| 9 | * Unless required by applicable law or agreed to in writing, software |
| 10 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | * See the License for the specific language governing permissions and |
| 13 | * limitations under the License. |
| 14 | */ |
| 15 | |
| 16 | option version = "1.0.1"; |
| 17 | |
| 18 | enum crypto_dispatch_mode:u8 |
| 19 | { |
| 20 | CRYPTO_ASYNC_DISPATCH_POLLING = 0, |
| 21 | CRYPTO_ASYNC_DISPATCH_INTERRUPT = 1, |
| 22 | }; |
| 23 | |
| 24 | enum crypto_op_class_type:u8 |
| 25 | { |
| 26 | CRYPTO_API_OP_SIMPLE = 0, |
| 27 | CRYPTO_API_OP_CHAINED, |
| 28 | CRYPTO_API_OP_BOTH, |
| 29 | }; |
| 30 | |
Vratko Polak | 139aba2 | 2023-08-17 16:22:48 +0200 | [diff] [blame] | 31 | /** \brief crypto: Use polling or interrupt dispatch. |
| 32 | Always unset the adaptive flag (that is why it is deprecated). |
Nathan Skrzypczak | 0c936b1 | 2020-08-31 15:33:57 +0200 | [diff] [blame] | 33 | @param client_index - opaque cookie to identify the sender |
| 34 | @param context - sender context, to match reply w/ request |
| 35 | @param mode - dispatch mode |
| 36 | */ |
| 37 | |
| 38 | autoreply define crypto_set_async_dispatch |
| 39 | { |
Xiaoming Jiang | 9a9604b | 2023-03-09 02:03:50 +0000 | [diff] [blame] | 40 | option deprecated; |
Vratko Polak | 139aba2 | 2023-08-17 16:22:48 +0200 | [diff] [blame] | 41 | option replaced_by="crypto_set_async_dispatch_v2"; |
Nathan Skrzypczak | 0c936b1 | 2020-08-31 15:33:57 +0200 | [diff] [blame] | 42 | u32 client_index; |
| 43 | u32 context; |
| 44 | vl_api_crypto_dispatch_mode_t mode; |
| 45 | }; |
| 46 | |
Vratko Polak | 139aba2 | 2023-08-17 16:22:48 +0200 | [diff] [blame] | 47 | /** \brief crypto: Change the way crypto operations are dispatched. |
| 48 | Use adaptive (or not) mode, starting in polling or interrupt state. |
| 49 | @param client_index - opaque cookie to identify the sender |
| 50 | @param context - sender context, to match reply w/ request |
| 51 | @param mode - dispatch initial state |
| 52 | @param adaptive - whether on not the state shall change depending on load |
| 53 | */ |
| 54 | |
| 55 | autoreply define crypto_set_async_dispatch_v2 |
| 56 | { |
| 57 | u32 client_index; |
| 58 | u32 context; |
| 59 | vl_api_crypto_dispatch_mode_t mode; |
| 60 | bool adaptive; |
| 61 | }; |
| 62 | |
Yulong Pei | 8c91b2a | 2020-09-14 19:45:03 -0700 | [diff] [blame] | 63 | /** \brief crypto: set crypto handler |
Nathan Skrzypczak | 0c936b1 | 2020-08-31 15:33:57 +0200 | [diff] [blame] | 64 | @param client_index - opaque cookie to identify the sender |
| 65 | @param context - sender context, to match reply w/ request |
| 66 | @param alg_name - Name of the algorithm to add |
| 67 | @param engine - Name of the engine to add |
| 68 | @param oct - Operation class type (simple, chained, both) |
| 69 | @param is_async - Asynchronous or not |
| 70 | */ |
| 71 | |
| 72 | autoreply define crypto_set_handler |
| 73 | { |
| 74 | u32 client_index; |
| 75 | u32 context; |
| 76 | string alg_name[32]; |
| 77 | string engine[16]; |
| 78 | vl_api_crypto_op_class_type_t oct; |
| 79 | u8 is_async; |
| 80 | }; |
| 81 | |
| 82 | /* |
| 83 | * Local Variables: |
| 84 | * eval: (c-set-style "gnu") |
| 85 | * End: |
| 86 | */ |