From: <edward.cree@amd.com>
To: <linux-net-drivers@amd.com>, <davem@davemloft.net>,
<kuba@kernel.org>, <edumazet@google.com>, <pabeni@redhat.com>
Cc: Edward Cree <ecree.xilinx@gmail.com>, <netdev@vger.kernel.org>,
<habetsm.xilinx@gmail.com>, <sudheer.mogilappagari@intel.com>,
<jdamato@fastly.com>, <mw@semihalf.com>, <linux@armlinux.org.uk>,
<sgoutham@marvell.com>, <gakula@marvell.com>,
<sbhatta@marvell.com>, <hkelam@marvell.com>, <saeedm@nvidia.com>,
<leon@kernel.org>, <jacob.e.keller@intel.com>, <andrew@lunn.ch>,
<ahmed.zaki@intel.com>, <horms@kernel.org>
Subject: [PATCH v7 net-next 9/9] sfc: remove get_rxfh_context dead code
Date: Mon, 24 Jun 2024 15:11:20 +0100 [thread overview]
Message-ID: <edb6b51c0722a9a5c5e4cee68305b0ce986cbea2.1719237940.git.ecree.xilinx@gmail.com> (raw)
In-Reply-To: <cover.1719237939.git.ecree.xilinx@gmail.com>
From: Edward Cree <ecree.xilinx@gmail.com>
The core now always satisfies 'ethtool -x context nonzero' from its own
tracking, so our lookup code for that case is never called. Remove it.
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
---
drivers/net/ethernet/sfc/ethtool_common.c | 38 ++---------------------
1 file changed, 2 insertions(+), 36 deletions(-)
diff --git a/drivers/net/ethernet/sfc/ethtool_common.c b/drivers/net/ethernet/sfc/ethtool_common.c
index 0a8d2c9ffce6..6ded44b86052 100644
--- a/drivers/net/ethernet/sfc/ethtool_common.c
+++ b/drivers/net/ethernet/sfc/ethtool_common.c
@@ -1163,48 +1163,14 @@ u32 efx_ethtool_get_rxfh_key_size(struct net_device *net_dev)
return efx->type->rx_hash_key_size;
}
-static int efx_ethtool_get_rxfh_context(struct net_device *net_dev,
- struct ethtool_rxfh_param *rxfh)
-{
- struct efx_nic *efx = efx_netdev_priv(net_dev);
- struct efx_rss_context_priv *ctx_priv;
- struct efx_rss_context ctx;
- int rc = 0;
-
- if (!efx->type->rx_pull_rss_context_config)
- return -EOPNOTSUPP;
-
- mutex_lock(&net_dev->ethtool->rss_lock);
- ctx_priv = efx_find_rss_context_entry(efx, rxfh->rss_context);
- if (!ctx_priv) {
- rc = -ENOENT;
- goto out_unlock;
- }
- ctx.priv = *ctx_priv;
- rc = efx->type->rx_pull_rss_context_config(efx, &ctx);
- if (rc)
- goto out_unlock;
-
- rxfh->hfunc = ETH_RSS_HASH_TOP;
- if (rxfh->indir)
- memcpy(rxfh->indir, ctx.rx_indir_table,
- sizeof(ctx.rx_indir_table));
- if (rxfh->key)
- memcpy(rxfh->key, ctx.rx_hash_key,
- efx->type->rx_hash_key_size);
-out_unlock:
- mutex_unlock(&net_dev->ethtool->rss_lock);
- return rc;
-}
-
int efx_ethtool_get_rxfh(struct net_device *net_dev,
struct ethtool_rxfh_param *rxfh)
{
struct efx_nic *efx = efx_netdev_priv(net_dev);
int rc;
- if (rxfh->rss_context)
- return efx_ethtool_get_rxfh_context(net_dev, rxfh);
+ if (rxfh->rss_context) /* core should never call us for these */
+ return -EINVAL;
rc = efx->type->rx_pull_rss_config(efx);
if (rc)
prev parent reply other threads:[~2024-06-24 14:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 14:11 [PATCH v7 net-next 0/9] ethtool: track custom RSS contexts in the core edward.cree
2024-06-24 14:11 ` [PATCH v7 net-next 1/9] net: move ethtool-related netdev state into its own struct edward.cree
2024-06-24 14:11 ` [PATCH v7 net-next 2/9] net: ethtool: attach an XArray of custom RSS contexts to a netdevice edward.cree
2024-06-24 14:11 ` [PATCH v7 net-next 3/9] net: ethtool: record custom RSS contexts in the XArray edward.cree
2024-06-24 14:11 ` [PATCH v7 net-next 4/9] net: ethtool: let the core choose RSS context IDs edward.cree
2024-06-24 14:11 ` [PATCH v7 net-next 5/9] net: ethtool: add an extack parameter to new rxfh_context APIs edward.cree
2024-06-24 14:11 ` [PATCH v7 net-next 6/9] net: ethtool: add a mutex protecting RSS contexts edward.cree
2024-06-24 14:11 ` [PATCH v7 net-next 7/9] sfc: use new rxfh_context API edward.cree
2024-06-24 14:11 ` [PATCH v7 net-next 8/9] net: ethtool: use the tracking array for get_rxfh on custom RSS contexts edward.cree
2024-06-24 14:11 ` edward.cree [this message]
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=edb6b51c0722a9a5c5e4cee68305b0ce986cbea2.1719237940.git.ecree.xilinx@gmail.com \
--to=edward.cree@amd.com \
--cc=ahmed.zaki@intel.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=habetsm.xilinx@gmail.com \
--cc=hkelam@marvell.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=jdamato@fastly.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-net-drivers@amd.com \
--cc=linux@armlinux.org.uk \
--cc=mw@semihalf.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
--cc=sudheer.mogilappagari@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).