[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAE4R7bBFE_X0LitnJHnNKaPah7EKU14K7ZV2QmkiMFiZ3DYTVw@mail.gmail.com>
Date: Thu, 8 Oct 2015 19:22:19 -0700
From: Scott Feldman <sfeldma@...il.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: Netdev <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Siva Mannem <siva.mannem.lnx@...il.com>,
Premkumar Jonnala <pjonnala@...adcom.com>,
"stephen@...workplumber.org" <stephen@...workplumber.org>,
Roopa Prabhu <roopa@...ulusnetworks.com>,
"andrew@...n.ch" <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Subject: Re: [PATCH net-next v2 1/4] switchdev: add bridge attributes
On Thu, Oct 8, 2015 at 1:39 AM, Jiri Pirko <jiri@...nulli.us> wrote:
> Thu, Oct 08, 2015 at 08:04:40AM CEST, sfeldma@...il.com wrote:
>>From: Scott Feldman <sfeldma@...il.com>
>>
>>Setting the stage to push bridge-level attributes down to port driver so
>>hardware can be programmed accordingly. Bridge-level attribute example is
>>ageing_time. This is a per-bridge attribute, not a per-bridge-port attr.
>>
>>Signed-off-by: Scott Feldman <sfeldma@...il.com>
>>---
>> include/net/switchdev.h | 5 +++++
>> include/uapi/linux/if_link.h | 2 +-
>> 2 files changed, 6 insertions(+), 1 deletion(-)
>>
>>diff --git a/include/net/switchdev.h b/include/net/switchdev.h
>>index 89266a3..8d92cd0 100644
>>--- a/include/net/switchdev.h
>>+++ b/include/net/switchdev.h
>>@@ -43,6 +43,7 @@ enum switchdev_attr_id {
>> SWITCHDEV_ATTR_ID_PORT_PARENT_ID,
>> SWITCHDEV_ATTR_ID_PORT_STP_STATE,
>> SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS,
>>+ SWITCHDEV_ATTR_ID_BRIDGE,
>> };
>>
>> struct switchdev_attr {
>>@@ -52,6 +53,10 @@ struct switchdev_attr {
>> struct netdev_phys_item_id ppid; /* PORT_PARENT_ID */
>> u8 stp_state; /* PORT_STP_STATE */
>> unsigned long brport_flags; /* PORT_BRIDGE_FLAGS */
>>+ struct switchdev_attr_bridge { /* BRIDGE */
>>+ enum ifla_br attr;
>
> I don't like pushing down IFLA_BR_* values throught switchdev. I think
> it might better to just intruduce:
> SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME
>
> and "u32 ageing_time" here. Something similar to stp_state. Much easier
> to read and does not give blank cheque for passing any bridge IFLA_BR_*
> down to drivers.
>
> It also aligns with bridge code nicely, I believe.
Done, v3 sent with your suggested change.
--
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