aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/rdma/api.c
diff options
context:
space:
mode:
authorMohammed Hawari <mohammed@hawari.fr>2020-10-27 17:42:32 +0100
committerBeno�t Ganne <bganne@cisco.com>2020-11-13 16:58:18 +0000
commit798267aaa218b99daab4860fd630b9d4bb744c0d (patch)
treeb7a628146d4858b9ae4a232ecd9f501085eed976 /src/plugins/rdma/api.c
parentb8e129314aaf43a40e9bf15947578181cc53d675 (diff)
rdma: implement multiseg rx without striding rq
Change-Id: I623617ad3c80610805dd3cf2a5f371e6677f4844 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: improvement
Diffstat (limited to 'src/plugins/rdma/api.c')
-rw-r--r--src/plugins/rdma/api.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/plugins/rdma/api.c b/src/plugins/rdma/api.c
index fe1103f99fe..06e7385136f 100644
--- a/src/plugins/rdma/api.c
+++ b/src/plugins/rdma/api.c
@@ -45,6 +45,37 @@ rdma_api_mode (vl_api_rdma_mode_t mode)
}
static void
+vl_api_rdma_create_v2_t_handler (vl_api_rdma_create_v2_t * mp)
+{
+ vlib_main_t *vm = vlib_get_main ();
+ rdma_main_t *rm = &rdma_main;
+ vl_api_rdma_create_v2_reply_t *rmp;
+ rdma_create_if_args_t args;
+ int rv;
+
+ clib_memset (&args, 0, sizeof (rdma_create_if_args_t));
+
+ args.ifname = mp->host_if;
+ args.name = mp->name;
+ args.rxq_num = ntohs (mp->rxq_num);
+ args.rxq_size = ntohs (mp->rxq_size);
+ args.txq_size = ntohs (mp->txq_size);
+ args.mode = rdma_api_mode (mp->mode);
+ args.disable_striding_rq = 0;
+ args.no_multi_seg = mp->no_multi_seg;
+ args.max_pktlen = ntohs (mp->max_pktlen);
+ rdma_create_if (vm, &args);
+ rv = args.rv;
+
+ /* *INDENT-OFF* */
+ REPLY_MACRO2 (VL_API_RDMA_CREATE_V2_REPLY + rm->msg_id_base,
+ ({
+ rmp->sw_if_index = ntohl (args.sw_if_index);
+ }));
+ /* *INDENT-ON* */
+}
+
+static void
vl_api_rdma_create_t_handler (vl_api_rdma_create_t * mp)
{
vlib_main_t *vm = vlib_get_main ();
@@ -61,6 +92,9 @@ vl_api_rdma_create_t_handler (vl_api_rdma_create_t * mp)
args.rxq_size = ntohs (mp->rxq_size);
args.txq_size = ntohs (mp->txq_size);
args.mode = rdma_api_mode (mp->mode);
+ args.disable_striding_rq = 0;
+ args.no_multi_seg = 1;
+ args.max_pktlen = 0;
rdma_create_if (vm, &args);
rv = args.rv;