netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Cc: mkubecek@suse.cz, David Miller <davem@davemloft.net>,
	"michael.chan@broadcom.com" <michael.chan@broadcom.com>,
	Jiri Pirko <jiri@mellanox.com>,
	jakub.kicinski@netronome.com, Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v2 RFC 7/8] devlink: Add a generic port parameter
Date: Thu, 13 Dec 2018 13:56:04 +0100	[thread overview]
Message-ID: <20181213125604.GB2177@nanopsycho> (raw)
In-Reply-To: <CAACQVJoJMWA1eYU5EQEtucUmLEv=yP=787ccKsNcdryfvYoLYg@mail.gmail.com>

Wed, Dec 12, 2018 at 01:30:23PM CET, vasundhara-v.volam@broadcom.com wrote:
>On Wed, Dec 12, 2018 at 2:45 PM Michal Kubecek <mkubecek@suse.cz> wrote:
>>
>> On Tue, Dec 11, 2018 at 02:16:47PM +0530, Vasundhara Volam wrote:
>> > wake-on-lan - Enables Wake on Lan for this port. If enabled,
>> > the controller asserts a wake pin based on the wake-on-lan type.
>> >
>> > Cc: Jiri Pirko <jiri@mellanox.com>
>> > Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
>> > ---
>> >  include/net/devlink.h | 16 ++++++++++++++++
>> >  net/core/devlink.c    |  5 +++++
>> >  2 files changed, 21 insertions(+)
>> >
>> > diff --git a/include/net/devlink.h b/include/net/devlink.h
>> > index db413d3..93a1030 100644
>> > --- a/include/net/devlink.h
>> > +++ b/include/net/devlink.h
>> > @@ -367,12 +367,25 @@ enum devlink_param_generic_id {
>> >       DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MAX,
>> >       DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MIN,
>> >       DEVLINK_PARAM_GENERIC_ID_FW_LOAD_POLICY,
>> > +     DEVLINK_PARAM_GENERIC_ID_WOL,
>> >
>> >       /* add new param generic ids above here*/
>> >       __DEVLINK_PARAM_GENERIC_ID_MAX,
>> >       DEVLINK_PARAM_GENERIC_ID_MAX = __DEVLINK_PARAM_GENERIC_ID_MAX - 1,
>> >  };
>> >
>> > +enum devlink_param_wol_types {
>> > +     DEVLINK_PARAM_WOL_DISABLE = 0,
>> > +     DEVLINK_PARAM_WOL_MAGIC_PKT,
>> > +     DEVLINK_PARAM_WOL_PHY,
>> > +     DEVLINK_PARAM_WOL_UNICAST,
>> > +     DEVLINK_PARAM_WOL_MULTICAST,
>> > +     DEVLINK_PARAM_WOL_BROADCAST,
>> > +     DEVLINK_PARAM_WOL_ARP,
>> > +     DEVLINK_PARAM_WOL_SECURE,
>> > +     DEVLINK_PARAM_WOL_FILTERS,
>> > +};
>> > +
>> >  #define DEVLINK_PARAM_GENERIC_INT_ERR_RESET_NAME "internal_error_reset"
>> >  #define DEVLINK_PARAM_GENERIC_INT_ERR_RESET_TYPE DEVLINK_PARAM_TYPE_BOOL
>> >
>> > @@ -397,6 +410,9 @@ enum devlink_param_generic_id {
>> >  #define DEVLINK_PARAM_GENERIC_FW_LOAD_POLICY_NAME "fw_load_policy"
>> >  #define DEVLINK_PARAM_GENERIC_FW_LOAD_POLICY_TYPE DEVLINK_PARAM_TYPE_U8
>> >
>> > +#define DEVLINK_PARAM_GENERIC_WOL_NAME "wake-on-lan"
>>
>> Nitpick: the other two parameter names use underscores, it would be more
>> consistent to use them as well.
>Sure, I will fix this in next version. Thanks.
>>
>> > +#define DEVLINK_PARAM_GENERIC_WOL_TYPE DEVLINK_PARAM_TYPE_U8
>>
>> Can you be sure it will be always sufficient to enable only one WoL type
>> unlike in ethtool where bitfield is used so that you can enable multiple
>> types?
>Since this is a persistent setting, NIC may not support multiple types
>of WOL upon power on.
>If there is any requirement in future to add multiple types, data type
>can be modified,

It can't. It will become a UAPI. You need to prepare now.


>as other WOL types are also not added now.
>>
>> Michal Kubecek

  reply	other threads:[~2018-12-13 13:03 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11  8:46 [PATCH net-next v2 RFC 0/8] devlink: Add configuration parameters support for devlink_port Vasundhara Volam
2018-12-11  8:46 ` [PATCH net-next v2 RFC 1/8] devlink: Add devlink_param for port register and unregister Vasundhara Volam
2018-12-11  9:02   ` Jiri Pirko
2018-12-11 10:00     ` Vasundhara Volam
2018-12-12 13:43     ` Vasundhara Volam
2018-12-13 12:54       ` Jiri Pirko
2018-12-14  4:52         ` Vasundhara Volam
2018-12-11  8:46 ` [PATCH net-next v2 RFC 2/8] devlink: Add port param get command Vasundhara Volam
2018-12-11  8:46 ` [PATCH net-next v2 RFC 3/8] devlink: Add port param set command Vasundhara Volam
2018-12-11  8:46 ` [PATCH net-next v2 RFC 4/8] devlink: Add support for driverinit get value for devlink_port Vasundhara Volam
2018-12-11  8:46 ` [PATCH net-next v2 RFC 5/8] devlink: Add support for driverinit set " Vasundhara Volam
2018-12-11  8:46 ` [PATCH net-next v2 RFC 6/8] devlink: Add devlink notifications support for port params Vasundhara Volam
2018-12-11  8:46 ` [PATCH net-next v2 RFC 7/8] devlink: Add a generic port parameter Vasundhara Volam
2018-12-11 10:20   ` Jiri Pirko
2018-12-11 10:34     ` Vasundhara Volam
2018-12-11 18:18   ` Jakub Kicinski
2018-12-12  7:35     ` Michael Chan
2018-12-12 19:01       ` Jakub Kicinski
2018-12-12  9:15   ` Michal Kubecek
2018-12-12 12:30     ` Vasundhara Volam
2018-12-13 12:56       ` Jiri Pirko [this message]
2018-12-14  4:50         ` Vasundhara Volam
2018-12-11  8:46 ` [PATCH net-next v2 RFC 8/8] bnxt_en: Add bnxt_en initial port params table and register it Vasundhara Volam
2018-12-11 10:23   ` Jiri Pirko
2018-12-11 10:36     ` Vasundhara Volam

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=20181213125604.GB2177@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=jiri@mellanox.com \
    --cc=michael.chan@broadcom.com \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=vasundhara-v.volam@broadcom.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).