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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9DD61F30A802C4429A01CA4200E302A7DCD48573@fmsmsx124.amr.corp.intel.com>
Date:   Tue, 21 Apr 2020 00:25:14 +0000
From:   "Saleem, Shiraz" <shiraz.saleem@...el.com>
To:     Leon Romanovsky <leon@...nel.org>,
        "Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC:     "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "jgg@...pe.ca" <jgg@...pe.ca>,
        "Ismail, Mustafa" <mustafa.ismail@...el.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "nhorman@...hat.com" <nhorman@...hat.com>,
        "sassmann@...hat.com" <sassmann@...hat.com>
Subject: RE: [RFC PATCH v5 04/16] RDMA/irdma: Add HMC backing store setup
 functions

> Subject: Re: [RFC PATCH v5 04/16] RDMA/irdma: Add HMC backing store setup
> functions
> 
> On Fri, Apr 17, 2020 at 10:12:39AM -0700, Jeff Kirsher wrote:
> > From: Mustafa Ismail <mustafa.ismail@...el.com>
> >
> > HW uses host memory as a backing store for a number of protocol
> > context objects and queue state tracking.
> > The Host Memory Cache (HMC) is a component responsible for managing
> > these objects stored in host memory.
> >
> > Add the functions and data structures to manage the allocation of
> > backing pages used by the HMC for the various objects
> >
> > Signed-off-by: Mustafa Ismail <mustafa.ismail@...el.com>
> > Signed-off-by: Shiraz Saleem <shiraz.saleem@...el.com>
[....]

> > diff --git a/drivers/infiniband/hw/irdma/hmc.h
> > b/drivers/infiniband/hw/irdma/hmc.h
> > new file mode 100644
> > index 000000000000..6f3fbf61f048
> > --- /dev/null
> > +++ b/drivers/infiniband/hw/irdma/hmc.h
> > @@ -0,0 +1,217 @@
> > +/* SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB */
> > +/* Copyright (c) 2015 - 2019 Intel Corporation */ #ifndef IRDMA_HMC_H
> > +#define IRDMA_HMC_H
> > +
> > +#include "defs.h"
> > +
> > +#define IRDMA_HMC_MAX_BP_COUNT			512
> > +#define IRDMA_MAX_SD_ENTRIES			11
> > +#define IRDMA_HW_DBG_HMC_INVALID_BP_MARK	0xca
> > +#define IRDMA_HMC_INFO_SIGNATURE		0x484d5347
> > +#define IRDMA_HMC_PD_CNT_IN_SD			512
> > +#define IRDMA_HMC_DIRECT_BP_SIZE		0x200000
> > +#define IRDMA_HMC_MAX_SD_COUNT			8192
> > +#define IRDMA_HMC_PAGED_BP_SIZE			4096
> > +#define IRDMA_HMC_PD_BP_BUF_ALIGNMENT		4096
> > +#define IRDMA_FIRST_VF_FPM_ID			8
> > +#define FPM_MULTIPLIER				1024
> > +
> > +#define IRDMA_INC_SD_REFCNT(sd_table)	((sd_table)->ref_cnt++)
> > +#define IRDMA_INC_PD_REFCNT(pd_table)	((pd_table)->ref_cnt++)
> > +#define IRDMA_INC_BP_REFCNT(bp)		((bp)->ref_cnt++)
> > +
> > +#define IRDMA_DEC_SD_REFCNT(sd_table)	((sd_table)->ref_cnt--)
> > +#define IRDMA_DEC_PD_REFCNT(pd_table)	((pd_table)->ref_cnt--)
> > +#define IRDMA_DEC_BP_REFCNT(bp)		((bp)->ref_cnt--)
> 
> It is bad for two reasons, first you obfuscated simple ++/-- and second you called
> it refcnt, while we have special type for that.
>

Agreed on all fronts. Will fix.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ