From: roopa@cumulusnetworks.com
To: jiri@resnulli.us, sfeldma@gmail.com, jhs@mojatatu.com,
bcrl@kvack.org, tgraf@suug.ch, john.fastabend@gmail.com,
stephen@networkplumber.org, linville@tuxdriver.com,
nhorman@tuxdriver.com, nicolas.dichtel@6wind.com,
vyasevic@redhat.com, f.fainelli@gmail.com,
buytenh@wantstofly.org, aviadr@mellanox.com
Cc: netdev@vger.kernel.org, davem@davemloft.net,
shrijeet@cumulusnetworks.com, gospo@cumulusnetworks.com,
Roopa Prabhu <roopa@cumulusnetworks.com>
Subject: [RFC PATCH 3/4] swdevice: new generic op to set bridge port attr
Date: Fri, 21 Nov 2014 14:49:29 -0800 [thread overview]
Message-ID: <1416610170-21224-4-git-send-email-roopa@cumulusnetworks.com> (raw)
From: Roopa Prabhu <roopa@cumulusnetworks.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
reply other threads:[~2014-11-21 22:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1416610170-21224-4-git-send-email-roopa@cumulusnetworks.com \
--to=roopa@cumulusnetworks.com \
--cc=aviadr@mellanox.com \
--cc=bcrl@kvack.org \
--cc=buytenh@wantstofly.org \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=gospo@cumulusnetworks.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=john.fastabend@gmail.com \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=nicolas.dichtel@6wind.com \
--cc=sfeldma@gmail.com \
--cc=shrijeet@cumulusnetworks.com \
--cc=stephen@networkplumber.org \
--cc=tgraf@suug.ch \
--cc=vyasevic@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox