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: <20090501.091747.240476627.davem@davemloft.net>
Date:	Fri, 01 May 2009 09:17:47 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	dada1@...mosbay.com
Cc:	andrew@...dna.net, jelaas@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH] net: skb_tx_hash() improvements

From: Eric Dumazet <dada1@...mosbay.com>
Date: Fri, 01 May 2009 11:29:54 +0200

> -	} else if (skb->sk && skb->sk->sk_hash) {
> +		/*
> +		 * Try to avoid an expensive divide, for symmetric setups :
> +		 *   number of tx queues of output device ==
> +		 *   number of rx queues of incoming device
> +		 */
> +		if (hash >= dev->real_num_tx_queues)
> +			hash %= dev->real_num_tx_queues;
> +		return hash;
> +	}

Subtraction in a while() loop is almost certainly a lot
faster.
--
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