1812afe71SBenoît Ganne/*
2812afe71SBenoît Ganne *------------------------------------------------------------------
3812afe71SBenoît Ganne * Copyright (c) 2019 Cisco and/or its affiliates.
4812afe71SBenoît Ganne * Licensed under the Apache License, Version 2.0 (the "License");
5812afe71SBenoît Ganne * you may not use this file except in compliance with the License.
6812afe71SBenoît Ganne * You may obtain a copy of the License at:
7812afe71SBenoît Ganne *
8812afe71SBenoît Ganne *     http://www.apache.org/licenses/LICENSE-2.0
9812afe71SBenoît Ganne *
10812afe71SBenoît Ganne * Unless required by applicable law or agreed to in writing, software
11812afe71SBenoît Ganne * distributed under the License is distributed on an "AS IS" BASIS,
12812afe71SBenoît Ganne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13812afe71SBenoît Ganne * See the License for the specific language governing permissions and
14812afe71SBenoît Ganne * limitations under the License.
15812afe71SBenoît Ganne *------------------------------------------------------------------
16812afe71SBenoît Ganne */
17812afe71SBenoît Ganne
18812afe71SBenoît Ganneoption version = "1.0.0";
19b644eb54SOle Troanimport "vnet/interface_types.api";
20812afe71SBenoît Ganne
21d8c1ef92SBenoît Ganneenum rdma_mode
22d8c1ef92SBenoît Ganne{
23d8c1ef92SBenoît Ganne  RDMA_API_MODE_AUTO = 0,
24d8c1ef92SBenoît Ganne  RDMA_API_MODE_IBV = 1,
25d8c1ef92SBenoît Ganne  RDMA_API_MODE_DV = 2,
26d8c1ef92SBenoît Ganne};
27d8c1ef92SBenoît Ganne
28d8c1ef92SBenoît Ganne
29812afe71SBenoît Ganne/** \brief
30812afe71SBenoît Ganne    @param client_index - opaque cookie to identify the sender
31812afe71SBenoît Ganne    @param context - sender context, to match reply w/ request
32812afe71SBenoît Ganne    @param host_if - Linux netdev interface name
33812afe71SBenoît Ganne    @param name - new rdma interface name
34d8c1ef92SBenoît Ganne    @param rxq_num - number of receive queues (optional)
35d8c1ef92SBenoît Ganne    @param rxq_size - receive queue size (optional)
36d8c1ef92SBenoît Ganne    @param txq_size - transmit queue size (optional)
37d8c1ef92SBenoît Ganne    @param mode - operation mode (optional)
38812afe71SBenoît Ganne*/
39812afe71SBenoît Ganne
40812afe71SBenoît Gannedefine rdma_create
41812afe71SBenoît Ganne{
42812afe71SBenoît Ganne  u32 client_index;
43812afe71SBenoît Ganne  u32 context;
44812afe71SBenoît Ganne
45812afe71SBenoît Ganne  string host_if[64];
46812afe71SBenoît Ganne  string name[64];
47d8c1ef92SBenoît Ganne  u16 rxq_num [default=1];
48d8c1ef92SBenoît Ganne  u16 rxq_size [default=1024];
49d8c1ef92SBenoît Ganne  u16 txq_size [default=1024];
50d8c1ef92SBenoît Ganne  vl_api_rdma_mode_t mode [default=0];
51d8c1ef92SBenoît Ganne  option vat_help = "<host-if ifname> [name <name>] [rx-queue-size <size>] [tx-queue-size <size>] [num-rx-queues <size>] [mode <auto|ibv|dv>]";
52812afe71SBenoît Ganne};
53812afe71SBenoît Ganne
54812afe71SBenoît Ganne/** \brief
55812afe71SBenoît Ganne    @param context - sender context, to match reply w/ request
56812afe71SBenoît Ganne    @param retval - return value for request
57812afe71SBenoît Ganne    @param sw_if_index - software index for the new rdma interface
58812afe71SBenoît Ganne*/
59812afe71SBenoît Ganne
60812afe71SBenoît Gannedefine rdma_create_reply
61812afe71SBenoît Ganne{
62812afe71SBenoît Ganne  u32 context;
63812afe71SBenoît Ganne  i32 retval;
64b644eb54SOle Troan  vl_api_interface_index_t sw_if_index;
65812afe71SBenoît Ganne};
66812afe71SBenoît Ganne
67812afe71SBenoît Ganne/** \brief
68812afe71SBenoît Ganne    @param client_index - opaque cookie to identify the sender
69812afe71SBenoît Ganne    @param context - sender context, to match reply w/ request
70812afe71SBenoît Ganne    @param sw_if_index - interface index
71812afe71SBenoît Ganne*/
72812afe71SBenoît Ganne
73812afe71SBenoît Ganneautoreply define rdma_delete
74812afe71SBenoît Ganne{
75812afe71SBenoît Ganne  u32 client_index;
76812afe71SBenoît Ganne  u32 context;
77812afe71SBenoît Ganne
78b644eb54SOle Troan  vl_api_interface_index_t sw_if_index;
79812afe71SBenoît Ganne  option vat_help = "<sw_if_index index>";
80812afe71SBenoît Ganne};
81812afe71SBenoît Ganne
82812afe71SBenoît Ganne/*
83812afe71SBenoît Ganne * Local Variables:
84812afe71SBenoît Ganne * eval: (c-set-style "gnu")
85812afe71SBenoît Ganne * End:
86812afe71SBenoît Ganne */
87