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: <20201216161154.69e367fe@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Wed, 16 Dec 2020 16:11:54 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Parav Pandit <parav@...dia.com>
Cc:     Saeed Mahameed <saeed@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jason Gunthorpe <jgg@...dia.com>,
        Leon Romanovsky <leonro@...dia.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        David Ahern <dsahern@...nel.org>,
        Jacob Keller <jacob.e.keller@...el.com>,
        Sridhar Samudrala <sridhar.samudrala@...el.com>,
        "david.m.ertman@...el.com" <david.m.ertman@...el.com>,
        "dan.j.williams@...el.com" <dan.j.williams@...el.com>,
        "kiran.patil@...el.com" <kiran.patil@...el.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        Vu Pham <vuhuong@...dia.com>,
        Saeed Mahameed <saeedm@...dia.com>
Subject: Re: [net-next v5 07/15] net/mlx5: SF, Add auxiliary device support

On Wed, 16 Dec 2020 05:19:15 +0000 Parav Pandit wrote:
> > From: Jakub Kicinski <kuba@...nel.org>
> > Sent: Wednesday, December 16, 2020 6:14 AM
> > 
> > On Tue, 15 Dec 2020 01:03:50 -0800 Saeed Mahameed wrote:  
> > > +static ssize_t sfnum_show(struct device *dev, struct device_attribute
> > > +*attr, char *buf) {
> > > +	struct auxiliary_device *adev = container_of(dev, struct  
> > auxiliary_device, dev);  
> > > +	struct mlx5_sf_dev *sf_dev = container_of(adev, struct mlx5_sf_dev,
> > > +adev);
> > > +
> > > +	return scnprintf(buf, PAGE_SIZE, "%u\n", sf_dev->sfnum); } static
> > > +DEVICE_ATTR_RO(sfnum);
> > > +
> > > +static struct attribute *sf_device_attrs[] = {
> > > +	&dev_attr_sfnum.attr,
> > > +	NULL,
> > > +};
> > > +
> > > +static const struct attribute_group sf_attr_group = {
> > > +	.attrs = sf_device_attrs,
> > > +};
> > > +
> > > +static const struct attribute_group *sf_attr_groups[2] = {
> > > +	&sf_attr_group,
> > > +	NULL
> > > +};  
> > 
> > Why the sysfs attribute? Devlink should be able to report device name so
> > there's no need for a tie in from the other end.  
> There isn't a need to enforce a devlink instance creation either,

You mean there isn't a need for the SF to be spawned by devlink?

> those mlx5 driver does it.

Really, no idea what you're trying to say. Read your emails before
you send them.

> systemd/udev looks after the sysfs attributes, so its parent device, similar to how phys_port_name etc looked for representor side.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ