[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7f230c69-dc15-ebaa-ff80-d4bde98488d3@redhat.com>
Date: Tue, 12 Apr 2022 13:04:46 -0400
From: Jonathan Toppins <jtoppins@...hat.com>
To: Jay Vosburgh <jay.vosburgh@...onical.com>
Cc: Hangbin Liu <liuhangbin@...il.com>, netdev@...r.kernel.org,
Veaceslav Falico <vfalico@...il.com>,
Andy Gospodarek <andy@...yhouse.net>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
David Ahern <dsahern@...il.com>,
Nikolay Aleksandrov <nikolay@...dia.com>,
Eric Dumazet <eric.dumazet@...il.com>,
Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next] Bonding: add per port priority support
On 4/12/22 11:55, Jay Vosburgh wrote:
>>> diff --git a/include/net/bonding.h b/include/net/bonding.h
>>> index b14f4c0b4e9e..4ff093fb2289 100644
>>> --- a/include/net/bonding.h
>>> +++ b/include/net/bonding.h
>>> @@ -176,6 +176,7 @@ struct slave {
>>> u32 speed;
>>> u16 queue_id;
>>> u8 perm_hwaddr[MAX_ADDR_LEN];
>>> + int prio;
>> Do we want a struct slave_params here instead? That would allow us to
>> define defaults in a central place and set them once instead of setting
>> each parameter.
> Presuming that you mean creating a sub-struct here and moving
> some set of members of struct slave into it, I'm not sure I see the
> benefit, as it would only exist here and not really be an independent
> object. Am I misunderstanding?
You are understanding correctly. The goal of this work is to eventually
port the majority of the per-port parameters that exist in teaming to
bonding, we have not determined the entire set that make sense. Thus
there will be more than just port priority as a userspace configurable
option. So I was attempting to ask if modeling the initial setting of
these parameters like how `bonding_defaults` is used, made sense.
file: drivers/net/bonding/bond_main.c:
void bond_setup(struct net_device *bond_dev)
{
struct bonding *bond = netdev_priv(bond_dev);
spin_lock_init(&bond->mode_lock);
bond->params = bonding_defaults;
...
We can always refactor this area when there is another option that needs
setting.
-Jon
Powered by blists - more mailing lists