From: Bernard Iremonger <bernard.iremonger@intel.com>
To: thomas.monjalon@6wind.com, dev@dpdk.org
Cc: Bernard Iremonger <bernard.iremonger@intel.com>
Subject: [dpdk-dev] [PATCH v4 2/7] app/testpmd: use ixgbe public functions
Date: Tue, 13 Dec 2016 11:40:36 +0000 [thread overview]
Message-ID: <1481629241-19500-3-git-send-email-bernard.iremonger@intel.com> (raw)
In-Reply-To: <1481550626-14539-1-git-send-email-bernard.iremonger@intel.com>
Use the the following ixgbe public functions:
rte_pmd_ixgbe_set_vf_rate_limit
rte_pmd_ixgbe_set_vf_rx
rte_pmd_ixgbe_set_vf_rxmode
rte_pmd_ixgbe_set_vf_tx
rte_pmd_ixgbe_set_vf_vlan_filter
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
app/test-pmd/cmdline.c | 18 +++++++++++++-----
app/test-pmd/config.c | 26 ++++++++++++++++++--------
2 files changed, 31 insertions(+), 13 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index d03a592..ed84d7a 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -6614,6 +6614,7 @@ 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;
@@ -6674,7 +6675,9 @@ cmdline_parse_inst_t cmd_set_vf_traffic = {
NULL,
},
};
+#endif
+#ifdef RTE_LIBRTE_IXGBE_PMD
/* *** CONFIGURE VF RECEIVE MODE *** */
struct cmd_set_vf_rxmode {
cmdline_fixed_string_t set;
@@ -6708,7 +6711,7 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
rx_mode |= ETH_VMDQ_ACCEPT_MULTICAST;
}
- ret = rte_eth_dev_set_vf_rxmode(res->port_id,res->vf_id,rx_mode,(uint8_t)is_on);
+ ret = rte_pmd_ixgbe_set_vf_rxmode(res->port_id, res->vf_id, rx_mode, (uint8_t)is_on);
if (ret < 0)
printf("bad VF receive mode parameter, return code = %d \n",
ret);
@@ -6756,6 +6759,7 @@ 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 {
@@ -6822,6 +6826,7 @@ cmdline_parse_inst_t cmd_vf_mac_addr_filter = {
},
};
+#ifdef RTE_LIBRTE_IXGBE_PMD
/* *** ADD/REMOVE A VLAN IDENTIFIER TO/FROM A PORT VLAN RX FILTER *** */
struct cmd_vf_rx_vlan_filter {
cmdline_fixed_string_t rx_vlan;
@@ -6884,6 +6889,7 @@ cmdline_parse_inst_t cmd_vf_rxvlan_filter = {
NULL,
},
};
+#endif
/* *** SET RATE LIMIT FOR A QUEUE OF A PORT *** */
struct cmd_queue_rate_limit_result {
@@ -6952,6 +6958,7 @@ cmdline_parse_inst_t cmd_queue_rate_limit = {
},
};
+#ifdef RTE_LIBRTE_IXGBE_PMD
/* *** SET RATE LIMIT FOR A VF OF A PORT *** */
struct cmd_vf_rate_limit_result {
cmdline_fixed_string_t set;
@@ -7030,6 +7037,7 @@ cmdline_parse_inst_t cmd_vf_rate_limit = {
NULL,
},
};
+#endif
/* *** ADD TUNNEL FILTER OF A PORT *** */
struct cmd_tunnel_filter_result {
@@ -11561,15 +11569,11 @@ cmdline_parse_ctx_t main_ctx[] = {
(cmdline_parse_inst_t *)&cmd_config_burst,
(cmdline_parse_inst_t *)&cmd_config_thresh,
(cmdline_parse_inst_t *)&cmd_config_threshold,
- (cmdline_parse_inst_t *)&cmd_set_vf_rxmode,
(cmdline_parse_inst_t *)&cmd_set_uc_hash_filter,
(cmdline_parse_inst_t *)&cmd_set_uc_all_hash_filter,
(cmdline_parse_inst_t *)&cmd_vf_mac_addr_filter,
(cmdline_parse_inst_t *)&cmd_set_vf_macvlan_filter,
- (cmdline_parse_inst_t *)&cmd_set_vf_traffic,
- (cmdline_parse_inst_t *)&cmd_vf_rxvlan_filter,
(cmdline_parse_inst_t *)&cmd_queue_rate_limit,
- (cmdline_parse_inst_t *)&cmd_vf_rate_limit,
(cmdline_parse_inst_t *)&cmd_tunnel_filter,
(cmdline_parse_inst_t *)&cmd_tunnel_udp_config,
(cmdline_parse_inst_t *)&cmd_global_config,
@@ -11624,6 +11628,10 @@ cmdline_parse_ctx_t main_ctx[] = {
(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_vf_mac_addr,
+ (cmdline_parse_inst_t *)&cmd_set_vf_rxmode,
+ (cmdline_parse_inst_t *)&cmd_set_vf_traffic,
+ (cmdline_parse_inst_t *)&cmd_vf_rxvlan_filter,
+ (cmdline_parse_inst_t *)&cmd_vf_rate_limit,
#endif
NULL,
};
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 8cf537d..73b0ffa 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -92,6 +92,9 @@
#include <rte_ethdev.h>
#include <rte_string_fns.h>
#include <rte_cycles.h>
+#ifdef RTE_LIBRTE_IXGBE_PMD
+#include <rte_pmd_ixgbe.h>
+#endif
#include "testpmd.h"
@@ -2324,6 +2327,7 @@ fdir_set_flex_payload(portid_t port_id, struct rte_eth_flex_payload_cfg *cfg)
}
+#ifdef RTE_LIBRTE_IXGBE_PMD
void
set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on)
{
@@ -2332,16 +2336,17 @@ set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on)
if (port_id_is_invalid(port_id, ENABLED_WARN))
return;
if (is_rx)
- diag = rte_eth_dev_set_vf_rx(port_id,vf,on);
+ diag = rte_pmd_ixgbe_set_vf_rx(port_id, vf, on);
else
- diag = rte_eth_dev_set_vf_tx(port_id,vf,on);
+ diag = rte_pmd_ixgbe_set_vf_tx(port_id, vf, on);
+
if (diag == 0)
return;
if(is_rx)
- printf("rte_eth_dev_set_vf_rx for port_id=%d failed "
+ printf("rte_pmd_ixgbe_set_vf_rx for port_id=%d failed "
"diag=%d\n", port_id, diag);
else
- printf("rte_eth_dev_set_vf_tx for port_id=%d failed "
+ printf("rte_pmd_ixgbe_set_vf_tx for port_id=%d failed "
"diag=%d\n", port_id, diag);
}
@@ -2355,12 +2360,15 @@ set_vf_rx_vlan(portid_t port_id, uint16_t vlan_id, uint64_t vf_mask, uint8_t on)
return;
if (vlan_id_is_invalid(vlan_id))
return;
- diag = rte_eth_dev_set_vf_vlan_filter(port_id, vlan_id, vf_mask, on);
+
+ diag = rte_pmd_ixgbe_set_vf_vlan_filter(port_id, vlan_id, vf_mask, on);
+
if (diag == 0)
return;
- printf("rte_eth_dev_set_vf_vlan_filter for port_id=%d failed "
+ printf("rte_pmd_ixgbe_set_vf_vlan_filter for port_id=%d failed "
"diag=%d\n", port_id, diag);
}
+#endif
int
set_queue_rate_limit(portid_t port_id, uint16_t queue_idx, uint16_t rate)
@@ -2384,6 +2392,7 @@ set_queue_rate_limit(portid_t port_id, uint16_t queue_idx, uint16_t rate)
return diag;
}
+#ifdef RTE_LIBRTE_IXGBE_PMD
int
set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate, uint64_t q_msk)
{
@@ -2401,13 +2410,14 @@ set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate, uint64_t q_msk)
rate, link.link_speed);
return 1;
}
- diag = rte_eth_set_vf_rate_limit(port_id, vf, rate, q_msk);
+ diag = rte_pmd_ixgbe_set_vf_rate_limit(port_id, vf, rate, q_msk);
if (diag == 0)
return diag;
- printf("rte_eth_set_vf_rate_limit for port_id=%d failed diag=%d\n",
+ printf("rte_pmd_ixgbe_set_vf_rate_limit for port_id=%d failed diag=%d\n",
port_id, diag);
return diag;
}
+#endif
/*
* Functions to manage the set of filtered Multicast MAC addresses.
--
2.10.1
next prev parent reply other threads:[~2016-12-13 11:40 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 11:27 [dpdk-dev] [PATCH v1 0/5] net/ixgbe: move set VF functions Bernard Iremonger
2016-12-09 11:27 ` [dpdk-dev] [PATCH v1 1/5] net/ixgbe: move set VF functions from the ethdev Bernard Iremonger
2016-12-09 11:27 ` [dpdk-dev] [PATCH v1 2/5] app/testpmd: use ixgbe public functions Bernard Iremonger
2016-12-09 11:56 ` Ferruh Yigit
2016-12-09 12:08 ` Iremonger, Bernard
2016-12-09 11:27 ` [dpdk-dev] [PATCH v1 3/5] app/testpmd: add command for set VF VLAN filter Bernard Iremonger
2016-12-09 12:02 ` Ferruh Yigit
2016-12-09 12:10 ` Iremonger, Bernard
2016-12-09 11:27 ` [dpdk-dev] [PATCH v1 4/5] app/testpmd: add command for set VF receive Bernard Iremonger
2016-12-09 11:27 ` [dpdk-dev] [PATCH v1 5/5] app/testpmd: add command for set VF transmit Bernard Iremonger
2016-12-09 11:54 ` [dpdk-dev] [PATCH v1 0/5] net/ixgbe: move set VF functions Ferruh Yigit
2016-12-09 12:00 ` Iremonger, Bernard
2016-12-09 13:04 ` Thomas Monjalon
2016-12-09 13:23 ` Iremonger, Bernard
2016-12-09 17:25 ` [dpdk-dev] [PATCH v2 0/9] " Bernard Iremonger
2016-12-12 13:50 ` [dpdk-dev] [PATCH v3 " Bernard Iremonger
2016-12-13 11:40 ` [dpdk-dev] [PATCH v4 0/7] " Bernard Iremonger
2016-12-13 13:36 ` Ferruh Yigit
2016-12-13 13:46 ` Iremonger, Bernard
2016-12-13 11:40 ` [dpdk-dev] [PATCH v4 1/7] net/ixgbe: move set VF functions from the ethdev Bernard Iremonger
2016-12-13 11:40 ` Bernard Iremonger [this message]
2016-12-13 11:40 ` [dpdk-dev] [PATCH v4 3/7] app/testpmd: cleanup parameter checking Bernard Iremonger
2016-12-13 11:40 ` [dpdk-dev] [PATCH v4 4/7] examples/ethtool: use ixgbe public function Bernard Iremonger
2016-12-13 11:40 ` [dpdk-dev] [PATCH v4 5/7] net/ixgbe: remove static set VF functions Bernard Iremonger
2016-12-13 11:40 ` [dpdk-dev] [PATCH v4 6/7] librte_ether: remove the set VF API's Bernard Iremonger
2016-12-13 11:40 ` [dpdk-dev] [PATCH v4 7/7] doc: update release notes Bernard Iremonger
2016-12-12 13:50 ` [dpdk-dev] [PATCH v3 1/9] net/ixgbe: move set VF functions from the ethdev Bernard Iremonger
2016-12-12 13:50 ` [dpdk-dev] [PATCH v3 2/9] app/testpmd: use ixgbe public functions Bernard Iremonger
2016-12-12 13:50 ` [dpdk-dev] [PATCH v3 3/9] app/testpmd: add command for set VF VLAN filter Bernard Iremonger
2016-12-12 13:50 ` [dpdk-dev] [PATCH v3 4/9] app/testpmd: add command for set VF receive Bernard Iremonger
2016-12-12 13:50 ` [dpdk-dev] [PATCH v3 5/9] app/testpmd: add command for set VF transmit Bernard Iremonger
2016-12-12 13:50 ` [dpdk-dev] [PATCH v3 6/9] examples/ethtool: use ixgbe public function Bernard Iremonger
2016-12-12 16:25 ` Ferruh Yigit
2016-12-13 9:04 ` Iremonger, Bernard
2016-12-12 13:50 ` [dpdk-dev] [PATCH v3 7/9] net/ixgbe: remove static set VF functions Bernard Iremonger
2016-12-12 13:50 ` [dpdk-dev] [PATCH v3 8/9] librte_ether: remove the set VF API's Bernard Iremonger
2016-12-12 13:50 ` [dpdk-dev] [PATCH v3 9/9] doc: update release notes Bernard Iremonger
2016-12-12 15:51 ` Ferruh Yigit
2016-12-12 15:55 ` Iremonger, Bernard
2016-12-12 16:07 ` Ferruh Yigit
2016-12-09 17:25 ` [dpdk-dev] [PATCH v2 1/9] net/ixgbe: move set VF functions from the ethdev Bernard Iremonger
2016-12-09 17:25 ` [dpdk-dev] [PATCH v2 2/9] app/testpmd: use ixgbe public functions Bernard Iremonger
2016-12-09 17:25 ` [dpdk-dev] [PATCH v2 3/9] app/testpmd: add command for set VF VLAN filter Bernard Iremonger
2016-12-09 17:25 ` [dpdk-dev] [PATCH v2 4/9] app/testpmd: add command for set VF receive Bernard Iremonger
2016-12-09 17:25 ` [dpdk-dev] [PATCH v2 5/9] app/testpmd: add command for set VF transmit Bernard Iremonger
2016-12-09 17:25 ` [dpdk-dev] [PATCH v2 6/9] examples/ethtool: use ixgbe public function Bernard Iremonger
2016-12-09 17:25 ` [dpdk-dev] [PATCH v2 7/9] net/ixgbe: remove static set VF functions Bernard Iremonger
2016-12-09 17:26 ` [dpdk-dev] [PATCH v2 8/9] librte_ether: remove the set VF API's Bernard Iremonger
2016-12-09 18:00 ` Ferruh Yigit
2016-12-09 17:26 ` [dpdk-dev] [PATCH v2 9/9] doc: remove deprecation notice Bernard Iremonger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481629241-19500-3-git-send-email-bernard.iremonger@intel.com \
--to=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).