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: <20140310.155015.1679111216670234389.davem@davemloft.net>
Date:	Mon, 10 Mar 2014 15:50:15 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	ogerlitz@...lanox.com
Cc:	netdev@...r.kernel.org, roland@...nel.org,
	jackm@....mellanox.co.il, amirv@...lanox.com
Subject: Re: [PATCH net-next 1/7] mlx4: Adjust QP1 multiplexing for
 RoCE/SRIOV

From: Or Gerlitz <ogerlitz@...lanox.com>
Date: Sun,  9 Mar 2014 16:53:58 +0200

> @@ -509,6 +510,10 @@ int mlx4_ib_send_to_slave(struct mlx4_ib_dev *dev, int slave, u8 port,
>  	 * The driver will set the force loopback bit in post_send */
>  	memset(&attr, 0, sizeof attr);
>  	attr.port_num = port;
> +	if (is_eth) {
> +		mlx4_get_roce_gid_from_slave(dev->dev, port, slave, attr.grh.dgid.raw);
> +		attr.ah_flags = IB_AH_GRH;
> +	}
>  	ah = ib_create_ah(tun_ctx->pd, &attr);
>  	if (IS_ERR(ah))
>  		return -ENOMEM;

Either the error returned from mlx4_get_roce_gid_from_slave() doesn't matter...

> +			err = mlx4_get_roce_gid_from_slave(to_mdev(ib_dev)->dev,
> +							   be32_to_cpu(ah->av.ib.port_pd) >> 24,
> +							   ah->av.ib.gid_index, &sgid.raw[0]);
> +			if (err)
> +				return err;

or it does.

Please decide whether it does or not.  If it does, make all call sites check the return
value.  If it does not, remove the return value and make the function return void.
--
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