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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #include <vnet/vnet.h>
19 #include <vnet/plugin/plugin.h>
21 #include <vnet/ip/ip_types_api.h>
22 #include <vpp/app/version.h>
24 #include <vlibapi/api.h>
25 #include <vlibmemory/api.h>
27 #include <crypto_sw_scheduler/crypto_sw_scheduler.h>
29 /* define message IDs */
30 #include <vnet/format_fns.h>
31 #include <crypto_sw_scheduler/crypto_sw_scheduler.api_enum.h>
32 #include <crypto_sw_scheduler/crypto_sw_scheduler.api_types.h>
35 * Base message ID fot the plugin
37 static u32 crypto_sw_scheduler_base_msg_id;
39 #define REPLY_MSG_ID_BASE crypto_sw_scheduler_base_msg_id
41 #include <vlibapi/api_helper_macros.h>
44 vl_api_crypto_sw_scheduler_set_worker_t_handler
45 (vl_api_crypto_sw_scheduler_set_worker_t * mp)
47 vl_api_crypto_sw_scheduler_set_worker_reply_t *rmp;
52 worker_index = ntohl (mp->worker_index);
53 crypto_enable = mp->crypto_enable;
55 rv = crypto_sw_scheduler_set_worker_crypto (worker_index, crypto_enable);
57 REPLY_MACRO (VL_API_CRYPTO_SW_SCHEDULER_SET_WORKER_REPLY);
60 #include <crypto_sw_scheduler/crypto_sw_scheduler.api.c>
63 crypto_sw_scheduler_api_init (vlib_main_t * vm)
65 /* Ask for a correctly-sized block of API message decode slots */
66 crypto_sw_scheduler_base_msg_id = setup_message_id_table ();
72 * fd.io coding-style-patch-verification: ON
75 * eval: (c-set-style "gnu")