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:	Tue, 18 Oct 2011 10:34:30 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Yevgeny Petrilin <yevgenyp@...lanox.co.il>
Cc:	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH 6/7] mlx4_en: Adding rxhash support

Le mardi 18 octobre 2011 à 07:36 +0000, Yevgeny Petrilin a écrit :
> > >  	rss_context->flags = rss_mask;
> > > +	rss_context->hash_fn = 1;
> > > +	for (i = 0; i < 10; i++)
> > > +		rss_context->rss_key[i] = random32();
> > >
> > 
> > Thats bit of a problem : Two NICS will have different seeds, and thus provide different rxhash for a given flow. A bonding of two NICS will
> > not be able to provide a consistent rxhash.
> > 
> > drivers/net/ethernet/intel/igb/igb_main.c uses a static table to avoid this problem.
> > 
> 
> Hello Eric, thanks for your review.
> 
> I agree that in this case two ports will have different seeds.
> But even if we use static values for the key, what about bonding of 2 NICs from different vendors?
> How can we ensure we get same rxhash value for all NICs?
> 
> There are also other drivers that use random values as well, for example:
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> 

What is the gain using random values ?

Usually, we tend to have same hardware in a single machine, or we use
active-backup bonding mode, and an active slave flip can change rxhash
values with litle effect, since this happens not often.

I really prefer not random values, because it allows to have replayable
configurations : For a given tcp flow, the same rxhash value is given
and same cpu target in RPS. Its way easier to tune your machine for some
workloads.



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ