aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/crypto/crypto.api
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2023-08-17 16:22:48 +0200
committerFan Zhang <fanzhang.oss@gmail.com>2023-09-12 12:42:11 +0000
commit139aba204780f6cc2845b311820a0b4c47517d02 (patch)
treede58ace65178dd5ae772c70e0a73cfb3c5a2f4c9 /src/vnet/crypto/crypto.api
parentceb64add2afe62c25a05be8c26cce5ea8d243b22 (diff)
crypto: allow changing dispatch mode
This change aims to affect crypto_sw_scheduler behavior, but all the edits end up in vnet/crypto. Previous release CSIT tests were testing async crypto in polling mode. After 9a9604b09f15691d7c4ddf29afd99a31e7e31eed introduced adaptive mode for crypto dispatch, the CSIT performance got way worse. Possibly, there is another VPP bug related to adaptive mode (it should not lose as many packets as seen in CSIT), but the next release is too close for trying to fix that. This change (instead of fixing adaptive mode) allows CSIT to continue testing polling mode (after explicit API call), while keeping the adaptive mode as default behavior. The deprecated crypto_set_async_dispatch always disable adaptive mode, crypto_set_async_dispatch_v2 has parameter to enable or disable it. The mode parameter is still used for the inital state of adaptive mode. Type: feature Change-Id: Ib98080eefb4be291207af543884f2c3837f92f59 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'src/vnet/crypto/crypto.api')
-rw-r--r--src/vnet/crypto/crypto.api20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/vnet/crypto/crypto.api b/src/vnet/crypto/crypto.api
index 61553e82fe3..8fec805dcfc 100644
--- a/src/vnet/crypto/crypto.api
+++ b/src/vnet/crypto/crypto.api
@@ -28,7 +28,8 @@ enum crypto_op_class_type:u8
CRYPTO_API_OP_BOTH,
};
- /** \brief crypto: use polling or interrupt dispatch
+ /** \brief crypto: Use polling or interrupt dispatch.
+ Always unset the adaptive flag (that is why it is deprecated).
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
@param mode - dispatch mode
@@ -37,11 +38,28 @@ enum crypto_op_class_type:u8
autoreply define crypto_set_async_dispatch
{
option deprecated;
+ option replaced_by="crypto_set_async_dispatch_v2";
u32 client_index;
u32 context;
vl_api_crypto_dispatch_mode_t mode;
};
+ /** \brief crypto: Change the way crypto operations are dispatched.
+ Use adaptive (or not) mode, starting in polling or interrupt state.
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param mode - dispatch initial state
+ @param adaptive - whether on not the state shall change depending on load
+*/
+
+autoreply define crypto_set_async_dispatch_v2
+{
+ u32 client_index;
+ u32 context;
+ vl_api_crypto_dispatch_mode_t mode;
+ bool adaptive;
+};
+
/** \brief crypto: set crypto handler
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request