session: ckpair store & crypto engine as mq params
Type: feature This patch adds the logic to pass to connect & listen msg in the mq the following parameters * ckpair index * crypto engine (for now only used in quic) Change-Id: I7213d8b581cb4532a9a6b18c4b3fe021287b7733 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
This commit is contained in:

committed by
Florin Coras

parent
9d3e1b433f
commit
45ec9f49bc
@ -151,7 +151,8 @@ _(RSRC_IN_USE, -155, "Resource In Use") \
|
||||
_(KEY_LENGTH, -156, "invalid Key Length") \
|
||||
_(FIB_PATH_UNSUPPORTED_NH_PROTO, -157, "Unsupported FIB Path protocol") \
|
||||
_(API_ENDIAN_FAILED, -159, "Endian mismatch detected") \
|
||||
_(NO_CHANGE, -160, "No change in table")
|
||||
_(NO_CHANGE, -160, "No change in table") \
|
||||
_(MISSING_CERT_KEY, -161, "Missing certifcate or key")
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
@ -296,6 +296,7 @@ typedef struct session_listen_msg_
|
||||
u8 is_ip4;
|
||||
ip46_address_t ip;
|
||||
u32 ckpair_index;
|
||||
u8 crypto_engine;
|
||||
} __clib_packed session_listen_msg_t;
|
||||
|
||||
STATIC_ASSERT (sizeof (session_listen_msg_t) <= SESSION_CTRL_MSG_MAX_SIZE,
|
||||
@ -376,6 +377,7 @@ typedef struct session_connect_msg_
|
||||
u8 hostname[16];
|
||||
u64 parent_handle;
|
||||
u32 ckpair_index;
|
||||
u8 crypto_engine;
|
||||
} __clib_packed session_connect_msg_t;
|
||||
|
||||
STATIC_ASSERT (sizeof (session_connect_msg_t) <= SESSION_CTRL_MSG_MAX_SIZE,
|
||||
|
@ -1403,7 +1403,7 @@ done:
|
||||
/* *INDENT-OFF* */
|
||||
REPLY_MACRO2 (VL_API_APP_ADD_CERT_KEY_PAIR_REPLY, ({
|
||||
if (!rv)
|
||||
rmp->index = a->index;
|
||||
rmp->index = clib_host_to_net_u32 (a->index);
|
||||
}));
|
||||
/* *INDENT-ON* */
|
||||
}
|
||||
@ -1412,16 +1412,18 @@ static void
|
||||
vl_api_app_del_cert_key_pair_t_handler (vl_api_app_del_cert_key_pair_t * mp)
|
||||
{
|
||||
vl_api_app_del_cert_key_pair_reply_t *rmp;
|
||||
u32 ckpair_index;
|
||||
int rv = 0;
|
||||
if (session_main_is_enabled () == 0)
|
||||
{
|
||||
rv = VNET_API_ERROR_FEATURE_DISABLED;
|
||||
goto done;
|
||||
}
|
||||
rv = vnet_app_del_cert_key_pair (mp->index);
|
||||
ckpair_index = clib_net_to_host_u32 (mp->index);
|
||||
rv = vnet_app_del_cert_key_pair (ckpair_index);
|
||||
|
||||
done:
|
||||
REPLY_MACRO (VL_API_APP_ADD_CERT_KEY_PAIR_REPLY);
|
||||
REPLY_MACRO (VL_API_APP_DEL_CERT_KEY_PAIR_REPLY);
|
||||
}
|
||||
|
||||
/* ### WILL BE DEPRECATED POST 20.01 ### */
|
||||
|
@ -55,6 +55,7 @@ session_mq_listen_handler (void *data)
|
||||
a->sep.sw_if_index = ENDPOINT_INVALID_INDEX;
|
||||
a->sep.transport_proto = mp->proto;
|
||||
a->sep_ext.ckpair_index = mp->ckpair_index;
|
||||
a->sep_ext.crypto_engine = mp->crypto_engine;
|
||||
a->app_index = app->app_index;
|
||||
a->wrk_map_index = mp->wrk_index;
|
||||
|
||||
@ -115,6 +116,7 @@ session_mq_connect_handler (void *data)
|
||||
a->sep.peer.sw_if_index = ENDPOINT_INVALID_INDEX;
|
||||
a->sep_ext.parent_handle = mp->parent_handle;
|
||||
a->sep_ext.ckpair_index = mp->ckpair_index;
|
||||
a->sep_ext.crypto_engine = mp->crypto_engine;
|
||||
if (mp->hostname_len)
|
||||
{
|
||||
vec_validate (a->sep_ext.hostname, mp->hostname_len - 1);
|
||||
|
@ -46,6 +46,7 @@ typedef struct _session_endpoint_cfg
|
||||
u8 *hostname;
|
||||
u64 parent_handle;
|
||||
u32 ckpair_index;
|
||||
u8 crypto_engine;
|
||||
} session_endpoint_cfg_t;
|
||||
|
||||
#define SESSION_IP46_ZERO \
|
||||
|
Reference in New Issue
Block a user