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] [day] [month] [year] [list]
Message-Id: <20170521.132328.352349689480345479.davem@davemloft.net>
Date:   Sun, 21 May 2017 13:23:28 -0400 (EDT)
From:   David Miller <davem@...emloft.net>
To:     jakub.kicinski@...ronome.com
Cc:     netdev@...r.kernel.org, kubakici@...pl, oss-drivers@...ronome.com
Subject: Re: [PATCH net-next 05/13] nfp: introduce very minimal nfp_app

From: Jakub Kicinski <jakub.kicinski@...ronome.com>
Date: Fri, 19 May 2017 15:01:47 -0700

> Introduce a concept of an application.  For now it's just grouping
> pointers and serving as a layer of indirection.  It will help us
> weaken the dependency on nfp_net in ethtool code.  Later series
> will flesh out support for different apps in the driver.
> 
> Signed-off-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
> Reviewed-by: Simon Horman <simon.horman@...ronome.com>
 ...
> +struct nfp_cpp *nfp_app_cpp(struct nfp_app *app)
> +{
> +	return app->cpp;
> +}
> +
> +struct nfp_pf *nfp_app_pf(struct nfp_app *app)
> +{
> +	return app->pf;
> +}

Don't create real function calls just to dereference pointers
like this.

Instead, if you absolutely _must_ do stuff like this, put it into
inline functions in a header file so that there is no overhead.

But honestly I would just make the core dereference the struct members
directly in the code and do away with these helpers.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ