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  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, 5 Oct 2021 14:00:05 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     Jason Gunthorpe <jgg@...dia.com>
Cc:     Doug Ledford <dledford@...hat.com>,
        Aharon Landau <aharonl@...dia.com>,
        "David S. Miller" <davem@...emloft.net>,
        Dennis Dalessandro <dennis.dalessandro@...nelisnetworks.com>,
        Gal Pressman <galpress@...zon.com>,
        Jakub Kicinski <kuba@...nel.org>, linux-kernel@...r.kernel.org,
        linux-rdma@...r.kernel.org, Maor Gottlieb <maorg@...dia.com>,
        Mark Zhang <markzhang@...dia.com>,
        Mike Marciniszyn <mike.marciniszyn@...nelisnetworks.com>,
        Mustafa Ismail <mustafa.ismail@...el.com>,
        Naresh Kumar PBS <nareshkumar.pbs@...adcom.com>,
        Neta Ostrovsky <netao@...dia.com>, netdev@...r.kernel.org,
        Potnuri Bharat Teja <bharat@...lsio.com>,
        Saeed Mahameed <saeedm@...dia.com>,
        Selvin Xavier <selvin.xavier@...adcom.com>,
        Shiraz Saleem <shiraz.saleem@...el.com>,
        Yishai Hadas <yishaih@...dia.com>,
        Zhu Yanjun <zyjzyj2000@...il.com>
Subject: Re: [PATCH rdma-next v2 13/13] RDMA/nldev: Add support to get status
 of all counters

On Mon, Oct 04, 2021 at 03:07:14PM -0300, Jason Gunthorpe wrote:
> On Thu, Sep 30, 2021 at 11:02:29AM +0300, Leon Romanovsky wrote:
> > +static int stat_get_doit_default_counter(struct sk_buff *skb,
> > +					 struct nlmsghdr *nlh,
> > +					 struct netlink_ext_ack *extack,
> > +					 struct nlattr *tb[])
> > +{
> > +	struct rdma_hw_stats *stats;
> > +	struct ib_device *device;
> > +	u32 index, port;
> > +	int ret;
> > +
> > +	if (!tb[RDMA_NLDEV_ATTR_DEV_INDEX] || !tb[RDMA_NLDEV_ATTR_PORT_INDEX])
> > +		return -EINVAL;
> > +
> > +	index = nla_get_u32(tb[RDMA_NLDEV_ATTR_DEV_INDEX]);
> > +	device = ib_device_get_by_index(sock_net(skb->sk), index);
> > +	if (!device)
> > +		return -EINVAL;
> > +
> > +	port = nla_get_u32(tb[RDMA_NLDEV_ATTR_PORT_INDEX]);
> > +	if (!rdma_is_port_valid(device, port)) {
> > +		ret = -EINVAL;
> > +		goto end;
> > +	}
> > +
> > +	stats = ib_get_hw_stats_port(device, port);
> > +	if (!stats) {
> > +		ret = -EINVAL;
> > +		goto end;
> > +	}
> > +
> > +	if (tb[RDMA_NLDEV_ATTR_STAT_HWCOUNTER_DYNAMIC])
> > +		ret = stat_get_doit_stats_list(skb, nlh, extack, tb,
> > +					       device, port, stats);
> > +	else
> > +		ret = stat_get_doit_stats_values(skb, nlh, extack, tb, device,
> > +						 port, stats);
> 
> And this is still here - 'gets' do not act differently depending on
> inputs..

This patch shouldn't be sent at all. Sorry for the noise.

Thanks

> 
> Jason

Powered by blists - more mailing lists