lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 12 Mar 2021 19:56:34 +0000
From:   "Keller, Jacob E" <jacob.e.keller@...el.com>
To:     Jakub Kicinski <kuba@...nel.org>, Jiri Pirko <jiri@...nulli.us>
CC:     "f242ed68-d31b-527d-562f-c5a35123861a@...el.com" 
        <f242ed68-d31b-527d-562f-c5a35123861a@...el.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "saeedm@...dia.com" <saeedm@...dia.com>,
        "andrew.gospodarek@...adcom.com" <andrew.gospodarek@...adcom.com>,
        "guglielmo.morandin@...adcom.com" <guglielmo.morandin@...adcom.com>,
        "eugenem@...com" <eugenem@...com>,
        "eranbe@...lanox.com" <eranbe@...lanox.com>
Subject: RE: [RFC net-next v2 1/3] devlink: move health state to uAPI



> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Thursday, March 11, 2021 8:47 AM
> To: Jiri Pirko <jiri@...nulli.us>
> Cc: f242ed68-d31b-527d-562f-c5a35123861a@...el.com;
> netdev@...r.kernel.org; saeedm@...dia.com;
> andrew.gospodarek@...adcom.com; Keller, Jacob E <jacob.e.keller@...el.com>;
> guglielmo.morandin@...adcom.com; eugenem@...com;
> eranbe@...lanox.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@...nel.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@...nel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ