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, 09 Feb 2010 17:32:28 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Yevgeny Petrilin <yevgenyp@...lanox.co.il>
Cc:	Roland Dreier <rdreier@...co.com>, netdev@...r.kernel.org,
	liranl@...lanox.co.il, tziporet@...lanox.co.il
Subject: Re: [PATCH 04/23 v3] mlx4_core: add slave resource allocation

On Tue, 2010-02-09 at 14:44 +0000, Ben Hutchings wrote:
> On Thu, 2010-02-04 at 17:54 +0200, Yevgeny Petrilin wrote:
> > All QPs/CQs/SRQs/MPTs/MTTs are allocated from shared pools, which are owned by
> > the master. In addition, all backing ICM memory for these objects is managed by
> > the master.
> > To allow slaves to allocate resources, ICM allocation is separated from the rest
> > of the object state, which is held at the slave.
> > Slaves can then reserve resource ranges and allocate ICM over the comm channel.
> > 
> > Signed-off-by: Liran Liss <liranl@...lanox.co.il>
> > Signed-off-by: Yevgeny Petrilin <yevgenyp@...lanox.co.il>
> > ---
> >  drivers/net/mlx4/cmd.c   |  110 +++++++++++++++++++++++++++++++++
> >  drivers/net/mlx4/cq.c    |   91 +++++++++++++++++++++-------
> >  drivers/net/mlx4/mlx4.h  |   27 ++++++++
> >  drivers/net/mlx4/mr.c    |  125 ++++++++++++++++++++++++++++++++++----
> >  drivers/net/mlx4/qp.c    |  151 +++++++++++++++++++++++++++++++++-------------
> >  drivers/net/mlx4/srq.c   |   88 ++++++++++++++++++++-------
> >  include/linux/mlx4/cmd.h |    2 +
> >  7 files changed, 496 insertions(+), 98 deletions(-)
> > 
> > diff --git a/drivers/net/mlx4/cmd.c b/drivers/net/mlx4/cmd.c
> > index 9e85330..533ce77 100644
> > --- a/drivers/net/mlx4/cmd.c
> > +++ b/drivers/net/mlx4/cmd.c
> > @@ -417,6 +417,100 @@ static int mlx4_ACCESS_MEM(struct mlx4_dev *dev, u64 master_addr,
> >  					   MLX4_CMD_TIME_CLASS_A);
> >  }
> >  
> > +static int mlx4_RESOURCE_wrapper(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr,
> > +						       struct mlx4_cmd_mailbox *inbox,
> > +						       struct mlx4_cmd_mailbox *outbox)
> > +{
> > +	u32 param1 = *((u32 *) &vhcr->in_param);
> > +	u32 param2 = *(((u32 *) &vhcr->in_param) + 1);
[...]

I failed to spot this in the first pass.  Really, this is ridiculous.
If you are going to make a habit of passing around pairs of 32-bit
values, declare in_param as a union.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
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