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: <5714EB23.5020102@cogentembedded.com>
Date:	Mon, 18 Apr 2016 17:11:47 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Yuval Mintz <Yuval.Mintz@...gic.com>, davem@...emloft.net,
	netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/5] qede: Add support for ethtool private flags

Hello.

On 4/17/2016 10:26 PM, Yuval Mintz wrote:

> Adds a getter for the interfaces private flags.
> The only parameter currently supported is whether the interface is a
> coupled function [required for supporting 100g].
>
> Signed-off-by: Yuval Mintz <Yuval.Mintz@...gic.com>
> ---
>   drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 27 +++++++++++++++++++++++++
>   1 file changed, 27 insertions(+)
>
> diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
> index f87e83b..5ba6b2a 100644
> --- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
> +++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
[...]
> @@ -185,6 +200,17 @@ static int qede_get_sset_count(struct net_device *dev, int stringset)
>   	}
>   }
>
> +static u32 qede_get_priv_flags(struct net_device *dev)
> +{
> +	struct qede_dev *edev = netdev_priv(dev);
> +	u32 flags = 0;
> +
> +	flags |= (!!(edev->dev_info.common.num_hwfns > 1)) <<
> +		 QEDE_PRI_FLAG_CMT;

    Why not just '='?

> +
> +	return flags;

    ... or direct return of the value above?

> +}
> +
>   static int qede_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
>   {
>   	struct qede_dev *edev = netdev_priv(dev);
[...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ