DPDK patches and discussions
 help / color / mirror / Atom feed
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 v2 8/9] librte_ether: remove the set VF API's
Date: Fri,  9 Dec 2016 17:26:00 +0000	[thread overview]
Message-ID: <1481304361-16032-9-git-send-email-bernard.iremonger@intel.com> (raw)
In-Reply-To: <1481282878-26176-1-git-send-email-bernard.iremonger@intel.com>

remove the following API's:

rte_eth_dev_set_vf_rxmode
rte_eth_dev_set_vf_rx
rte_eth_dev_set_vf_tx
rte_eth_dev_set_vf_vlan_filter
rte_eth_dev_set_vf_rate_limit

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 lib/librte_ether/rte_ethdev.c | 129 ------------------------------------------
 lib/librte_ether/rte_ethdev.h |  33 -----------
 2 files changed, 162 deletions(-)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 1e0f206..6a93014 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -2137,32 +2137,6 @@ rte_eth_dev_default_mac_addr_set(uint8_t port_id, struct ether_addr *addr)
 	return 0;
 }
 
-int
-rte_eth_dev_set_vf_rxmode(uint8_t port_id,  uint16_t vf,
-				uint16_t rx_mode, uint8_t on)
-{
-	uint16_t num_vfs;
-	struct rte_eth_dev *dev;
-	struct rte_eth_dev_info dev_info;
-
-	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-
-	dev = &rte_eth_devices[port_id];
-	rte_eth_dev_info_get(port_id, &dev_info);
-
-	num_vfs = dev_info.max_vfs;
-	if (vf > num_vfs) {
-		RTE_PMD_DEBUG_TRACE("set VF RX mode:invalid VF id %d\n", vf);
-		return -EINVAL;
-	}
-
-	if (rx_mode == 0) {
-		RTE_PMD_DEBUG_TRACE("set VF RX mode:mode mask ca not be zero\n");
-		return -EINVAL;
-	}
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_vf_rx_mode, -ENOTSUP);
-	return (*dev->dev_ops->set_vf_rx_mode)(dev, vf, rx_mode, on);
-}
 
 /*
  * Returns index into MAC address array of addr. Use 00:00:00:00:00:00 to find
@@ -2252,76 +2226,6 @@ rte_eth_dev_uc_all_hash_table_set(uint8_t port_id, uint8_t on)
 	return (*dev->dev_ops->uc_all_hash_table_set)(dev, on);
 }
 
-int
-rte_eth_dev_set_vf_rx(uint8_t port_id, uint16_t vf, uint8_t on)
-{
-	uint16_t num_vfs;
-	struct rte_eth_dev *dev;
-	struct rte_eth_dev_info dev_info;
-
-	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-
-	dev = &rte_eth_devices[port_id];
-	rte_eth_dev_info_get(port_id, &dev_info);
-
-	num_vfs = dev_info.max_vfs;
-	if (vf > num_vfs) {
-		RTE_PMD_DEBUG_TRACE("port %d: invalid vf id\n", port_id);
-		return -EINVAL;
-	}
-
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_vf_rx, -ENOTSUP);
-	return (*dev->dev_ops->set_vf_rx)(dev, vf, on);
-}
-
-int
-rte_eth_dev_set_vf_tx(uint8_t port_id, uint16_t vf, uint8_t on)
-{
-	uint16_t num_vfs;
-	struct rte_eth_dev *dev;
-	struct rte_eth_dev_info dev_info;
-
-	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-
-	dev = &rte_eth_devices[port_id];
-	rte_eth_dev_info_get(port_id, &dev_info);
-
-	num_vfs = dev_info.max_vfs;
-	if (vf > num_vfs) {
-		RTE_PMD_DEBUG_TRACE("set pool tx:invalid pool id=%d\n", vf);
-		return -EINVAL;
-	}
-
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_vf_tx, -ENOTSUP);
-	return (*dev->dev_ops->set_vf_tx)(dev, vf, on);
-}
-
-int
-rte_eth_dev_set_vf_vlan_filter(uint8_t port_id, uint16_t vlan_id,
-			       uint64_t vf_mask, uint8_t vlan_on)
-{
-	struct rte_eth_dev *dev;
-
-	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-
-	dev = &rte_eth_devices[port_id];
-
-	if (vlan_id > ETHER_MAX_VLAN_ID) {
-		RTE_PMD_DEBUG_TRACE("VF VLAN filter:invalid VLAN id=%d\n",
-			vlan_id);
-		return -EINVAL;
-	}
-
-	if (vf_mask == 0) {
-		RTE_PMD_DEBUG_TRACE("VF VLAN filter:pool_mask can not be 0\n");
-		return -EINVAL;
-	}
-
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_vf_vlan_filter, -ENOTSUP);
-	return (*dev->dev_ops->set_vf_vlan_filter)(dev, vlan_id,
-						   vf_mask, vlan_on);
-}
-
 int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,
 					uint16_t tx_rate)
 {
@@ -2352,39 +2256,6 @@ int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,
 	return (*dev->dev_ops->set_queue_rate_limit)(dev, queue_idx, tx_rate);
 }
 
-int rte_eth_set_vf_rate_limit(uint8_t port_id, uint16_t vf, uint16_t tx_rate,
-				uint64_t q_msk)
-{
-	struct rte_eth_dev *dev;
-	struct rte_eth_dev_info dev_info;
-	struct rte_eth_link link;
-
-	if (q_msk == 0)
-		return 0;
-
-	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-
-	dev = &rte_eth_devices[port_id];
-	rte_eth_dev_info_get(port_id, &dev_info);
-	link = dev->data->dev_link;
-
-	if (vf > dev_info.max_vfs) {
-		RTE_PMD_DEBUG_TRACE("set VF rate limit:port %d: "
-				"invalid vf id=%d\n", port_id, vf);
-		return -EINVAL;
-	}
-
-	if (tx_rate > link.link_speed) {
-		RTE_PMD_DEBUG_TRACE("set VF rate limit:invalid tx_rate=%d, "
-				"bigger than link speed= %d\n",
-				tx_rate, link.link_speed);
-		return -EINVAL;
-	}
-
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_vf_rate_limit, -ENOTSUP);
-	return (*dev->dev_ops->set_vf_rate_limit)(dev, vf, tx_rate, q_msk);
-}
-
 int
 rte_eth_mirror_rule_set(uint8_t port_id,
 			struct rte_eth_mirror_conf *mirror_conf,
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 9678179..269ac77 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1249,39 +1249,11 @@ typedef int (*eth_uc_all_hash_table_set_t)(struct rte_eth_dev *dev,
 				  uint8_t on);
 /**< @internal Set all Unicast Hash bitmap */
 
-typedef int (*eth_set_vf_rx_mode_t)(struct rte_eth_dev *dev,
-				  uint16_t vf,
-				  uint16_t rx_mode,
-				  uint8_t on);
-/**< @internal Set a VF receive mode */
-
-typedef int (*eth_set_vf_rx_t)(struct rte_eth_dev *dev,
-				uint16_t vf,
-				uint8_t on);
-/**< @internal Set a VF receive  mode */
-
-typedef int (*eth_set_vf_tx_t)(struct rte_eth_dev *dev,
-				uint16_t vf,
-				uint8_t on);
-/**< @internal Enable or disable a VF transmit   */
-
-typedef int (*eth_set_vf_vlan_filter_t)(struct rte_eth_dev *dev,
-				  uint16_t vlan,
-				  uint64_t vf_mask,
-				  uint8_t vlan_on);
-/**< @internal Set VF VLAN pool filter */
-
 typedef int (*eth_set_queue_rate_limit_t)(struct rte_eth_dev *dev,
 				uint16_t queue_idx,
 				uint16_t tx_rate);
 /**< @internal Set queue TX rate */
 
-typedef int (*eth_set_vf_rate_limit_t)(struct rte_eth_dev *dev,
-				uint16_t vf,
-				uint16_t tx_rate,
-				uint64_t q_msk);
-/**< @internal Set VF TX rate */
-
 typedef int (*eth_mirror_rule_set_t)(struct rte_eth_dev *dev,
 				  struct rte_eth_mirror_conf *mirror_conf,
 				  uint8_t rule_id,
@@ -1479,16 +1451,11 @@ struct eth_dev_ops {
 	eth_uc_all_hash_table_set_t uc_all_hash_table_set;  /**< Set Unicast hash bitmap */
 	eth_mirror_rule_set_t	   mirror_rule_set;  /**< Add a traffic mirror rule.*/
 	eth_mirror_rule_reset_t	   mirror_rule_reset;  /**< reset a traffic mirror rule.*/
-	eth_set_vf_rx_mode_t       set_vf_rx_mode;   /**< Set VF RX mode */
-	eth_set_vf_rx_t            set_vf_rx;  /**< enable/disable a VF receive */
-	eth_set_vf_tx_t            set_vf_tx;  /**< enable/disable a VF transmit */
-	eth_set_vf_vlan_filter_t   set_vf_vlan_filter;  /**< Set VF VLAN filter */
 	/** Add UDP tunnel port. */
 	eth_udp_tunnel_port_add_t udp_tunnel_port_add;
 	/** Del UDP tunnel port. */
 	eth_udp_tunnel_port_del_t udp_tunnel_port_del;
 	eth_set_queue_rate_limit_t set_queue_rate_limit;   /**< Set queue rate limit */
-	eth_set_vf_rate_limit_t    set_vf_rate_limit;   /**< Set VF rate limit */
 	/** Update redirection table. */
 	reta_update_t reta_update;
 	/** Query redirection table. */
-- 
2.10.1

  parent reply	other threads:[~2016-12-09 17:26 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     ` [dpdk-dev] [PATCH v4 2/7] app/testpmd: use ixgbe public functions Bernard Iremonger
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 ` Bernard Iremonger [this message]
2016-12-09 18:00   ` [dpdk-dev] [PATCH v2 8/9] librte_ether: remove the set VF API's 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=1481304361-16032-9-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).