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: <20170207211901.GB28922@obsidianresearch.com>
Date:   Tue, 7 Feb 2017 14:19:01 -0700
From:   Jason Gunthorpe <jgunthorpe@...idianresearch.com>
To:     "Vishwanathapura, Niranjana" <niranjana.vishwanathapura@...el.com>
Cc:     dledford@...hat.com, linux-rdma@...r.kernel.org,
        netdev@...r.kernel.org, dennis.dalessandro@...el.com,
        ira.weiny@...el.com, Liran Liss <liranl@...lanox.com>
Subject: Re: [RFC v3 02/11] IB/hfi-vnic: Virtual Network Interface Controller
 (VNIC) interface

On Tue, Feb 07, 2017 at 12:23:01PM -0800, Vishwanathapura, Niranjana wrote:
> Add rdma netdev interface to ib device structure allowing rdma netdev
> devices to be allocated by ib clients.
> Define HFI VNIC interface between hardware independent VNIC
> functionality and the hardware dependent VNIC functionality.

This commit message could be a bit clearer.

The alloc_rdma_netdev multiplexer is inteded as a new general
interface and this adds a protocol definition for ethernet VNIC on
OPA.

The hope is that ipoib can follow the same example and use the same
alloc_rdma_netdev entry point. Hopefully Mellanox will look at this
patch as I have talked to them in the past about doing this...

It looks like HFI turned out fairly well, the driver code and higher
level code have a reasonably nice split in my quick look.

>  	IB_DEVICE_RAW_SCATTER_FCS		= (1ULL << 34),
> +	IB_DEVICE_RDMA_NETDEV_HFI_VNIC		= (1ULL << 35),

What is this called HFI_VNIC anyhow? Shouldn't this be OPA_VNIC? There
is nothing really HFI specific, right?

> +/* hfi vnic rdma netdev's private data structure */
> +struct hfi_vnic_rdma_netdev {
> +	struct rdma_netdev rn;  /* keep this first */
> +	/* followed by device private data */
> +	char *dev_priv[0];
> +};
> +
> +static inline void *hfi_vnic_priv(const struct net_device *dev)
> +{
> +	struct rdma_netdev *rn = netdev_priv(dev);
> +
> +	return rn->clnt_priv;
> +}
> +
> +static inline void *hfi_vnic_dev_priv(const struct net_device *dev)
> +{
> +	struct rdma_netdev *rn = netdev_priv(dev);

Shouldn't this be hfi_vnic_rdma_netdev ?

> +	return rn + 1;

And this should be rn->dev_priv ?

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ