From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [net-next 10/16] net/mlx5: Support PCIe buffer congestion handling via Devlink Date: Wed, 18 Jul 2018 18:49:47 -0700 Message-ID: <20180718184947.6e472ee4@cakuba.netronome.com> References: <20180719010107.22363-1-saeedm@mellanox.com> <20180719010107.22363-11-saeedm@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "David S. Miller" , netdev@vger.kernel.org, Eran Ben Elisha To: Saeed Mahameed , Jiri Pirko Return-path: Received: from mail-qt0-f195.google.com ([209.85.216.195]:35959 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730673AbeGSCab (ORCPT ); Wed, 18 Jul 2018 22:30:31 -0400 Received: by mail-qt0-f195.google.com with SMTP id t5-v6so5901105qtn.3 for ; Wed, 18 Jul 2018 18:49:52 -0700 (PDT) In-Reply-To: <20180719010107.22363-11-saeedm@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, 18 Jul 2018 18:01:01 -0700, Saeed Mahameed wrote: > +static const struct devlink_param mlx5_devlink_params[] = { > + DEVLINK_PARAM_DRIVER(MLX5_DEVLINK_PARAM_ID_CONGESTION_ACTION, > + "congestion_action", > + DEVLINK_PARAM_TYPE_U8, > + BIT(DEVLINK_PARAM_CMODE_RUNTIME), > + mlx5_devlink_get_congestion_action, > + mlx5_devlink_set_congestion_action, NULL), > + DEVLINK_PARAM_DRIVER(MLX5_DEVLINK_PARAM_ID_CONGESTION_MODE, > + "congestion_mode", > + DEVLINK_PARAM_TYPE_U8, > + BIT(DEVLINK_PARAM_CMODE_RUNTIME), > + mlx5_devlink_get_congestion_mode, > + mlx5_devlink_set_congestion_mode, NULL), > +}; The devlink params haven't been upstream even for a full cycle and already you guys are starting to use them to configure standard features like queuing. I know your HW is not capable of doing full RED offload, it's a snowflake. You tell us you're doing custom DCB configuration hacks on one side (previous argument we had) and custom devlink parameter configuration hacks on PCIe. Perhaps the idea that we're trying to use the existing Linux APIs for HW configuration only applies to forwarding behaviour.