From 128da6924a466bc380eb4acec89ab2576aa174c3 Mon Sep 17 00:00:00 2001 From: Andrew Rybchenko Date: Thu, 7 Feb 2019 12:17:39 +0000 Subject: [PATCH] net/sfc: support RSS RETA and hash config get in secondary RSS RETA query and hash configuration get functions use shared adapter data only. No libefx functions are called. Signed-off-by: Andrew Rybchenko --- doc/guides/rel_notes/release_19_05.rst | 2 ++ drivers/net/sfc/sfc_ethdev.c | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/doc/guides/rel_notes/release_19_05.rst b/doc/guides/rel_notes/release_19_05.rst index 6d65c8eae0..1b7f14cb25 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 c6e1e87cea..47450f6b24 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 @@ fail_rx_hf_rte_to_efx: 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, }; -- 2.20.1