Patchwork [dpdk-dev,16/30] net/sfc: support RSS RETA and hash config get in secondary

login
register
mail settings
Submitter Andrew Rybchenko
Date Feb. 7, 2019, 12:17 p.m.
Message ID <1549541873-17403-17-git-send-email-arybchenko@solarflare.com>
Download mbox | patch
Permalink /patch/720423/
State New
Headers show

Comments

Andrew Rybchenko - Feb. 7, 2019, 12:17 p.m.
RSS RETA query and hash configuration get functions use shared
adapter data only. No libefx functions are called.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 doc/guides/rel_notes/release_19_05.rst |  2 ++
 drivers/net/sfc/sfc_ethdev.c           | 10 ++++++++++
 2 files changed, 12 insertions(+)

Patch

diff --git a/doc/guides/rel_notes/release_19_05.rst b/doc/guides/rel_notes/release_19_05.rst
index 6d65c8eae..1b7f14cb2 100644
--- a/doc/guides/rel_notes/release_19_05.rst
+++ b/doc/guides/rel_notes/release_19_05.rst
@@ -61,6 +61,8 @@  New Features
   * Added support for Rx descriptor status and related API in a secondary
     process.
   * Added support for Tx descriptor status API in a secondary process.
+  * Added support for RSS RETA and hash configuration get API in a secondary
+    process.
 
 
 Removed Items
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index c6e1e87ce..47450f6b2 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -1403,6 +1403,10 @@  sfc_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
 	return sfc_dev_udp_tunnel_op(dev, tunnel_udp, SFC_UDP_TUNNEL_DEL_PORT);
 }
 
+/*
+ * The function is used by the secondary process as well. It must not
+ * use any process-local pointers from the adapter data.
+ */
 static int
 sfc_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
 			  struct rte_eth_rss_conf *rss_conf)
@@ -1503,6 +1507,10 @@  sfc_dev_rss_hash_update(struct rte_eth_dev *dev,
 	return -rc;
 }
 
+/*
+ * The function is used by the secondary process as well. It must not
+ * use any process-local pointers from the adapter data.
+ */
 static int
 sfc_dev_rss_reta_query(struct rte_eth_dev *dev,
 		       struct rte_eth_rss_reta_entry64 *reta_conf,
@@ -1903,6 +1911,8 @@  static const struct eth_dev_ops sfc_eth_dev_secondary_ops = {
 	.rx_descriptor_done		= sfc_rx_descriptor_done,
 	.rx_descriptor_status		= sfc_rx_descriptor_status,
 	.tx_descriptor_status		= sfc_tx_descriptor_status,
+	.reta_query			= sfc_dev_rss_reta_query,
+	.rss_hash_conf_get		= sfc_dev_rss_hash_conf_get,
 	.rxq_info_get			= sfc_rx_queue_info_get,
 	.txq_info_get			= sfc_tx_queue_info_get,
 };