FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
gso_api.c
Go to the documentation of this file.
1 /*
2  *------------------------------------------------------------------
3  * gso_api.c - Generic Segmentation Offload api
4  *
5  * Copyright (c) 2019 Cisco and/or its affiliates.
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at:
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *------------------------------------------------------------------
18  */
19 
20 #include <vnet/vnet.h>
21 #include <vlibmemory/api.h>
22 #include <vnet/gso/gso.h>
23 
24 #include <vnet/format_fns.h>
25 #include <vnet/gso/gso.api_enum.h>
26 #include <vnet/gso/gso.api_types.h>
27 
28 #define REPLY_MSG_ID_BASE gso_main.msg_id_base
30 
31 static void
34 {
35  vl_api_feature_gso_enable_disable_reply_t *rmp;
36  int rv = 0;
37 
39 
40  rv =
42  mp->enable_disable);
43 
45 
46  REPLY_MACRO (VL_API_FEATURE_GSO_ENABLE_DISABLE_REPLY);
47 }
48 
49 #include <vnet/gso/gso.api.c>
50 
51 static clib_error_t *
53 {
54  /*
55  * Set up the (msg_name, crc, message-id) table
56  */
58 
59  return 0;
60 }
61 
63 
64 /*
65  * fd.io coding-style-patch-verification: ON
66  *
67  * Local Variables:
68  * eval: (c-set-style "gnu")
69  * End:
70  */
VALIDATE_SW_IF_INDEX
#define VALIDATE_SW_IF_INDEX(mp)
Definition: api_helper_macros.h:281
api.h
VLIB_API_INIT_FUNCTION
VLIB_API_INIT_FUNCTION(feature_gso_api_hookup)
gso_main_t::msg_id_base
u16 msg_id_base
Definition: gso.h:25
vl_api_feature_gso_enable_disable_t_handler
static void vl_api_feature_gso_enable_disable_t_handler(vl_api_feature_gso_enable_disable_t *mp)
Definition: gso_api.c:33
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
feature_gso_api_hookup
static clib_error_t * feature_gso_api_hookup(vlib_main_t *vm)
Definition: gso_api.c:52
vl_api_feature_gso_enable_disable_t::enable_disable
bool enable_disable
Definition: gso.api:31
REPLY_MACRO
#define REPLY_MACRO(t)
Definition: api_helper_macros.h:30
setup_message_id_table
static void setup_message_id_table(api_main_t *am)
Definition: sr_mpls_api.c:174
vnet_sw_interface_gso_enable_disable
int vnet_sw_interface_gso_enable_disable(u32 sw_if_index, u8 enable)
Definition: gso.c:27
gso.h
BAD_SW_IF_INDEX_LABEL
#define BAD_SW_IF_INDEX_LABEL
Definition: api_helper_macros.h:289
format_fns.h
vl_api_feature_gso_enable_disable_t
Enable or disable interface feature gso arc.
Definition: gso.api:26
api_helper_macros.h
gso_main
gso_main_t gso_main
Definition: gso.c:24
vlib_main_t
Definition: main.h:102
clib_error_t
Definition: clib_error.h:21
vl_api_feature_gso_enable_disable_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition: gso.api:30
rv
int __clib_unused rv
Definition: application.c:491
vnet.h