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: <AM0PR05MB48666D79F40F82A934438DF2D1F10@AM0PR05MB4866.eurprd05.prod.outlook.com>
Date:   Tue, 9 Jul 2019 17:21:38 +0000
From:   Parav Pandit <parav@...lanox.com>
To:     David Ahern <dsahern@...il.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     "stephen@...workplumber.org" <stephen@...workplumber.org>,
        Jiri Pirko <jiri@...lanox.com>,
        "dsahern@...nel.org" <dsahern@...nel.org>
Subject: RE: [PATCH net-next iproute2] devlink: Show devlink port number



> -----Original Message-----
> From: David Ahern <dsahern@...il.com>
> Sent: Tuesday, July 9, 2019 10:41 PM
> To: Parav Pandit <parav@...lanox.com>; netdev@...r.kernel.org
> Cc: stephen@...workplumber.org; Jiri Pirko <jiri@...lanox.com>;
> dsahern@...nel.org
> Subject: Re: [PATCH net-next iproute2] devlink: Show devlink port number
> 
> On 7/9/19 10:33 AM, Parav Pandit wrote:
> > @@ -2806,6 +2806,11 @@ static void pr_out_port(struct dl *dl, struct
> > nlattr **tb)
> >
> >  		pr_out_str(dl, "flavour", port_flavour_name(port_flavour));
> >  	}
> > +	if (tb[DEVLINK_ATTR_PORT_NUMBER]) {
> > +		uint32_t port_number =
> > +
> 	mnl_attr_get_u32(tb[DEVLINK_ATTR_PORT_NUMBER]);
> 
> declare and assign separately; nothing is gained when it is split across lines
> like that.
>
Ok. I was misled by an example of port_flavour which assigns and declare in same line.
Sending v1.
 
> > +		pr_out_uint(dl, "port", port_number);
> > +	}
> >  	if (tb[DEVLINK_ATTR_PORT_SPLIT_GROUP])
> >  		pr_out_uint(dl, "split_group",
> >
> mnl_attr_get_u32(tb[DEVLINK_ATTR_PORT_SPLIT_GROUP]));

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ