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: <B5657A6538887040AD3A81F1008BEC63D6F990@AVMB1.qlogic.org>
Date:	Mon, 4 May 2015 19:58:06 +0000
From:	Yuval Mintz <Yuval.Mintz@...gic.com>
To:	Gabriel Krisman Bertazi <krisman@...ux.vnet.ibm.com>,
	David Miller <davem@...emloft.net>
CC:	"LinoSanfilippo@....de" <LinoSanfilippo@....de>,
	Ariel Elior <Ariel.Elior@...gic.com>,
	netdev <netdev@...r.kernel.org>,
	"cascardo@...cardo.eti.br" <cascardo@...cardo.eti.br>,
	"brking@...ux.vnet.ibm.com" <brking@...ux.vnet.ibm.com>
Subject: RE: [PATCH v3] bnx2x: Alloc 4k fragment for each rx ring buffer
 element

A couple of not really important [ mostly style] issues -

>+       int             offset;
>+       int             frag_count;
u8 seems better, as we never really expect this to be negative.
[Could have claimed the same about the offset]

...

> +       if (!pool->page || pool->frag_count == 0) {
Why the "== 0" and not simply "!"?

 ...

> +       pool->frag_count -= 1;
Why not pool->frag_count-- ?

...

> +       /* Page was not fully fragmented.  Unmap unused space */
> +       if (pool->frag_count > 0) {
Again, why not (pool->frag_count) instead?

Regardless, I'll give it a more thorough review tomorrow.
[If those are all the "problems" we'll find with it, I don't think we'll
need to re-spin this once more; that is, unless Dave insists]

Thanks,
Yuval

--
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