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:   Fri, 15 Feb 2019 07:51:12 -0800
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Jiri Pirko <jiri@...nulli.us>
Cc:     Michal Kubecek <mkubecek@...e.cz>, netdev@...r.kernel.org,
        davem@...emloft.net, oss-drivers@...ronome.com, andrew@...n.ch
Subject: Re: [PATCH net-next 2/3] ethtool: add compat for flash update

On Fri, 15 Feb 2019 11:17:13 +0100, Jiri Pirko wrote:
> >>  static int __init devlink_module_init(void)
> >>  {
> >>  	return genl_register_family(&devlink_nl_family);  
> >
> >We already have similar lookup in devlink_compat_running_version() (the
> >only difference seems to be that we keep holding devlink_mutex until the
> >end there) and it's likely the net_device -> devlink lookup will be
> >needed in more places in the future. How about having a helper for it?

That's the last one that's on my radar, info and flashing are the big
per-ASIC items.  If we need more hopefully we can put the compat in the
shiny new ethnl user space :)

> >I also wonder how does the lookup scale. But I don't have clear idea
> >how long the lists can become in real life and the ethtool operations
> >are not really time critical.  
> 
> Another thing is, that you don't really have to do the lookup. If you
> have struct net_device *dev inside the driver, you can get the devlink
> instance according to that. So it is just a matter of another ndo I
> guess.

Sounds like more repetitive per driver code to get to information the
core already has.  We can do a rhashtable if it really ever becomes an
issue (which is unlikely, how many ports are you going to have on a
box.. and this is not a dump - one call one lookup).

Powered by blists - more mailing lists