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  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]
Date:	Thu, 01 May 2014 23:54:42 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Or Gerlitz <ogerlitz@...lanox.com>, davem@...emloft.net
CC:	netdev@...r.kernel.org, roland@...nel.org,
	jackm@....mellanox.co.il, matanb@...lanox.com, amirv@...lanox.com,
	Jack Morgenstein <jackm@...lanox.com>
Subject: Re: [PATCH net 1/4] net/mlx4_core: Adjust port number in qp_attach
 wrapper when detaching

Hello.

On 05/01/2014 04:51 PM, Or Gerlitz wrote:

> From: Jack Morgenstein <jackm@....mellanox.co.il>

> When using single ported VFs and the VF is using port 2, we need
> to adjust the port accordingly (change it from 1 to 2).

> Fixes: 449fc48 ('net/mlx4: Adapt code for N-Port VF')
> Signed-off-by: Matan Barak <matanb@...lanox.com>
> Signed-off-by: Jack Morgenstein <jackm@...lanox.com>
> Signed-off-by: Or Gerlitz <ogerlitz@...lanox.com>
> ---
>   .../net/ethernet/mellanox/mlx4/resource_tracker.c  |   23 ++++++++++++++++++++
>   1 files changed, 23 insertions(+), 0 deletions(-)

> diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
> index 3b5f53e..3f27cba 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
> @@ -3733,6 +3733,25 @@ static int qp_detach(struct mlx4_dev *dev, struct mlx4_qp *qp,
>   	}
>   }
>
> +static int mlx4_adjust_port(struct mlx4_dev *dev, int slave,
> +			    u8 *gid, enum mlx4_protocol prot)
> +{
> +	int real_port;
> +
> +	if (prot != MLX4_PROT_ETH)
> +		return 0;
> +
> +	if (dev->caps.steering_mode == MLX4_STEERING_MODE_B0 ||
> +	    (dev->caps.steering_mode == MLX4_STEERING_MODE_DEVICE_MANAGED)) {

    It looks a bit strange when you enclose in parens the second == but not 
the first. In fact, they're not at all necessary.

WBR, Sergei

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