From ce3d555e43e3795b5d9507fcfc76b7a0a92fd0d6 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 2 Mar 2017 16:15:51 +0100 Subject: Imported Upstream version 16.11.1 Change-Id: I1e965265578efaaf08e5628607f53d2386d2df9f Signed-off-by: Christian Ehrhardt --- app/test-pmd/Makefile | 2 ++ app/test-pmd/cmdline.c | 24 ++++++++++++++++++++++++ app/test/test_cryptodev_perf.c | 6 ++++++ 3 files changed, 32 insertions(+) (limited to 'app') diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index 891b85ac..92c0c1b0 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -58,7 +58,9 @@ SRCS-y += csumonly.c SRCS-y += icmpecho.c SRCS-$(CONFIG_RTE_LIBRTE_IEEE1588) += ieee1588fwd.c +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) _LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += -lrte_pmd_ixgbe +endif CFLAGS_cmdline.o := -D_GNU_SOURCE diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 63b55dcb..315a252e 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -10807,6 +10807,9 @@ cmd_set_vf_vlan_anti_spoof_parsed( int ret = 0; int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0; + if (port_id_is_invalid(res->port_id, ENABLED_WARN)) + return; + ret = rte_pmd_ixgbe_set_vf_vlan_anti_spoof(res->port_id, res->vf_id, is_on); switch (ret) { @@ -10892,6 +10895,9 @@ cmd_set_vf_mac_anti_spoof_parsed( int ret; int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0; + if (port_id_is_invalid(res->port_id, ENABLED_WARN)) + return; + ret = rte_pmd_ixgbe_set_vf_mac_anti_spoof(res->port_id, res->vf_id, is_on); switch (ret) { @@ -10977,6 +10983,9 @@ cmd_set_vf_vlan_stripq_parsed( int ret = 0; int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0; + if (port_id_is_invalid(res->port_id, ENABLED_WARN)) + return; + ret = rte_pmd_ixgbe_set_vf_vlan_stripq(res->port_id, res->vf_id, is_on); switch (ret) { case 0: @@ -11060,6 +11069,9 @@ cmd_set_vf_vlan_insert_parsed( struct cmd_vf_vlan_insert_result *res = parsed_result; int ret; + if (port_id_is_invalid(res->port_id, ENABLED_WARN)) + return; + ret = rte_pmd_ixgbe_set_vf_vlan_insert(res->port_id, res->vf_id, res->vlan_id); switch (ret) { case 0: @@ -11134,6 +11146,9 @@ cmd_set_tx_loopback_parsed( int ret; int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0; + if (port_id_is_invalid(res->port_id, ENABLED_WARN)) + return; + ret = rte_pmd_ixgbe_set_tx_loopback(res->port_id, is_on); switch (ret) { case 0: @@ -11211,6 +11226,9 @@ cmd_set_all_queues_drop_en_parsed( int ret = 0; int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0; + if (port_id_is_invalid(res->port_id, ENABLED_WARN)) + return; + ret = rte_pmd_ixgbe_set_all_queues_drop_en(res->port_id, is_on); switch (ret) { case 0: @@ -11294,6 +11312,9 @@ cmd_set_vf_split_drop_en_parsed( int ret; int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0; + if (port_id_is_invalid(res->port_id, ENABLED_WARN)) + return; + ret = rte_pmd_ixgbe_set_vf_split_drop_en(res->port_id, res->vf_id, is_on); switch (ret) { @@ -11378,6 +11399,9 @@ cmd_set_vf_mac_addr_parsed( struct cmd_set_vf_mac_addr_result *res = parsed_result; int ret; + if (port_id_is_invalid(res->port_id, ENABLED_WARN)) + return; + ret = rte_pmd_ixgbe_set_vf_mac_addr(res->port_id, res->vf_id, &res->mac_addr); switch (ret) { diff --git a/app/test/test_cryptodev_perf.c b/app/test/test_cryptodev_perf.c index 59a68916..89a67952 100644 --- a/app/test/test_cryptodev_perf.c +++ b/app/test/test_cryptodev_perf.c @@ -2216,6 +2216,7 @@ test_perf_snow3G_optimise_cyclecount(struct perf_test_params *pparams) rte_pktmbuf_free(c_ops[i]->sym->m_src); rte_crypto_op_free(c_ops[i]); } + rte_cryptodev_sym_session_free(ts_params->dev_id, sess); return TEST_SUCCESS; } @@ -2418,6 +2419,7 @@ test_perf_openssl_optimise_cyclecount(struct perf_test_params *pparams) rte_pktmbuf_free(c_ops[i]->sym->m_src); rte_crypto_op_free(c_ops[i]); } + rte_cryptodev_sym_session_free(ts_params->dev_id, sess); return TEST_SUCCESS; } @@ -3039,6 +3041,7 @@ test_perf_aes_sha(uint8_t dev_id, uint16_t queue_id, for (i = 0; i < pparams->burst_size * NUM_MBUF_SETS; i++) rte_pktmbuf_free(mbufs[i]); + rte_cryptodev_sym_session_free(dev_id, sess); printf("\n"); return TEST_SUCCESS; @@ -3202,6 +3205,7 @@ test_perf_snow3g(uint8_t dev_id, uint16_t queue_id, for (i = 0; i < pparams->burst_size * NUM_MBUF_SETS; i++) rte_pktmbuf_free(mbufs[i]); + rte_cryptodev_sym_session_free(dev_id, sess); printf("\n"); return TEST_SUCCESS; @@ -3351,6 +3355,7 @@ test_perf_openssl(uint8_t dev_id, uint16_t queue_id, for (i = 0; i < pparams->burst_size * NUM_MBUF_SETS; i++) rte_pktmbuf_free(mbufs[i]); + rte_cryptodev_sym_session_free(dev_id, sess); printf("\n"); return TEST_SUCCESS; @@ -3956,6 +3961,7 @@ perf_AES_GCM(uint8_t dev_id, uint16_t queue_id, for (i = 0; i < burst; i++) rte_pktmbuf_free(mbufs[i]); + rte_cryptodev_sym_session_free(dev_id, sess); return 0; } -- cgit 1.2.3-korg