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]
Date:   Mon, 25 Jan 2021 15:37:37 -0400
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Shiraz Saleem <shiraz.saleem@...el.com>
CC:     <dledford@...hat.com>, <kuba@...nel.org>, <davem@...emloft.net>,
        <linux-rdma@...r.kernel.org>, <gregkh@...uxfoundation.org>,
        <netdev@...r.kernel.org>, <david.m.ertman@...el.com>,
        <anthony.l.nguyen@...el.com>,
        Mustafa Ismail <mustafa.ismail@...el.com>
Subject: Re: [PATCH 18/22] RDMA/irdma: Add miscellaneous utility definitions

On Fri, Jan 22, 2021 at 05:48:23PM -0600, Shiraz Saleem wrote:
> From: Mustafa Ismail <mustafa.ismail@...el.com>
> 
> Add miscellaneous utility functions and headers.
> 
> Signed-off-by: Mustafa Ismail <mustafa.ismail@...el.com>
> Signed-off-by: Shiraz Saleem <shiraz.saleem@...el.com>
>  drivers/infiniband/hw/irdma/osdep.h  |   99 ++
>  drivers/infiniband/hw/irdma/protos.h |  118 ++
>  drivers/infiniband/hw/irdma/status.h |   70 +
>  drivers/infiniband/hw/irdma/utils.c  | 2680 ++++++++++++++++++++++++++++++++++
>  4 files changed, 2967 insertions(+)
>  create mode 100644 drivers/infiniband/hw/irdma/osdep.h
>  create mode 100644 drivers/infiniband/hw/irdma/protos.h
>  create mode 100644 drivers/infiniband/hw/irdma/status.h
>  create mode 100644 drivers/infiniband/hw/irdma/utils.c
> 
> diff --git a/drivers/infiniband/hw/irdma/osdep.h b/drivers/infiniband/hw/irdma/osdep.h
> new file mode 100644
> index 0000000..10e2e02
> +++ b/drivers/infiniband/hw/irdma/osdep.h

> @@ -0,0 +1,99 @@
> +/* SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB */
> +/* Copyright (c) 2015 - 2021 Intel Corporation */
> +#ifndef IRDMA_OSDEP_H
> +#define IRDMA_OSDEP_H
> +
> +#include <linux/pci.h>
> +#include <crypto/hash.h>
> +#include <rdma/ib_verbs.h>
> +
> +#define STATS_TIMER_DELAY	60000
> +
> +#define idev_to_dev(ptr) (&((ptr)->hw->pcidev->dev))
> +#define ihw_to_dev(hw)   (&(hw)->pcidev->dev)

Try to avoid defines like this, it looses the typing information of
the arguments. These should be static inline functions

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ