lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1374079940.3861.10.camel@bwh-desktop.uk.level5networks.com>
Date:	Wed, 17 Jul 2013 17:52:20 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Laura Mihaela Vasilescu <laura.vasilescu@...edu.org>
CC:	<netdev@...r.kernel.org>, <jeffrey.t.kirsher@...el.com>,
	<carolyn.wyborny@...el.com>, <anjali.singhai@...el.com>
Subject: Re: [PATCH 2/2] igb: Expose RSS indirection table for ethtool

This is wrong, as there are 4 entries packed into each register.

On Wed, 2013-07-17 at 09:50 +0300, Laura Mihaela Vasilescu wrote:
> Signed-off-by: Laura Mihaela Vasilescu <laura.vasilescu@...edu.org>
> ---
>  drivers/net/ethernet/intel/igb/igb_ethtool.c |   32 ++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
> index 85fe7b5..7e18dfa 100644
> --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
> +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
> @@ -2771,6 +2771,35 @@ static void igb_ethtool_complete(struct net_device *netdev)
>  	pm_runtime_put(&adapter->pdev->dev);
>  }
>  
> +static u32 igb_get_rss_table_size(struct net_device *netdev)
> +{
> +	return IGB_RETA_SIZE;

* 4

> +}
> +
> +static int igb_get_rss_table(struct net_device *netdev, u32 *rxfh_indir_tbl)
> +{
> +	struct igb_adapter *adapter = netdev_priv(netdev);
> +	struct e1000_hw *hw = &adapter->hw;
> +	int i;
> +
> +	for (i = 0; i < IGB_RETA_SIZE; i++)
> +		rxfh_indir_tbl[i] = rd32(E1000_RETA(i));

Unpack each register into entries i*4, i*4+1, i*4+2, i*4+3.

> +
> +	return 0;
> +}
> +
> +static int igb_set_rss_table(struct net_device *netdev, const u32 *rxfh_indir_tbl)
> +{
> +	struct igb_adapter *adapter = netdev_priv(netdev);
> +	struct e1000_hw *hw = &adapter->hw;
> +	int i;
> +
> +	for (i = 0; i < IGB_RETA_SIZE; i++)
> +		wr32(E1000_RETA(i), rxfh_indir_tbl[i]);

Pack entries i*4, i*4+1, i*4+2, i*4+3 into each register (as in
igb_setup_mrqc()).

> +
> +	return 0;
> +}

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ