bus/pci: fix use after free on unplug
[dpdk.git] / app / test-crypto-perf / cperf_options_parsing.c
index 40b6dfb..c244f81 100644 (file)
@@ -457,6 +457,14 @@ parse_op_type(struct cperf_options *opts, const char *arg)
                {
                        cperf_op_type_strs[CPERF_DOCSIS],
                        CPERF_DOCSIS
+               },
+               {
+                       cperf_op_type_strs[CPERF_IPSEC],
+                       CPERF_IPSEC
+               },
+               {
+                       cperf_op_type_strs[CPERF_ASYM_MODEX],
+                       CPERF_ASYM_MODEX
                }
        };
 
@@ -506,6 +514,12 @@ parse_test_name(struct cperf_options *opts,
 {
        char *test_name = (char *) rte_zmalloc(NULL,
                sizeof(char) * (strlen(arg) + 3), 0);
+       if (test_name == NULL) {
+               RTE_LOG(ERR, USER1, "Failed to rte zmalloc with size: %zu\n",
+                       strlen(arg) + 3);
+               return -1;
+       }
+
        snprintf(test_name, strlen(arg) + 3, "[%s]", arg);
        opts->test_name = test_name;
 
@@ -656,7 +670,8 @@ parse_pdcp_sn_sz(struct cperf_options *opts, const char *arg)
 
 const char *cperf_pdcp_domain_strs[] = {
        [RTE_SECURITY_PDCP_MODE_CONTROL] = "control",
-       [RTE_SECURITY_PDCP_MODE_DATA] = "data"
+       [RTE_SECURITY_PDCP_MODE_DATA] = "data",
+       [RTE_SECURITY_PDCP_MODE_SHORT_MAC] = "short_mac"
 };
 
 static int
@@ -671,6 +686,11 @@ parse_pdcp_domain(struct cperf_options *opts, const char *arg)
                        cperf_pdcp_domain_strs
                        [RTE_SECURITY_PDCP_MODE_DATA],
                        RTE_SECURITY_PDCP_MODE_DATA
+               },
+               {
+                       cperf_pdcp_domain_strs
+                       [RTE_SECURITY_PDCP_MODE_SHORT_MAC],
+                       RTE_SECURITY_PDCP_MODE_SHORT_MAC
                }
        };