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] [day] [month] [year] [list]
Date:	Tue, 06 Jul 2010 09:22:58 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Ben Hutchings <bhutchings@...arflare.com>
CC:	David Miller <davem@...emloft.net>,
	Roland Dreier <rolandd@...co.com>, netdev@...r.kernel.org,
	linux-net-drivers@...arflare.com, sgruszka@...hat.com,
	amit.salecha@...gic.com, amwang@...hat.com,
	anirban.chakraborty@...gic.com, dm@...lsio.com, scofeldm@...co.com,
	vkolluri@...co.com, roprabhu@...co.com,
	e1000-devel@...ts.sourceforge.net, buytenh@...tstofly.org,
	gallatin@...i.com, brice@...i.com, shemminger@...ux-foundation.org,
	jgarzik@...hat.com, Faisal Latif <faisal.latif@...el.com>,
	Chien Tung <chien.tin.tung@...el.com>,
	linux-rdma@...r.kernel.org
Subject: Re: [PATCH net-next-2.6] IB/{nes,ipoib}: Pass supported flags to
 ethtool_op_set_flags()

On 07/03/10 12:41, Ben Hutchings wrote:
> Following commit 1437ce3983bcbc0447a0dedcd644c14fe833d266 "ethtool:
> Change ethtool_op_set_flags to validate flags", ethtool_op_set_flags
> takes a third parameter and cannot be used directly as an
> implementation of ethtool_ops::set_flags.
> 
> Changes nes and ipoib driver to pass in the appropriate value.
> 
> Signed-off-by: Ben Hutchings <bhutchings@...arflare.com>
> ---
> This is compile-tested only.

Ack, thanks.

> Dave, Roland, you'd better decide between yourselves should apply this.
> 
> Ben.
> 
>  drivers/infiniband/hw/nes/nes_nic.c          |    8 +++++++-
>  drivers/infiniband/ulp/ipoib/ipoib_ethtool.c |    7 ++++++-
>  2 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
> index 5cc0a9a..42e7aad 100644
> --- a/drivers/infiniband/hw/nes/nes_nic.c
> +++ b/drivers/infiniband/hw/nes/nes_nic.c
> @@ -1567,6 +1567,12 @@ static int nes_netdev_set_settings(struct net_device *netdev, struct ethtool_cmd
>  }
>  
> 
> +static int nes_netdev_set_flags(struct net_device *netdev, u32 flags)
> +{
> +	return ethtool_op_set_flags(netdev, flags, ETH_FLAG_LRO);
> +}
> +
> +
>  static const struct ethtool_ops nes_ethtool_ops = {
>  	.get_link = ethtool_op_get_link,
>  	.get_settings = nes_netdev_get_settings,
> @@ -1588,7 +1594,7 @@ static const struct ethtool_ops nes_ethtool_ops = {
>  	.get_tso = ethtool_op_get_tso,
>  	.set_tso = ethtool_op_set_tso,
>  	.get_flags = ethtool_op_get_flags,
> -	.set_flags = ethtool_op_set_flags,
> +	.set_flags = nes_netdev_set_flags,
>  };
>  
> 
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
> index 40e8584..1a1657c 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
> @@ -147,6 +147,11 @@ static void ipoib_get_ethtool_stats(struct net_device *dev,
>  	data[index++] = priv->lro.lro_mgr.stats.no_desc;
>  }
>  
> +static int ipoib_set_flags(struct net_device *dev, u32 flags)
> +{
> +	return ethtool_op_set_flags(dev, flags, ETH_FLAG_LRO);
> +}
> +
>  static const struct ethtool_ops ipoib_ethtool_ops = {
>  	.get_drvinfo		= ipoib_get_drvinfo,
>  	.get_rx_csum		= ipoib_get_rx_csum,
> @@ -154,7 +159,7 @@ static const struct ethtool_ops ipoib_ethtool_ops = {
>  	.get_coalesce		= ipoib_get_coalesce,
>  	.set_coalesce		= ipoib_set_coalesce,
>  	.get_flags		= ethtool_op_get_flags,
> -	.set_flags		= ethtool_op_set_flags,
> +	.set_flags		= ipoib_set_flags,
>  	.get_strings		= ipoib_get_strings,
>  	.get_sset_count		= ipoib_get_sset_count,
>  	.get_ethtool_stats	= ipoib_get_ethtool_stats,


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
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