netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Keller, Jacob E" <jacob.e.keller@intel.com>
To: Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@resnulli.us>
Cc: "f242ed68-d31b-527d-562f-c5a35123861a@intel.com" 
	<f242ed68-d31b-527d-562f-c5a35123861a@intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"saeedm@nvidia.com" <saeedm@nvidia.com>,
	"andrew.gospodarek@broadcom.com" <andrew.gospodarek@broadcom.com>,
	"guglielmo.morandin@broadcom.com"
	<guglielmo.morandin@broadcom.com>,
	"eugenem@fb.com" <eugenem@fb.com>,
	"eranbe@mellanox.com" <eranbe@mellanox.com>
Subject: RE: [RFC net-next v2 1/3] devlink: move health state to uAPI
Date: Fri, 12 Mar 2021 19:56:34 +0000	[thread overview]
Message-ID: <209931b3a2504a328db3b91802dc618e@intel.com> (raw)
In-Reply-To: <20210311084654.4dcfdb2f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>



> -----Original Message-----
> From: Jakub Kicinski <kuba@kernel.org>
> Sent: Thursday, March 11, 2021 8:47 AM
> To: Jiri Pirko <jiri@resnulli.us>
> Cc: f242ed68-d31b-527d-562f-c5a35123861a@intel.com;
> netdev@vger.kernel.org; saeedm@nvidia.com;
> andrew.gospodarek@broadcom.com; Keller, Jacob E <jacob.e.keller@intel.com>;
> guglielmo.morandin@broadcom.com; eugenem@fb.com;
> eranbe@mellanox.com
> Subject: Re: [RFC net-next v2 1/3] devlink: move health state to uAPI
> 
> On Thu, 11 Mar 2021 08:47:34 +0100 Jiri Pirko wrote:
> > Thu, Mar 11, 2021 at 04:26:11AM CET, kuba@kernel.org wrote:
> > >Move the health states into uAPI, so applications can use them.
> > >
> > >Note that we need to change the name of the enum because
> > >user space is likely already defining the same values.
> > >E.g. iproute2 does.
> > >
> > >Use this opportunity to shorten the names.
> > >
> > >Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> > >---
> > > .../net/ethernet/broadcom/bnxt/bnxt_devlink.c  |  4 ++--
> > > .../ethernet/mellanox/mlx5/core/en/health.c    |  4 ++--
> > > include/net/devlink.h                          |  7 +------
> > > include/uapi/linux/devlink.h                   | 12 ++++++++++++
> > > net/core/devlink.c                             | 18 +++++++++---------
> > > 5 files changed, 26 insertions(+), 19 deletions(-)
> > >
> > >diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
> b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
> > >index 64381be935a8..cafc98ab4b5e 100644
> > >--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
> > >+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
> > >@@ -252,9 +252,9 @@ void bnxt_dl_health_status_update(struct bnxt *bp,
> bool healthy)
> > > 	u8 state;
> > >
> > > 	if (healthy)
> > >-		state = DEVLINK_HEALTH_REPORTER_STATE_HEALTHY;
> > >+		state = DL_HEALTH_STATE_HEALTHY;
> > > 	else
> > >-		state = DEVLINK_HEALTH_REPORTER_STATE_ERROR;
> > >+		state = DL_HEALTH_STATE_ERROR;
> >
> > I don't like the inconsistencies in the uapi (DL/DEVLINK). Can't we
> > stick with "DEVLINK" prefix for all, which is what we got so far?
> 
> Sure, but you have seen the previous discussion about the length of
> devlink names, right? I'm not the only one who thinks this is a counter
> productive rule.

I'd like  to see us shorten the names where possible. I do think we should be consistent in how we do it. I like DL_, but it would be nice if we could get "DL_HEATH_" for all health related ones, and so on, working towards shortening across the board over time?

I also didn't mind the "DLH_" that you used in another spot, though that could get us into trouble eventually once two features start with the same letter...

Thanks,
Jake

      reply	other threads:[~2021-03-12 19:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11  3:26 [RFC net-next v2 1/3] devlink: move health state to uAPI Jakub Kicinski
2021-03-11  3:26 ` [RFC net-next v2 2/3] devlink: health: add remediation type Jakub Kicinski
2021-03-11  7:48   ` Jiri Pirko
2021-03-11 14:32   ` Eran Ben Elisha
2021-03-11 16:45     ` Jakub Kicinski
2021-03-11  3:26 ` [RFC net-next v2 3/3] devlink: add more failure modes Jakub Kicinski
2021-03-11 14:23   ` Eran Ben Elisha
2021-03-11 16:49     ` Jakub Kicinski
2021-03-14 12:33       ` Eran Ben Elisha
2021-03-15 17:06         ` Jakub Kicinski
2021-03-11  7:47 ` [RFC net-next v2 1/3] devlink: move health state to uAPI Jiri Pirko
2021-03-11 16:46   ` Jakub Kicinski
2021-03-12 19:56     ` Keller, Jacob E [this message]

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=209931b3a2504a328db3b91802dc618e@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=eranbe@mellanox.com \
    --cc=eugenem@fb.com \
    --cc=f242ed68-d31b-527d-562f-c5a35123861a@intel.com \
    --cc=guglielmo.morandin@broadcom.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@nvidia.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).