netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sainath.grandhi@intel.com
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, Sainath Grandhi <sainath.grandhi@intel.com>
Subject: [PATCH RFC v1 1/3] net: Adding API to parse IFLA_LINKINFO attribute
Date: Wed,  6 Sep 2017 17:34:25 -0700	[thread overview]
Message-ID: <1504744467-79590-2-git-send-email-sainath.grandhi@intel.com> (raw)
In-Reply-To: <1504744467-79590-1-git-send-email-sainath.grandhi@intel.com>

From: Sainath Grandhi <sainath.grandhi@intel.com>

Adding rtnl_nla_parse_ifla_info as an exported symbol in rtnetlink.c helps
other modules to parse IFLA_LINKINFO attribute

Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
---
 include/net/rtnetlink.h | 3 +++
 net/core/rtnetlink.c    | 8 ++++++++
 2 files changed, 11 insertions(+)

diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index 21837ca..cb15ddb 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -170,6 +170,9 @@ int rtnl_configure_link(struct net_device *dev, const struct ifinfomsg *ifm);
 int rtnl_nla_parse_ifla(struct nlattr **tb, const struct nlattr *head, int len,
 			struct netlink_ext_ack *exterr);
 
+int rtnl_nla_parse_ifla_info(struct nlattr **tb, const struct nlattr *head,
+			     int len, struct netlink_ext_ack *exterr);
+
 #define MODULE_ALIAS_RTNL_LINK(kind) MODULE_ALIAS("rtnl-link-" kind)
 
 #endif
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index a78fd61..0784b7d 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1688,6 +1688,14 @@ int rtnl_nla_parse_ifla(struct nlattr **tb, const struct nlattr *head, int len,
 }
 EXPORT_SYMBOL(rtnl_nla_parse_ifla);
 
+int rtnl_nla_parse_ifla_info(struct nlattr **tb, const struct nlattr *head,
+			     int len, struct netlink_ext_ack *exterr)
+{
+	return nla_parse(tb, IFLA_INFO_MAX, head, len, ifla_info_policy,
+			 exterr);
+}
+EXPORT_SYMBOL(rtnl_nla_parse_ifla_info);
+
 struct net *rtnl_link_get_net(struct net *src_net, struct nlattr *tb[])
 {
 	struct net *net;
-- 
2.7.4

  reply	other threads:[~2017-09-07  0:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07  0:34 [PATCH RFC v1 0/3] Support for tap user-space access with veth interfaces sainath.grandhi
2017-09-07  0:34 ` sainath.grandhi [this message]
2017-09-07  0:34 ` [PATCH RFC v1 2/3] net: Abstracting out common routines from veth for use by vethtap sainath.grandhi
2017-09-07  0:34 ` [PATCH RFC v1 3/3] vethtap: veth based tap driver sainath.grandhi
2017-09-14  4:12 ` [PATCH RFC v1 0/3] Support for tap user-space access with veth interfaces Jason Wang
2017-09-20  2:38 ` Grandhi, Sainath
2017-10-09 21:51 ` Grandhi, Sainath

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=1504744467-79590-2-git-send-email-sainath.grandhi@intel.com \
    --to=sainath.grandhi@intel.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.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).