netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Govindarajulu Varadarajan <_govind@gmx.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, ssujith@cisco.com,
	benve@cisco.com
Subject: Re: [PATCH net-next v2 1/2] if_link: add client name to port profile
Date: Sat, 4 Oct 2014 20:05:23 -0700	[thread overview]
Message-ID: <20141004200523.4fc102e3@urahara> (raw)
In-Reply-To: <1412289683-8278-2-git-send-email-_govind@gmx.com>

On Fri,  3 Oct 2014 04:11:22 +0530
Govindarajulu Varadarajan <_govind@gmx.com> wrote:

> This patch adds client name to port profile.
> 
> This is used by netlink client to send the client name in port profile.
> 
> Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
> ---
>  include/uapi/linux/if_link.h | 1 +
>  net/core/rtnetlink.c         | 2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
> index 0bdb77e..6ae0b0b 100644
> --- a/include/uapi/linux/if_link.h
> +++ b/include/uapi/linux/if_link.h
> @@ -512,6 +512,7 @@ enum {
>  	IFLA_PORT_HOST_UUID,		/* binary UUID */
>  	IFLA_PORT_REQUEST,		/* __u8 */
>  	IFLA_PORT_RESPONSE,		/* __u16, output only */
> +	IFLA_PORT_VMNAME,		/* vm-name used by port profile */
>  	__IFLA_PORT_MAX,
>  };
>  
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index a688268..116d647 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -1238,6 +1238,8 @@ static const struct nla_policy ifla_port_policy[IFLA_PORT_MAX+1] = {
>  				    .len = PORT_UUID_MAX },
>  	[IFLA_PORT_REQUEST]	= { .type = NLA_U8, },
>  	[IFLA_PORT_RESPONSE]	= { .type = NLA_U16, },
> +	[IFLA_PORT_VMNAME]	= { .type = NLA_STRING,
> +				    .len = PORT_PROFILE_MAX },
>  };
>  
>  static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)

Maybe you could use the existing IFLA_IFALIAS?
It is already supported by iproute tools and sysfs, and can be used by net-snmp as well.
You would just be setting the default string, users could change it.

  parent reply	other threads:[~2014-10-05  3:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-02 22:41 [PATCH net-next v2 0/2] enic: add support to send port-profile's client name to firmware Govindarajulu Varadarajan
2014-10-02 22:41 ` [PATCH net-next v2 1/2] if_link: add client name to port profile Govindarajulu Varadarajan
2014-10-05  0:43   ` David Miller
2014-10-05  3:05   ` Stephen Hemminger [this message]
2014-10-05 18:44     ` Govindarajulu Varadarajan
2014-10-02 22:41 ` [PATCH net-next v2 2/2] enic: add vmname port-profile handler Govindarajulu Varadarajan

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=20141004200523.4fc102e3@urahara \
    --to=stephen@networkplumber.org \
    --cc=_govind@gmx.com \
    --cc=benve@cisco.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=ssujith@cisco.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;
as well as URLs for NNTP newsgroup(s).