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] [day] [month] [year] [list]
Message-ID: <CAF2d9jhdvkxw_3cm-hXFY1wxy5WVKdnmcNOdRTak_Qx+6NS1sA@mail.gmail.com>
Date:	Thu, 2 Oct 2014 22:58:35 +0530
From:	Mahesh Bandewar <maheshb@...gle.com>
To:	David Laight <David.Laight@...lab.com>
Cc:	Jay Vosburgh <jay.vosburgh@...onical.com>,
	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

On Thu, Oct 2, 2014 at 2:42 PM, David Laight <David.Laight@...lab.com> wrote:
> 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.
>
Please show me how much performance we are loosing by taking this
approach... otherwise this argument is bogus!

>         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