DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Ajit Khaparde <ajit.khaparde@broadcom.com>,
	Somnath Kotur <somnath.kotur@broadcom.com>,
	Beilei Xing <beilei.xing@intel.com>,
	Qi Zhang <qi.z.zhang@intel.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Konstantin Ananyev <konstantin.ananyev@intel.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [RFC PATCH] drivers/net: deprecate private API for VF ports
Date: Tue, 30 Jul 2019 17:59:48 +0200	[thread overview]
Message-ID: <20190730155948.26631-1-thomas@monjalon.net> (raw)

Since the concept of representors was introduced,
we do not need any specific API for VF ports.
Any VF port should be able to be configured through
its representor port in a more generic fashion.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/bnxt/rte_pmd_bnxt.h   | 15 ++++++++++++++-
 drivers/net/i40e/rte_pmd_i40e.h   | 21 ++++++++++++++++++++-
 drivers/net/ixgbe/rte_pmd_ixgbe.h | 13 ++++++++++++-
 3 files changed, 46 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/rte_pmd_bnxt.h b/drivers/net/bnxt/rte_pmd_bnxt.h
index 2e893cc7b..12999b14a 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.h
+++ b/drivers/net/bnxt/rte_pmd_bnxt.h
@@ -50,6 +50,7 @@ struct rte_pmd_bnxt_mb_event_param {
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
@@ -66,6 +67,7 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
+__rte_deprecated
 int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf,
 		struct rte_ether_addr *mac_addr);
 
@@ -86,6 +88,7 @@ int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int
 rte_pmd_bnxt_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on);
 
@@ -105,6 +108,7 @@ rte_pmd_bnxt_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int
 rte_pmd_bnxt_set_vf_vlan_insert(uint16_t port, uint16_t vf,
 		uint16_t vlan_id);
@@ -128,6 +132,7 @@ rte_pmd_bnxt_set_vf_vlan_insert(uint16_t port, uint16_t vf,
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_bnxt_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
 				    uint64_t vf_mask, uint8_t vlan_on);
 
@@ -179,6 +184,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
+__rte_deprecated
 int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf,
 				uint16_t tx_rate, uint64_t q_msk);
 
@@ -197,7 +203,7 @@ int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-
+__rte_deprecated
 int rte_pmd_bnxt_get_vf_stats(uint16_t port,
 			      uint16_t vf_id,
 			      struct rte_eth_stats *stats);
@@ -214,6 +220,7 @@ int rte_pmd_bnxt_get_vf_stats(uint16_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_bnxt_reset_vf_stats(uint16_t port,
 				uint16_t vf_id);
 
@@ -233,6 +240,7 @@ int rte_pmd_bnxt_reset_vf_stats(uint16_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
@@ -252,6 +260,7 @@ int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf,
 				uint16_t rx_mask, uint8_t on);
 
@@ -269,6 +278,7 @@ int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf,
  *   - (-ENOMEM) on an allocation failure
  *   - (-1) firmware interface error
  */
+__rte_deprecated
 int rte_pmd_bnxt_get_vf_rx_status(uint16_t port, uint16_t vf_id);
 
 /**
@@ -285,6 +295,7 @@ int rte_pmd_bnxt_get_vf_rx_status(uint16_t port, uint16_t vf_id);
  *   - (-EINVAL) invalid vf_id specified.
  *   - (-ENOTSUP) Ethernet device is not a PF
  */
+__rte_deprecated
 int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id,
 				      uint64_t *count);
 
@@ -322,5 +333,7 @@ int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct rte_ether_addr *mac_addr,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_bnxt_set_vf_persist_stats(uint16_t port, uint16_t vf, uint8_t on);
+
 #endif /* _PMD_BNXT_H_ */
diff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h
index faac9e2e2..8fa4e089e 100644
--- a/drivers/net/i40e/rte_pmd_i40e.h
+++ b/drivers/net/i40e/rte_pmd_i40e.h
@@ -338,6 +338,7 @@ int rte_pmd_i40e_flow_add_del_packet_template(
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* invalid.
  */
+__rte_deprecated
 int rte_pmd_i40e_ping_vfs(uint16_t port, uint16_t vf);
 
 /**
@@ -355,6 +356,7 @@ int rte_pmd_i40e_ping_vfs(uint16_t port, uint16_t vf);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_i40e_set_vf_mac_anti_spoof(uint16_t port,
 				       uint16_t vf_id,
 				       uint8_t on);
@@ -374,6 +376,7 @@ int rte_pmd_i40e_set_vf_mac_anti_spoof(uint16_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_i40e_set_vf_vlan_anti_spoof(uint16_t port,
 					uint16_t vf_id,
 					uint8_t on);
@@ -409,6 +412,7 @@ int rte_pmd_i40e_set_tx_loopback(uint16_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_i40e_set_vf_unicast_promisc(uint16_t port,
 					uint16_t vf_id,
 					uint8_t on);
@@ -428,6 +432,7 @@ int rte_pmd_i40e_set_vf_unicast_promisc(uint16_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_i40e_set_vf_multicast_promisc(uint16_t port,
 					  uint16_t vf_id,
 					  uint8_t on);
@@ -452,6 +457,7 @@ int rte_pmd_i40e_set_vf_multicast_promisc(uint16_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
+__rte_deprecated
 int rte_pmd_i40e_set_vf_mac_addr(uint16_t port, uint16_t vf_id,
 				 struct rte_ether_addr *mac_addr);
 
@@ -469,6 +475,7 @@ int rte_pmd_i40e_set_vf_mac_addr(uint16_t port, uint16_t vf_id,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
+__rte_deprecated
 int
 rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id,
 	struct rte_ether_addr *mac_addr);
@@ -489,6 +496,7 @@ rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int
 rte_pmd_i40e_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on);
 
@@ -508,6 +516,7 @@ rte_pmd_i40e_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_i40e_set_vf_vlan_insert(uint16_t port, uint16_t vf_id,
 				    uint16_t vlan_id);
 
@@ -527,6 +536,7 @@ int rte_pmd_i40e_set_vf_vlan_insert(uint16_t port, uint16_t vf_id,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_i40e_set_vf_broadcast(uint16_t port, uint16_t vf_id,
 				  uint8_t on);
 
@@ -546,6 +556,7 @@ int rte_pmd_i40e_set_vf_broadcast(uint16_t port, uint16_t vf_id,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_i40e_set_vf_vlan_tag(uint16_t port, uint16_t vf_id, uint8_t on);
 
 /**
@@ -567,6 +578,7 @@ int rte_pmd_i40e_set_vf_vlan_tag(uint16_t port, uint16_t vf_id, uint8_t on);
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
+__rte_deprecated
 int rte_pmd_i40e_set_vf_vlan_filter(uint16_t port, uint16_t vlan_id,
 				    uint64_t vf_mask, uint8_t on);
 
@@ -591,7 +603,7 @@ int rte_pmd_i40e_set_vf_vlan_filter(uint16_t port, uint16_t vlan_id,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-
+__rte_deprecated
 int rte_pmd_i40e_get_vf_stats(uint16_t port,
 			      uint16_t vf_id,
 			      struct rte_eth_stats *stats);
@@ -608,6 +620,7 @@ int rte_pmd_i40e_get_vf_stats(uint16_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_i40e_reset_vf_stats(uint16_t port,
 				uint16_t vf_id);
 
@@ -633,6 +646,7 @@ int rte_pmd_i40e_reset_vf_stats(uint16_t port,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
+__rte_deprecated
 int rte_pmd_i40e_set_vf_max_bw(uint16_t port,
 			       uint16_t vf_id,
 			       uint32_t bw);
@@ -658,6 +672,7 @@ int rte_pmd_i40e_set_vf_max_bw(uint16_t port,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
+__rte_deprecated
 int rte_pmd_i40e_set_vf_tc_bw_alloc(uint16_t port,
 				    uint16_t vf_id,
 				    uint8_t tc_num,
@@ -683,6 +698,7 @@ int rte_pmd_i40e_set_vf_tc_bw_alloc(uint16_t port,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
+__rte_deprecated
 int rte_pmd_i40e_set_vf_tc_max_bw(uint16_t port,
 				  uint16_t vf_id,
 				  uint8_t tc_no,
@@ -701,6 +717,7 @@ int rte_pmd_i40e_set_vf_tc_max_bw(uint16_t port,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
+__rte_deprecated
 int rte_pmd_i40e_set_tc_strict_prio(uint16_t port, uint8_t tc_map);
 
 /**
@@ -853,6 +870,7 @@ int rte_pmd_i40e_ptype_mapping_replace(uint16_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
+__rte_deprecated
 int rte_pmd_i40e_add_vf_mac_addr(uint16_t port, uint16_t vf_id,
 				 struct rte_ether_addr *mac_addr);
 
@@ -923,6 +941,7 @@ int rte_pmd_i40e_flow_type_mapping_reset(uint16_t port);
  *    -EINVAL: vf mac address does not exist for this port
  *    -ENOTSUP: i40e not supported for this port.
  */
+__rte_deprecated
 int rte_pmd_i40e_query_vfid_by_mac(uint16_t port,
 					const struct rte_ether_addr *vf_mac);
 
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h
index f62fd761d..886579906 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
@@ -25,6 +25,7 @@
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* invalid.
  */
+__rte_deprecated
 int rte_pmd_ixgbe_ping_vf(uint16_t port, uint16_t vf);
 
 /**
@@ -41,6 +42,7 @@ int rte_pmd_ixgbe_ping_vf(uint16_t port, uint16_t vf);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
+__rte_deprecated
 int rte_pmd_ixgbe_set_vf_mac_addr(uint16_t port, uint16_t vf,
 		struct rte_ether_addr *mac_addr);
 
@@ -59,6 +61,7 @@ int rte_pmd_ixgbe_set_vf_mac_addr(uint16_t port, uint16_t vf,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf,
 					 uint8_t on);
 
@@ -77,6 +80,7 @@ int rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
@@ -95,6 +99,7 @@ int rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_ixgbe_set_vf_vlan_insert(uint16_t port, uint16_t vf,
 		uint16_t vlan_id);
 
@@ -146,7 +151,7 @@ int rte_pmd_ixgbe_set_all_queues_drop_en(uint16_t port, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-
+__rte_deprecated
 int rte_pmd_ixgbe_set_vf_split_drop_en(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
@@ -166,6 +171,7 @@ int rte_pmd_ixgbe_set_vf_split_drop_en(uint16_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int
 rte_pmd_ixgbe_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on);
 
@@ -295,6 +301,7 @@ int rte_pmd_ixgbe_macsec_select_rxsa(uint16_t port, uint8_t idx, uint8_t an,
 *   - (-ENODEV) if *port_id* invalid.
 *   - (-EINVAL) if bad parameter.
 */
+__rte_deprecated
 int
 rte_pmd_ixgbe_set_vf_rxmode(uint16_t port, uint16_t vf, uint16_t rx_mask,
 			     uint8_t on);
@@ -315,6 +322,7 @@ rte_pmd_ixgbe_set_vf_rxmode(uint16_t port, uint16_t vf, uint16_t rx_mask,
 *   - (-ENODEV) if *port_id* invalid.
 *   - (-EINVAL) if bad parameter.
 */
+__rte_deprecated
 int
 rte_pmd_ixgbe_set_vf_rx(uint16_t port, uint16_t vf, uint8_t on);
 
@@ -334,6 +342,7 @@ rte_pmd_ixgbe_set_vf_rx(uint16_t port, uint16_t vf, uint8_t on);
 *   - (-ENOTSUP) if hardware doesn't support.
 *   - (-EINVAL) if bad parameter.
 */
+__rte_deprecated
 int
 rte_pmd_ixgbe_set_vf_tx(uint16_t port, uint16_t vf, uint8_t on);
 
@@ -356,6 +365,7 @@ rte_pmd_ixgbe_set_vf_tx(uint16_t port, uint16_t vf, uint8_t on);
 *   - (-ENODEV) if *port_id* invalid.
 *   - (-EINVAL) if bad parameter.
 */
+__rte_deprecated
 int
 rte_pmd_ixgbe_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
 				 uint64_t vf_mask, uint8_t vlan_on);
@@ -377,6 +387,7 @@ rte_pmd_ixgbe_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
+__rte_deprecated
 int rte_pmd_ixgbe_set_vf_rate_limit(uint16_t port, uint16_t vf,
 				     uint16_t tx_rate, uint64_t q_msk);
 
-- 
2.21.0


             reply	other threads:[~2019-07-30 15:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 15:59 Thomas Monjalon [this message]
2019-07-31  9:36 ` Andrew Rybchenko
2019-07-31 11:32   ` Ajit Khaparde
2019-10-08 14:23 ` Yigit, Ferruh
2019-10-31 17:53   ` Ferruh Yigit
2019-11-11 16:58     ` Ferruh Yigit

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=20190730155948.26631-1-thomas@monjalon.net \
    --to=thomas@monjalon.net \
    --cc=ajit.khaparde@broadcom.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=wenzhuo.lu@intel.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).