From: Nikolay Aleksandrov <razor@blackwall.org>
To: netdev@vger.kernel.org
Cc: roopa@cumulusnetworks.com, davem@davemloft.net,
stephen@networkplumber.org, bridge@lists.linux-foundation.org,
shm@cumulusnetworks.com,
Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Subject: [PATCH net-next 5/8] bridge: netlink: export port's topology_change_ack and config_pending
Date: Tue, 6 Oct 2015 14:11:59 +0200 [thread overview]
Message-ID: <1444133522-16907-6-git-send-email-razor@blackwall.org> (raw)
In-Reply-To: <1444133522-16907-1-git-send-email-razor@blackwall.org>
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Add IFLA_BRPORT_TOPOLOGY_CHANGE_ACK and IFLA_BRPORT_CONFIG_PENDING to
allow getting port's topology_change_ack and config_pending respectively
via netlink.
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
---
include/uapi/linux/if_link.h | 2 ++
net/bridge/br_netlink.c | 7 ++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 6857563eb27c..1d6aeb1bbe95 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -298,6 +298,8 @@ enum {
IFLA_BRPORT_DESIGNATED_COST,
IFLA_BRPORT_ID,
IFLA_BRPORT_NO,
+ IFLA_BRPORT_TOPOLOGY_CHANGE_ACK,
+ IFLA_BRPORT_CONFIG_PENDING,
__IFLA_BRPORT_MAX
};
#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index e51332792c3c..433d632ad7d0 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -133,6 +133,8 @@ static inline size_t br_port_info_size(void)
+ nla_total_size(sizeof(u16)) /* IFLA_BRPORT_DESIGNATED_COST */
+ nla_total_size(sizeof(u16)) /* IFLA_BRPORT_ID */
+ nla_total_size(sizeof(u16)) /* IFLA_BRPORT_NO */
+ + nla_total_size(sizeof(u8)) /* IFLA_BRPORT_TOPOLOGY_CHANGE_ACK */
+ + nla_total_size(sizeof(u8)) /* IFLA_BRPORT_CONFIG_PENDING */
+ 0;
}
@@ -174,7 +176,10 @@ static int br_port_fill_attrs(struct sk_buff *skb,
nla_put_u16(skb, IFLA_BRPORT_DESIGNATED_PORT, p->designated_port) ||
nla_put_u16(skb, IFLA_BRPORT_DESIGNATED_COST, p->designated_cost) ||
nla_put_u16(skb, IFLA_BRPORT_ID, p->port_id) ||
- nla_put_u16(skb, IFLA_BRPORT_NO, p->port_no))
+ nla_put_u16(skb, IFLA_BRPORT_NO, p->port_no) ||
+ nla_put_u8(skb, IFLA_BRPORT_TOPOLOGY_CHANGE_ACK,
+ p->topology_change_ack) ||
+ nla_put_u8(skb, IFLA_BRPORT_CONFIG_PENDING, p->config_pending))
return -EMSGSIZE;
return 0;
--
2.4.3
next prev parent reply other threads:[~2015-10-06 12:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 12:11 [PATCH net-next 0/8] bridge: netlink: complete port attribute support Nikolay Aleksandrov
2015-10-06 12:11 ` [PATCH net-next 1/8] bridge: netlink: export port's root id Nikolay Aleksandrov
2015-10-06 12:30 ` kbuild test robot
2015-10-06 12:43 ` Nikolay Aleksandrov
2015-10-06 12:30 ` kbuild test robot
2015-10-06 12:11 ` [PATCH net-next 2/8] bridge: netlink: export port's bridge id Nikolay Aleksandrov
2015-10-06 12:11 ` [PATCH net-next 3/8] bridge: netlink: export port's designated cost and port Nikolay Aleksandrov
2015-10-06 12:11 ` [PATCH net-next 4/8] bridge: netlink: export port's id and number Nikolay Aleksandrov
2015-10-06 12:11 ` Nikolay Aleksandrov [this message]
2015-10-06 12:12 ` [PATCH net-next 6/8] bridge: netlink: export port's timer values Nikolay Aleksandrov
2015-10-06 12:12 ` [PATCH net-next 7/8] bridge: netlink: allow to flush port's fdb Nikolay Aleksandrov
2015-10-06 12:12 ` [PATCH net-next 8/8] bridge: netlink: add support for port's multicast_router attribute Nikolay Aleksandrov
2015-10-07 11:50 ` [PATCH net-next 0/8] bridge: netlink: complete port attribute support David Miller
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=1444133522-16907-6-git-send-email-razor@blackwall.org \
--to=razor@blackwall.org \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=roopa@cumulusnetworks.com \
--cc=shm@cumulusnetworks.com \
--cc=stephen@networkplumber.org \
/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;
as well as URLs for NNTP newsgroup(s).