diff mbox

[net-next,1/4] switchdev: add bridge attributes

Message ID 1443128370-27353-2-git-send-email-sfeldma@gmail.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Scott Feldman Sept. 24, 2015, 8:59 p.m. UTC
From: Scott Feldman <sfeldma@gmail.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@gmail.com>
---
 include/net/switchdev.h      |    5 +++++
 include/uapi/linux/if_link.h |    2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

Comments

Premkumar Jonnala Sept. 25, 2015, 4:32 a.m. UTC | #1
Acked-by: Premkumar Jonnala

> -----Original Message-----
> From: sfeldma@gmail.com [mailto:sfeldma@gmail.com]
> Sent: Friday, September 25, 2015 2:29 AM
> To: netdev@vger.kernel.org
> Cc: jiri@resnulli.us; siva.mannem.lnx@gmail.com; Premkumar Jonnala;
> stephen@networkplumber.org; roopa@cumulusnetworks.com;
> andrew@lunn.ch; f.fainelli@gmail.com; vivien.didelot@savoirfairelinux.com
> Subject: [PATCH net-next 1/4] switchdev: add bridge attributes
> 
> From: Scott Feldman <sfeldma@gmail.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@gmail.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 319baab..54b2faa 100644
> --- a/include/net/switchdev.h
> +++ b/include/net/switchdev.h
> @@ -28,6 +28,7 @@ enum switchdev_attr_id {
>  	SWITCHDEV_ATTR_PORT_PARENT_ID,
>  	SWITCHDEV_ATTR_PORT_STP_STATE,
>  	SWITCHDEV_ATTR_PORT_BRIDGE_FLAGS,
> +	SWITCHDEV_ATTR_BRIDGE,
>  };
> 
>  struct switchdev_attr {
> @@ -38,6 +39,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;
> +			u32 val;
> +		} bridge;
>  	} u;
>  };
> 
> diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
> index 3a5f263..8d0ef1c 100644
> --- a/include/uapi/linux/if_link.h
> +++ b/include/uapi/linux/if_link.h
> @@ -222,7 +222,7 @@ enum in6_addr_gen_mode {
> 
>  /* Bridge section */
> 
> -enum {
> +enum ifla_br {
>  	IFLA_BR_UNSPEC,
>  	IFLA_BR_FORWARD_DELAY,
>  	IFLA_BR_HELLO_TIME,
> --
> 1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Sept. 25, 2015, 5:51 a.m. UTC | #2
From: Premkumar Jonnala <pjonnala@broadcom.com>
Date: Fri, 25 Sep 2015 04:32:16 +0000

> Acked-by: Premkumar Jonnala

This is not the correct way to ACK a patch.

First of all, you should provide your full email address
after your name in the Acked-by:, as I do, like this:

"Acked-by: David S. Miller <davem@davemloft.net>"

Second of all, never "top post" on mailing lists at vger.kernel.org,
it is extremely irritating especially for those of us who participate
regularly on these list and have done so for decades.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 319baab..54b2faa 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -28,6 +28,7 @@  enum switchdev_attr_id {
 	SWITCHDEV_ATTR_PORT_PARENT_ID,
 	SWITCHDEV_ATTR_PORT_STP_STATE,
 	SWITCHDEV_ATTR_PORT_BRIDGE_FLAGS,
+	SWITCHDEV_ATTR_BRIDGE,
 };
 
 struct switchdev_attr {
@@ -38,6 +39,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;
+			u32 val;
+		} bridge;
 	} u;
 };
 
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 3a5f263..8d0ef1c 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -222,7 +222,7 @@  enum in6_addr_gen_mode {
 
 /* Bridge section */
 
-enum {
+enum ifla_br {
 	IFLA_BR_UNSPEC,
 	IFLA_BR_FORWARD_DELAY,
 	IFLA_BR_HELLO_TIME,