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>] [day] [month] [year] [list]
Date:	Fri, 21 Nov 2014 14:49:29 -0800
From:	roopa@...ulusnetworks.com
To:	jiri@...nulli.us, sfeldma@...il.com, jhs@...atatu.com,
	bcrl@...ck.org, tgraf@...g.ch, john.fastabend@...il.com,
	stephen@...workplumber.org, linville@...driver.com,
	nhorman@...driver.com, nicolas.dichtel@...nd.com,
	vyasevic@...hat.com, f.fainelli@...il.com, buytenh@...tstofly.org,
	aviadr@...lanox.com
Cc:	netdev@...r.kernel.org, davem@...emloft.net,
	shrijeet@...ulusnetworks.com, gospo@...ulusnetworks.com,
	Roopa Prabhu <roopa@...ulusnetworks.com>
Subject: [RFC PATCH 3/4] swdevice: new generic op to set bridge port attr

From: Roopa Prabhu <roopa@...ulusnetworks.com>

A generic switch device op to offload any type of bridge port attribute.

(This is still TBD)
---
 include/net/switchdev.h   |    8 +++++++-
 net/switchdev/switchdev.c |   17 +++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index a9ccfa4..c97994d 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -145,7 +145,8 @@ int netdev_sw_parent_flow_insert(struct net_device *dev,
 				 const struct swdev_flow *flow);
 int netdev_sw_parent_flow_remove(struct net_device *dev,
 				 const struct swdev_flow *flow);
-
+int netdev_sw_port_set_attr(struct net_device *dev, int attrtype,
+                            void *attrval);
 #else
 
 static inline int netdev_sw_parent_id_get(struct net_device *dev,
@@ -202,6 +203,11 @@ static inline int netdev_sw_parent_flow_remove(struct net_device *dev,
 	return -EOPNOTSUPP;
 }
 
+static int netdev_sw_port_set_attr(struct net_device *dev, int attrtype,
+                                   void *attrval)
+{
+	return -EOPNOTSUPP;
+}
 #endif
 
 #endif /* _LINUX_SWITCHDEV_H_ */
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index dc8e769..48f451b 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -314,3 +314,20 @@ int netdev_sw_parent_flow_remove(struct net_device *dev,
 	return ops->ndo_sw_parent_flow_remove(dev, flow);
 }
 EXPORT_SYMBOL(netdev_sw_parent_flow_remove);
+
+/**
+ *	netdev_sw_port_set_attr - set a port attr
+ *	@dev: port device
+ *	@attrttype: netlink attribute
+ *	@attrval: attribute value
+ *
+ *	Set switch port attribute
+ */
+int netdev_sw_port_set_attr(struct net_device *dev,
+					int attrttype, void *attrval)
+{
+	/* XXX: yet to be implemented */
+
+	return 0;
+}
+EXPORT_SYMBOL(netdev_sw_port_set_attr);
-- 
1.7.10.4

--
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