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: <20131219.180001.2300376892730549121.davem@davemloft.net>
Date:	Thu, 19 Dec 2013 18:00:01 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	therbert@...gle.com
Cc:	haiyangz@...rosoft.com, dborkman@...hat.com,
	bhutchings@...arflare.com, netdev@...r.kernel.org,
	kys@...rosoft.com, olaf@...fle.de, jasowang@...hat.com,
	linux-kernel@...r.kernel.org,
	driverdev-devel@...uxdriverproject.org
Subject: Re: [PATCH net-next] hyperv: Add support for Virtual Receive Side
 Scaling (vRSS)

From: Tom Herbert <therbert@...gle.com>
Date: Thu, 19 Dec 2013 13:43:06 -0800

> +       u32 v, r;
> +       int off, rem;
> +
> +       off = idx / 8;
> +       rem = idx % 8;
> +
> +       v = (((unsigned int)key[off]) << 24) +
> +           (((unsigned int)key[off + 1]) << 16) +
> +           (((unsigned int)key[off + 2]) << 8) +
> +           (((unsigned int)key[off + 3]));
> +
> +       r = v << rem | (unsigned int)key[off + 4] >> (8 - rem);

Minor nit, since the type you are using is "u32", that's probably what
you should be casting to in these spots instead of "unsigned int".
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ