Thu, Mar 11, 2021 at 04:26:11AM CET, k...@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 <k...@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?