Thread (10 messages) 10 messages, 5 authors, 2014-10-02

Re: [PATCH net-next v6 2/2] bonding: Simplify the xmit function for modes that use xmit_hash

From: Mahesh Bandewar <hidden>
Date: 2014-10-02 17:28:56

On Thu, Oct 2, 2014 at 2:42 PM, David Laight [off-list ref] wrote:
From: Mahesh Bandewar
quoted
On Wed, Oct 1, 2014 at 9:49 PM, Jay Vosburgh [off-list ref] wrote:
quoted
Mahesh Bandewar [off-list ref] wrote:
...
quoted
quoted
quoted
 * 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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help