app/testpmd: enable DDP remove profile feature
[dpdk.git] / app / test-pmd / cmdline.c
index b84c1ab..39fa26c 100644 (file)
@@ -221,6 +221,9 @@ static void cmd_help_long_parsed(void *parsed_result,
                        "ddp get list (port_id)\n"
                        "    Get ddp profile info list\n\n"
 
+                       "ddp get info (profile_path)\n"
+                       "    Get ddp profile information.\n\n"
+
                        "show vf stats (port_id) (vf_id)\n"
                        "    Display a VF's statistics.\n\n"
 
@@ -281,18 +284,15 @@ static void cmd_help_long_parsed(void *parsed_result,
                        "set tx loopback (port_id) (on|off)\n"
                        "    Enable or disable tx loopback.\n\n"
 
-#ifdef RTE_LIBRTE_IXGBE_PMD
                        "set all queues drop (port_id) (on|off)\n"
                        "    Set drop enable bit for all queues.\n\n"
 
                        "set vf split drop (port_id) (vf_id) (on|off)\n"
                        "    Set split drop enable bit for a VF from the PF.\n\n"
-#endif
 
                        "set vf mac antispoof (port_id) (vf_id) (on|off).\n"
                        "    Set MAC antispoof for a VF from the PF.\n\n"
 
-#ifdef RTE_LIBRTE_IXGBE_PMD
                        "set macsec offload (port_id) on encrypt (on|off) replay-protect (on|off)\n"
                        "    Enable MACsec offload.\n\n"
 
@@ -304,7 +304,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 
                        "set macsec sa (tx|rx) (port_id) (idx) (an) (pn) (key)\n"
                        "    Configure MACsec secure association (SA).\n\n"
-#endif
 
                        "set vf broadcast (port_id) (vf_id) (on|off)\n"
                        "    Set VF broadcast for a VF from the PF.\n\n"
@@ -604,9 +603,12 @@ static void cmd_help_long_parsed(void *parsed_result,
                        "E-tag set filter del e-tag-id (value) port (port_id)\n"
                        "    Delete an E-tag forwarding filter on a port\n\n"
 
-                       "ddp add (port_id) (profile_path)\n"
+                       "ddp add (port_id) (profile_path[,output_path])\n"
                        "    Load a profile package on a port\n\n"
 
+                       "ddp del (port_id) (profile_path)\n"
+                       "    Delete a profile package from a port\n\n"
+
                        "ptype mapping get (port_id) (valid_only)\n"
                        "    Get ptype mapping on a port\n\n"
 
@@ -3928,7 +3930,7 @@ cmd_set_bypass_mode_parsed(void *parsed_result,
        portid_t port_id = res->port_id;
        int32_t rc = -EINVAL;
 
-#ifdef RTE_LIBRTE_IXGBE_BYPASS
+#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS
        uint32_t bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NORMAL;
 
        if (!strcmp(res->value, "bypass"))
@@ -3996,7 +3998,7 @@ cmd_set_bypass_event_parsed(void *parsed_result,
        struct cmd_set_bypass_event_result *res = parsed_result;
        portid_t port_id = res->port_id;
 
-#ifdef RTE_LIBRTE_IXGBE_BYPASS
+#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS
        uint32_t bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_NONE;
        uint32_t bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NORMAL;
 
@@ -4101,7 +4103,7 @@ cmd_set_bypass_timeout_parsed(void *parsed_result,
 {
        __rte_unused struct cmd_set_bypass_timeout_result *res = parsed_result;
 
-#ifdef RTE_LIBRTE_IXGBE_BYPASS
+#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS
        if (!strcmp(res->value, "1.5"))
                bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_1_5_SEC;
        else if (!strcmp(res->value, "2"))
@@ -4164,7 +4166,7 @@ cmd_show_bypass_config_parsed(void *parsed_result,
        struct cmd_show_bypass_config_result *res = parsed_result;
        portid_t port_id = res->port_id;
        int rc = -EINVAL;
-#ifdef RTE_LIBRTE_IXGBE_BYPASS
+#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS
        uint32_t event_mode;
        uint32_t bypass_mode;
        uint32_t timeout = bypass_timeout;
@@ -4568,7 +4570,7 @@ static void cmd_add_bonding_slave_parsed(void *parsed_result,
        portid_t master_port_id = res->port_id;
        portid_t slave_port_id = res->slave_id;
 
-       /* Set the primary slave for a bonded device. */
+       /* add the slave for a bonded device. */
        if (0 != rte_eth_bond_slave_add(master_port_id, slave_port_id)) {
                printf("\t Failed to add slave %d to master port = %d.\n",
                                slave_port_id, master_port_id);
@@ -4626,7 +4628,7 @@ static void cmd_remove_bonding_slave_parsed(void *parsed_result,
        portid_t master_port_id = res->port_id;
        portid_t slave_port_id = res->slave_id;
 
-       /* Set the primary slave for a bonded device. */
+       /* remove the slave from a bonded device. */
        if (0 != rte_eth_bond_slave_remove(master_port_id, slave_port_id)) {
                printf("\t Failed to remove slave %d from master port = %d.\n",
                                slave_port_id, master_port_id);
@@ -6742,7 +6744,6 @@ cmdline_parse_inst_t cmd_set_vf_macvlan_filter = {
        },
 };
 
-#ifdef RTE_LIBRTE_IXGBE_PMD
 /* *** CONFIGURE VF TRAFFIC CONTROL *** */
 struct cmd_set_vf_traffic {
        cmdline_fixed_string_t set;
@@ -6894,7 +6895,6 @@ cmdline_parse_inst_t cmd_set_vf_rxmode = {
                NULL,
        },
 };
-#endif
 
 /* *** ADD MAC ADDRESS FILTER FOR A VF OF A PORT *** */
 struct cmd_vf_mac_addr_result {
@@ -11583,7 +11583,6 @@ cmdline_parse_inst_t cmd_set_all_queues_drop_en = {
        },
 };
 
-#ifdef RTE_LIBRTE_IXGBE_PMD
 /* vf split drop enable configuration */
 
 /* Common result structure for vf split drop enable */
@@ -11634,14 +11633,16 @@ cmd_set_vf_split_drop_en_parsed(
        __attribute__((unused)) void *data)
 {
        struct cmd_vf_split_drop_en_result *res = parsed_result;
-       int ret;
+       int ret = -ENOTSUP;
        int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0;
 
        if (port_id_is_invalid(res->port_id, ENABLED_WARN))
                return;
 
+#ifdef RTE_LIBRTE_IXGBE_PMD
        ret = rte_pmd_ixgbe_set_vf_split_drop_en(res->port_id, res->vf_id,
                        is_on);
+#endif
        switch (ret) {
        case 0:
                break;
@@ -11651,6 +11652,9 @@ cmd_set_vf_split_drop_en_parsed(
        case -ENODEV:
                printf("invalid port_id %d\n", res->port_id);
                break;
+       case -ENOTSUP:
+               printf("not supported on port %d\n", res->port_id);
+               break;
        default:
                printf("programming error: (%s)\n", strerror(-ret));
        }
@@ -11671,7 +11675,6 @@ cmdline_parse_inst_t cmd_set_vf_split_drop_en = {
                NULL,
        },
 };
-#endif
 
 /* vf mac address configuration */
 
@@ -11777,7 +11780,6 @@ cmdline_parse_inst_t cmd_set_vf_mac_addr = {
        },
 };
 
-#ifdef RTE_LIBRTE_IXGBE_PMD
 /* MACsec configuration */
 
 /* Common result structure for MACsec offload enable */
@@ -11838,7 +11840,7 @@ cmd_set_macsec_offload_on_parsed(
        __attribute__((unused)) void *data)
 {
        struct cmd_macsec_offload_on_result *res = parsed_result;
-       int ret;
+       int ret = -ENOTSUP;
        portid_t port_id = res->port_id;
        int en = (strcmp(res->en_on_off, "on") == 0) ? 1 : 0;
        int rp = (strcmp(res->rp_on_off, "on") == 0) ? 1 : 0;
@@ -11847,7 +11849,11 @@ cmd_set_macsec_offload_on_parsed(
                return;
 
        ports[port_id].tx_ol_flags |= TESTPMD_TX_OFFLOAD_MACSEC;
+#ifdef RTE_LIBRTE_IXGBE_PMD
        ret = rte_pmd_ixgbe_macsec_enable(port_id, en, rp);
+#endif
+       RTE_SET_USED(en);
+       RTE_SET_USED(rp);
 
        switch (ret) {
        case 0:
@@ -11855,6 +11861,9 @@ cmd_set_macsec_offload_on_parsed(
        case -ENODEV:
                printf("invalid port_id %d\n", port_id);
                break;
+       case -ENOTSUP:
+               printf("not supported on port %d\n", port_id);
+               break;
        default:
                printf("programming error: (%s)\n", strerror(-ret));
        }
@@ -11917,14 +11926,16 @@ cmd_set_macsec_offload_off_parsed(
        __attribute__((unused)) void *data)
 {
        struct cmd_macsec_offload_off_result *res = parsed_result;
-       int ret;
+       int ret = -ENOTSUP;
        portid_t port_id = res->port_id;
 
        if (port_id_is_invalid(port_id, ENABLED_WARN))
                return;
 
        ports[port_id].tx_ol_flags &= ~TESTPMD_TX_OFFLOAD_MACSEC;
+#ifdef RTE_LIBRTE_IXGBE_PMD
        ret = rte_pmd_ixgbe_macsec_disable(port_id);
+#endif
 
        switch (ret) {
        case 0:
@@ -11932,6 +11943,9 @@ cmd_set_macsec_offload_off_parsed(
        case -ENODEV:
                printf("invalid port_id %d\n", port_id);
                break;
+       case -ENOTSUP:
+               printf("not supported on port %d\n", port_id);
+               break;
        default:
                printf("programming error: (%s)\n", strerror(-ret));
        }
@@ -11999,20 +12013,27 @@ cmd_set_macsec_sc_parsed(
        __attribute__((unused)) void *data)
 {
        struct cmd_macsec_sc_result *res = parsed_result;
-       int ret;
+       int ret = -ENOTSUP;
        int is_tx = (strcmp(res->tx_rx, "tx") == 0) ? 1 : 0;
 
+#ifdef RTE_LIBRTE_IXGBE_PMD
        ret = is_tx ?
                rte_pmd_ixgbe_macsec_config_txsc(res->port_id,
                                res->mac.addr_bytes) :
                rte_pmd_ixgbe_macsec_config_rxsc(res->port_id,
                                res->mac.addr_bytes, res->pi);
+#endif
+       RTE_SET_USED(is_tx);
+
        switch (ret) {
        case 0:
                break;
        case -ENODEV:
                printf("invalid port_id %d\n", res->port_id);
                break;
+       case -ENOTSUP:
+               printf("not supported on port %d\n", res->port_id);
+               break;
        default:
                printf("programming error: (%s)\n", strerror(-ret));
        }
@@ -12092,7 +12113,7 @@ cmd_set_macsec_sa_parsed(
        __attribute__((unused)) void *data)
 {
        struct cmd_macsec_sa_result *res = parsed_result;
-       int ret;
+       int ret = -ENOTSUP;
        int is_tx = (strcmp(res->tx_rx, "tx") == 0) ? 1 : 0;
        uint8_t key[16] = { 0 };
        uint8_t xdgt0;
@@ -12114,11 +12135,16 @@ cmd_set_macsec_sa_parsed(
                key[i] = (uint8_t) ((xdgt0 * 16) + xdgt1);
        }
 
+#ifdef RTE_LIBRTE_IXGBE_PMD
        ret = is_tx ?
                rte_pmd_ixgbe_macsec_select_txsa(res->port_id,
                        res->idx, res->an, res->pn, key) :
                rte_pmd_ixgbe_macsec_select_rxsa(res->port_id,
                        res->idx, res->an, res->pn, key);
+#endif
+       RTE_SET_USED(is_tx);
+       RTE_SET_USED(key);
+
        switch (ret) {
        case 0:
                break;
@@ -12128,6 +12154,9 @@ cmd_set_macsec_sa_parsed(
        case -ENODEV:
                printf("invalid port_id %d\n", res->port_id);
                break;
+       case -ENOTSUP:
+               printf("not supported on port %d\n", res->port_id);
+               break;
        default:
                printf("programming error: (%s)\n", strerror(-ret));
        }
@@ -12150,7 +12179,6 @@ cmdline_parse_inst_t cmd_set_macsec_sa = {
                NULL,
        },
 };
-#endif
 
 /* VF unicast promiscuous mode configuration */
 
@@ -12930,6 +12958,9 @@ cmd_ddp_add_parsed(
        struct cmd_ddp_add_result *res = parsed_result;
        uint8_t *buff;
        uint32_t size;
+       char *filepath;
+       char *file_fld[2];
+       int file_num;
        int ret = -ENOTSUP;
 
        if (res->port_id > nb_ports) {
@@ -12942,9 +12973,18 @@ cmd_ddp_add_parsed(
                return;
        }
 
-       buff = open_ddp_package_file(res->filepath, &size);
-       if (!buff)
+       filepath = strdup(res->filepath);
+       if (filepath == NULL) {
+               printf("Failed to allocate memory\n");
                return;
+       }
+       file_num = rte_strsplit(filepath, strlen(filepath), file_fld, 2, ',');
+
+       buff = open_ddp_package_file(file_fld[0], &size);
+       if (!buff) {
+               free((void *)filepath);
+               return;
+       }
 
 #ifdef RTE_LIBRTE_I40E_PMD
        if (ret == -ENOTSUP)
@@ -12953,18 +12993,21 @@ cmd_ddp_add_parsed(
                                               RTE_PMD_I40E_PKG_OP_WR_ADD);
 #endif
 
-       if (ret < 0)
-               printf("Failed to load profile.\n");
-       else if (ret > 0)
+       if (ret == -EEXIST)
                printf("Profile has already existed.\n");
+       else if (ret < 0)
+               printf("Failed to load profile.\n");
+       else if (file_num == 2)
+               save_ddp_package_file(file_fld[1], buff, size);
 
        close_ddp_package_file(buff);
+       free((void *)filepath);
 }
 
 cmdline_parse_inst_t cmd_ddp_add = {
        .f = cmd_ddp_add_parsed,
        .data = NULL,
-       .help_str = "ddp add <port_id> <profile_path>",
+       .help_str = "ddp add <port_id> <profile_path[,output_path]>",
        .tokens = {
                (void *)&cmd_ddp_add_ddp,
                (void *)&cmd_ddp_add_add,
@@ -12974,6 +13017,203 @@ cmdline_parse_inst_t cmd_ddp_add = {
        },
 };
 
+/* Delete dynamic device personalization*/
+struct cmd_ddp_del_result {
+       cmdline_fixed_string_t ddp;
+       cmdline_fixed_string_t del;
+       uint8_t port_id;
+       char filepath[];
+};
+
+cmdline_parse_token_string_t cmd_ddp_del_ddp =
+       TOKEN_STRING_INITIALIZER(struct cmd_ddp_del_result, ddp, "ddp");
+cmdline_parse_token_string_t cmd_ddp_del_del =
+       TOKEN_STRING_INITIALIZER(struct cmd_ddp_del_result, del, "del");
+cmdline_parse_token_num_t cmd_ddp_del_port_id =
+       TOKEN_NUM_INITIALIZER(struct cmd_ddp_del_result, port_id, UINT8);
+cmdline_parse_token_string_t cmd_ddp_del_filepath =
+       TOKEN_STRING_INITIALIZER(struct cmd_ddp_del_result, filepath, NULL);
+
+static void
+cmd_ddp_del_parsed(
+       void *parsed_result,
+       __attribute__((unused)) struct cmdline *cl,
+       __attribute__((unused)) void *data)
+{
+       struct cmd_ddp_del_result *res = parsed_result;
+       uint8_t *buff;
+       uint32_t size;
+       int ret = -ENOTSUP;
+
+       if (res->port_id > nb_ports) {
+               printf("Invalid port, range is [0, %d]\n", nb_ports - 1);
+               return;
+       }
+
+       if (!all_ports_stopped()) {
+               printf("Please stop all ports first\n");
+               return;
+       }
+
+       buff = open_ddp_package_file(res->filepath, &size);
+       if (!buff)
+               return;
+
+#ifdef RTE_LIBRTE_I40E_PMD
+       if (ret == -ENOTSUP)
+               ret = rte_pmd_i40e_process_ddp_package(res->port_id,
+                                              buff, size,
+                                              RTE_PMD_I40E_PKG_OP_WR_DEL);
+#endif
+
+       if (ret == -EACCES)
+               printf("Profile does not exist.\n");
+       else if (ret < 0)
+               printf("Failed to delete profile.\n");
+
+       close_ddp_package_file(buff);
+}
+
+cmdline_parse_inst_t cmd_ddp_del = {
+       .f = cmd_ddp_del_parsed,
+       .data = NULL,
+       .help_str = "ddp del <port_id> <profile_path>",
+       .tokens = {
+               (void *)&cmd_ddp_del_ddp,
+               (void *)&cmd_ddp_del_del,
+               (void *)&cmd_ddp_del_port_id,
+               (void *)&cmd_ddp_del_filepath,
+               NULL,
+       },
+};
+
+/* Get dynamic device personalization profile info */
+struct cmd_ddp_info_result {
+       cmdline_fixed_string_t ddp;
+       cmdline_fixed_string_t get;
+       cmdline_fixed_string_t info;
+       char filepath[];
+};
+
+cmdline_parse_token_string_t cmd_ddp_info_ddp =
+       TOKEN_STRING_INITIALIZER(struct cmd_ddp_info_result, ddp, "ddp");
+cmdline_parse_token_string_t cmd_ddp_info_get =
+       TOKEN_STRING_INITIALIZER(struct cmd_ddp_info_result, get, "get");
+cmdline_parse_token_string_t cmd_ddp_info_info =
+       TOKEN_STRING_INITIALIZER(struct cmd_ddp_info_result, info, "info");
+cmdline_parse_token_string_t cmd_ddp_info_filepath =
+       TOKEN_STRING_INITIALIZER(struct cmd_ddp_info_result, filepath, NULL);
+
+static void
+cmd_ddp_info_parsed(
+       void *parsed_result,
+       __attribute__((unused)) struct cmdline *cl,
+       __attribute__((unused)) void *data)
+{
+       struct cmd_ddp_info_result *res = parsed_result;
+       uint8_t *pkg;
+       uint32_t pkg_size;
+       int ret = -ENOTSUP;
+#ifdef RTE_LIBRTE_I40E_PMD
+       uint32_t i;
+       uint8_t *buff;
+       uint32_t buff_size;
+       struct rte_pmd_i40e_profile_info info;
+       uint32_t dev_num;
+       struct rte_pmd_i40e_ddp_device_id *devs;
+#endif
+
+       pkg = open_ddp_package_file(res->filepath, &pkg_size);
+       if (!pkg)
+               return;
+
+#ifdef RTE_LIBRTE_I40E_PMD
+       ret = rte_pmd_i40e_get_ddp_info(pkg, pkg_size,
+                               (uint8_t *)&info, sizeof(info),
+                               RTE_PMD_I40E_PKG_INFO_GLOBAL_HEADER);
+       if (!ret) {
+               printf("Global Track id:       0x%x\n", info.track_id);
+               printf("Global Version:        %d.%d.%d.%d\n",
+                       info.version.major,
+                       info.version.minor,
+                       info.version.update,
+                       info.version.draft);
+               printf("Global Package name:   %s\n\n", info.name);
+       }
+
+       ret = rte_pmd_i40e_get_ddp_info(pkg, pkg_size,
+                               (uint8_t *)&info, sizeof(info),
+                               RTE_PMD_I40E_PKG_INFO_HEADER);
+       if (!ret) {
+               printf("i40e Profile Track id: 0x%x\n", info.track_id);
+               printf("i40e Profile Version:  %d.%d.%d.%d\n",
+                       info.version.major,
+                       info.version.minor,
+                       info.version.update,
+                       info.version.draft);
+               printf("i40e Profile name:     %s\n\n", info.name);
+       }
+
+       ret = rte_pmd_i40e_get_ddp_info(pkg, pkg_size,
+                               (uint8_t *)&buff_size, sizeof(buff_size),
+                               RTE_PMD_I40E_PKG_INFO_GLOBAL_NOTES_SIZE);
+       if (!ret && buff_size) {
+               buff = (uint8_t *)malloc(buff_size);
+               if (buff) {
+                       ret = rte_pmd_i40e_get_ddp_info(pkg, pkg_size,
+                                               buff, buff_size,
+                                               RTE_PMD_I40E_PKG_INFO_GLOBAL_NOTES);
+                       if (!ret)
+                               printf("Package Notes:\n%s\n\n", buff);
+                       free(buff);
+               }
+       }
+
+       ret = rte_pmd_i40e_get_ddp_info(pkg, pkg_size,
+                               (uint8_t *)&dev_num, sizeof(dev_num),
+                               RTE_PMD_I40E_PKG_INFO_DEVID_NUM);
+       if (!ret && dev_num) {
+               devs = (struct rte_pmd_i40e_ddp_device_id *)malloc(dev_num *
+                       sizeof(struct rte_pmd_i40e_ddp_device_id));
+               if (devs) {
+                       ret = rte_pmd_i40e_get_ddp_info(pkg, pkg_size,
+                                               (uint8_t *)devs, dev_num *
+                                               sizeof(struct rte_pmd_i40e_ddp_device_id),
+                                               RTE_PMD_I40E_PKG_INFO_DEVID_LIST);
+                       if (!ret) {
+                               printf("List of supported devices:\n");
+                               for (i = 0; i < dev_num; i++) {
+                                       printf("  %04X:%04X %04X:%04X\n",
+                                               devs[i].vendor_dev_id >> 16,
+                                               devs[i].vendor_dev_id & 0xFFFF,
+                                               devs[i].sub_vendor_dev_id >> 16,
+                                               devs[i].sub_vendor_dev_id & 0xFFFF);
+                               }
+                               printf("\n");
+                       }
+                       free(devs);
+               }
+       }
+       ret = 0;
+#endif
+       if (ret == -ENOTSUP)
+               printf("Function not supported in PMD driver\n");
+       close_ddp_package_file(pkg);
+}
+
+cmdline_parse_inst_t cmd_ddp_get_info = {
+       .f = cmd_ddp_info_parsed,
+       .data = NULL,
+       .help_str = "ddp get info <profile_path>",
+       .tokens = {
+               (void *)&cmd_ddp_info_ddp,
+               (void *)&cmd_ddp_info_get,
+               (void *)&cmd_ddp_info_info,
+               (void *)&cmd_ddp_info_filepath,
+               NULL,
+       },
+};
+
 /* Get dynamic device personalization profile info list*/
 #define PROFILE_INFO_SIZE 48
 #define MAX_PROFILE_NUM 16
@@ -13805,7 +14045,6 @@ cmdline_parse_ctx_t main_ctx[] = {
        (cmdline_parse_inst_t *)&cmd_set_vf_vlan_stripq,
        (cmdline_parse_inst_t *)&cmd_set_vf_vlan_insert,
        (cmdline_parse_inst_t *)&cmd_set_tx_loopback,
-#ifdef RTE_LIBRTE_IXGBE_PMD
        (cmdline_parse_inst_t *)&cmd_set_all_queues_drop_en,
        (cmdline_parse_inst_t *)&cmd_set_vf_split_drop_en,
        (cmdline_parse_inst_t *)&cmd_set_macsec_offload_on,
@@ -13813,7 +14052,6 @@ cmdline_parse_ctx_t main_ctx[] = {
        (cmdline_parse_inst_t *)&cmd_set_macsec_sc,
        (cmdline_parse_inst_t *)&cmd_set_macsec_sa,
        (cmdline_parse_inst_t *)&cmd_set_vf_traffic,
-#endif
        (cmdline_parse_inst_t *)&cmd_set_vf_rxmode,
        (cmdline_parse_inst_t *)&cmd_vf_rate_limit,
        (cmdline_parse_inst_t *)&cmd_vf_rxvlan_filter,
@@ -13828,7 +14066,9 @@ cmdline_parse_ctx_t main_ctx[] = {
        (cmdline_parse_inst_t *)&cmd_strict_link_prio,
        (cmdline_parse_inst_t *)&cmd_tc_min_bw,
        (cmdline_parse_inst_t *)&cmd_ddp_add,
+       (cmdline_parse_inst_t *)&cmd_ddp_del,
        (cmdline_parse_inst_t *)&cmd_ddp_get_list,
+       (cmdline_parse_inst_t *)&cmd_ddp_get_info,
        (cmdline_parse_inst_t *)&cmd_show_vf_stats,
        (cmdline_parse_inst_t *)&cmd_clear_vf_stats,
        (cmdline_parse_inst_t *)&cmd_ptype_mapping_get,