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: <BL2PR07MB2306F104F51FD4494FDC172E8D830@BL2PR07MB2306.namprd07.prod.outlook.com>
Date:   Mon, 5 Dec 2016 09:12:39 +0000
From:   "Mintz, Yuval" <Yuval.Mintz@...ium.com>
To:     Eric Dumazet <eric.dumazet@...il.com>,
        David Miller <davem@...emloft.net>
CC:     netdev <netdev@...r.kernel.org>
Subject: RE: [PATCH v2 net-next] bnx2x: ethtool -x full support

>  	if (config_hash) {
>  		/* RSS keys */
> -		netdev_rss_key_fill(params.rss_key, T_ETH_RSS_KEY * 4);
> +		netdev_rss_key_fill(&rss_obj->rss_key, T_ETH_RSS_KEY * 4);
>  		__set_bit(BNX2X_RSS_SET_SRCH, &params.rss_flags);
>  	}

Those are still parameters. It's preferable to copy them from params to
The rss_obj inside bnx2x_setup_rss() where they're already used to
configure the ramrod. 

> +	if (key) {
> +		if (bp->port.pmf || !CHIP_IS_E1x(bp))
> +			memcpy(key, &bp->rss_conf_obj.rss_key,

If possible, implement in bnx2x_sp.c a function similar to
bnx2x_get_get_rss_ind_table that would extract this from the rss_conf_obj
instead of directly accessing it here.

> -	memcpy(req->rss_key, params->rss_key, sizeof(params->rss_key));
> +	memcpy(req->rss_key, params->rss_obj->rss_key,
> +	       sizeof(params->rss_obj->rss_key));

Drop this; Should still be in the parameters.
But we'll need to set them in the rss_obj for the rxfh for VFs.

> -	memcpy(rss.rss_key, rss_tlv->rss_key, sizeof(rss_tlv->rss_key));
> +	memcpy(&vf->rss_conf_obj.rss_key, rss_tlv->rss_key,
> +sizeof(rss_tlv->rss_key));

Unneeded, still a parameter.

Just to explain my petty flavor preferences -
As bnx2x_sp.[ch] originates as generated code, we try limiting the places
the internal fields of structs defined in the .h are accessed outside the
.c file; Otherwise it's a headache to maintain.

Functionally - this looks fine. If preferable, I have no objections taking
this patch as-is, and I'll later re-factor to something that better suits
my needs.

Thanks,
Yuval

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ