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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 16 Jan 2020 17:39:52 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     sunil.kovvuri@...il.com
Cc:     netdev@...r.kernel.org, davem@...emloft.net, mkubecek@...e.cz,
        Sunil Goutham <sgoutham@...vell.com>
Subject: Re: [PATCH v3 11/17] octeontx2-pf: Receive side scaling support

On Fri, 17 Jan 2020 01:17:27 +0530, sunil.kovvuri@...il.com wrote:
> +int otx2_rss_init(struct otx2_nic *pfvf)
> +{
> +	struct otx2_rss_info *rss = &pfvf->hw.rss_info;
> +	int idx, ret = 0;
> +
> +	/* Enable RSS */
> +	rss->enable = true;
> +	rss->rss_size = sizeof(rss->ind_tbl);
> +
> +	/* Init RSS key here */
> +	netdev_rss_key_fill(rss->key, sizeof(rss->key));
> +	otx2_set_rss_key(pfvf);
> +
> +	/* Default indirection table */
> +	for (idx = 0; idx < rss->rss_size; idx++)
> +		rss->ind_tbl[idx] =
> +			ethtool_rxfh_indir_default(idx, pfvf->hw.rx_queues);
> +
> +	ret = otx2_set_rss_table(pfvf);
> +	if (ret)
> +		return ret;
> +
> +	/* Default flowkey or hash config to be used for generating flow tag */
> +	rss->flowkey_cfg = NIX_FLOW_KEY_TYPE_IPV4 | NIX_FLOW_KEY_TYPE_IPV6 |
> +			   NIX_FLOW_KEY_TYPE_TCP | NIX_FLOW_KEY_TYPE_UDP |
> +			   NIX_FLOW_KEY_TYPE_SCTP;
> +
> +	return otx2_set_flowkey_cfg(pfvf);
> +}

> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> index 557f86b..fe5b3de 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> @@ -838,6 +838,11 @@ int otx2_open(struct net_device *netdev)
>  	if (err)
>  		goto err_disable_napi;
>  
> +	/* Initialize RSS */
> +	err = otx2_rss_init(pf);
> +	if (err)
> +		goto err_disable_napi;

Looks like you fully reset the RSS params on every close/open cycle? 
I don't think that's the expected behaviour/what most NICs do.
For example you should only reset the indir table if
netif_is_rxfh_configure() returns false.

Powered by blists - more mailing lists