[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <547DD8F9.8030403@dev.mellanox.co.il>
Date: Tue, 02 Dec 2014 17:21:29 +0200
From: Eyal Perry <eyalpe@....mellanox.co.il>
To: Edward Cree <ecree@...arflare.com>, Amir Vadai <amirv@...lanox.com>
CC: "David S. Miller" <davem@...emloft.net>,
Ben Hutchings <ben@...adent.org.uk>,
netdev <netdev@...r.kernel.org>,
Solarflare linux maintainers <linux-net-drivers@...arflare.com>,
Shradha Shah <sshah@...arflare.com>
Subject: Re: [PATCH net-next V2 1/2] ethtool: Support for configurable RSS
hash function
On 12/2/2014 17:14 PM, Edward Cree wrote:
> On 02/12/14 14:20, Amir Vadai wrote:
>> diff --git a/drivers/net/ethernet/sfc/ethtool.c b/drivers/net/ethernet/sfc/ethtool.c
>> index cad258a..2ac07c9 100644
>> --- a/drivers/net/ethernet/sfc/ethtool.c
>> +++ b/drivers/net/ethernet/sfc/ethtool.c
>> @@ -1086,19 +1086,29 @@ static u32 efx_ethtool_get_rxfh_indir_size(struct net_device *net_dev)
>> 0 : ARRAY_SIZE(efx->rx_indir_table));
>> }
>>
>> -static int efx_ethtool_get_rxfh(struct net_device *net_dev, u32 *indir, u8 *key)
>> +static int efx_ethtool_get_rxfh(struct net_device *net_dev, u32 *indir, u8 *key,
>> + u8 *hfunc)
>> {
>> struct efx_nic *efx = netdev_priv(net_dev);
>>
>> - memcpy(indir, efx->rx_indir_table, sizeof(efx->rx_indir_table));
>> + if (hfunc)
>> + *hfunc = ETH_RSS_HASH_UNKNOWN;
> This should be ETH_RSS_HASH_TOP, especially as that's what you test
> against in the _set_ function below.
> (I don't know if we responded to your query. If not, I can confirm
> we're using Toeplitz.)
Sending V3...
>> + if (indir)
>> + memcpy(indir, efx->rx_indir_table, sizeof(efx->rx_indir_table));
>> return 0;
>> }
>>
>> -static int efx_ethtool_set_rxfh(struct net_device *net_dev,
>> - const u32 *indir, const u8 *key)
>> +static int efx_ethtool_set_rxfh(struct net_device *net_dev, const u32 *indir,
>> + const u8 *key, const u8 hfunc)
>> {
>> struct efx_nic *efx = netdev_priv(net_dev);
>>
>> + /* We do not allow change in unsupported parameters */
>> + if (key ||
>> + (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != ETH_RSS_HASH_TOP))
>> + return -EOPNOTSUPP;
>> + if (!indir)
>> + return 0;
>> memcpy(efx->rx_indir_table, indir, sizeof(efx->rx_indir_table));
>> efx->type->rx_push_rss_config(efx);
>> return 0;
> -Edward
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists