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:   Wed, 12 Apr 2023 18:39:22 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     <edward.cree@....com>
Cc:     <linux-net-drivers@....com>, <davem@...emloft.net>,
        <pabeni@...hat.com>, <edumazet@...gle.com>,
        Edward Cree <ecree.xilinx@...il.com>, <netdev@...r.kernel.org>,
        <habetsm.xilinx@...il.com>, <sudheer.mogilappagari@...el.com>
Subject: Re: [RFC PATCH v2 net-next 2/7] net: ethtool: attach an IDR of
 custom RSS contexts to a netdevice

On Tue, 11 Apr 2023 19:26:10 +0100 edward.cree@....com wrote:
> +static void netdev_rss_contexts_free(struct net_device *dev)
> +{
> +	struct ethtool_rxfh_context *ctx;
> +	u32 context;
> +
> +	if (!dev->ethtool_ops->set_rxfh_context)
> +		return;
> +	idr_for_each_entry(&dev->ethtool->rss_ctx, ctx, context) {
> +		u32 *indir = ethtool_rxfh_context_indir(ctx);
> +		u8 *key = ethtool_rxfh_context_key(ctx);
> +
> +		idr_remove(&dev->ethtool->rss_ctx, context);
> +		dev->ethtool_ops->set_rxfh_context(dev, indir, key, ctx->hfunc,
> +						   &context, true);
> +		kfree(ctx);
> +	}
> +}

nit: maybe move the ethtool related code out to a new
net/ethtool/netdev.c ? We can probably put forward declarations 
in net/core/dev.h or a new header among sources?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ