aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/pg/pg_api.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2024-10-03 23:18:17 +0000
committerBeno�t Ganne <bganne@cisco.com>2024-10-07 08:39:23 +0000
commit0b1bd9df33c02585e3be2fe048e5427b9574b699 (patch)
treebf3e5d8094eaf47d7ac56a094fc3a828ec7bbe4d /src/vnet/pg/pg_api.c
parent28955ceb8bb95ae05f5fce78ed3e9fec7e4bede6 (diff)
pg: add support to delete pg interface
Type: improvement Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I3102fded415c644673fb79a0fdb7a7448ce20f26
Diffstat (limited to 'src/vnet/pg/pg_api.c')
-rw-r--r--src/vnet/pg/pg_api.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/vnet/pg/pg_api.c b/src/vnet/pg/pg_api.c
index e5d0a08a527..f7fc569a8c0 100644
--- a/src/vnet/pg/pg_api.c
+++ b/src/vnet/pg/pg_api.c
@@ -63,6 +63,24 @@ vl_api_pg_create_interface_v2_t_handler (vl_api_pg_create_interface_v2_t *mp)
}
static void
+vl_api_pg_delete_interface_t_handler (vl_api_pg_delete_interface_t *mp)
+{
+ vl_api_pg_delete_interface_reply_t *rmp;
+ int rv = 0;
+
+ VALIDATE_SW_IF_INDEX (mp);
+
+ u32 sw_if_index = ntohl (mp->sw_if_index);
+
+ pg_main_t *pg = &pg_main;
+
+ rv = pg_interface_delete (sw_if_index);
+
+ BAD_SW_IF_INDEX_LABEL;
+ REPLY_MACRO (VL_API_PG_DELETE_INTERFACE_REPLY);
+}
+
+static void
vl_api_pg_interface_enable_disable_coalesce_t_handler
(vl_api_pg_interface_enable_disable_coalesce_t * mp)
{