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: <063D6719AE5E284EB5DD2968C1650D6D174A2CF5@AcuExch.aculab.com>
Date:	Thu, 2 Oct 2014 09:12:14 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Mahesh Bandewar' <maheshb@...gle.com>,
	Jay Vosburgh <jay.vosburgh@...onical.com>
CC:	Veaceslav Falico <vfalico@...hat.com>,
	Andy Gospodarek <andy@...yhouse.net>,
	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>,
	Eric Dumazet <edumazet@...gle.com>,
	"Maciej Zenczykowski" <maze@...gle.com>
Subject: RE: [PATCH net-next v6 2/2] bonding: Simplify the xmit function for
 modes that use xmit_hash

From: Mahesh Bandewar
> On Wed, Oct 1, 2014 at 9:49 PM, Jay Vosburgh <jay.vosburgh@...onical.com> wrote:
> > Mahesh Bandewar <maheshb@...gle.com> wrote:
...
> >>  * Select aggregation groups, and assign each port for it's aggregetor. The
> >>  * selection logic is called in the inititalization (after all the handshkes),
> >>  * and after every lacpdu receive (if selected is off).
> >>  */
> >>-static void ad_port_selection_logic(struct port *port)
> >>+static void ad_port_selection_logic(struct port *port, bool *update_slave_arr)
> >
> >         Since this function is void, why not have it return a value
> > instead of the bool *update_slave_arr?  That would eliminate the need
> > for some call sites to pass a "dummy" to the function.  This comment
> > applies to ad_agg_selection_logic and ad_enable_collecting_distributing
> > as well.
> >
> Yes, I had similar discussion with Nik earlier and overloading the
> return value did not feel clean and future-proof and hence decided to
> take this approach.

What overload?
Returning values by reference parameters isn't really a good idea.
It kills performance and optimisations.
If you ever need a second return value then solve the problem then.

	David



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