Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1598464pxf; Fri, 9 Apr 2021 12:27:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzCHsHlCERoltH459OM4ArdxJylPWYHFyXRB9Z4zTgsDJo+GTmv1n37PJLlX23LXLNNOs8 X-Received: by 2002:a17:903:10c:b029:e9:22d7:5491 with SMTP id y12-20020a170903010cb02900e922d75491mr14046410plc.48.1617996422057; Fri, 09 Apr 2021 12:27:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617996422; cv=none; d=google.com; s=arc-20160816; b=v5ijY4bJ9r4fc4I3LSXw1PCNEKIV2Yxn7/SAS+HlYUAM4vmOlmVyKZIblQBbNSlxjv XRAszeDEUvYmLXlwfKpe62We7ZxSEq9uizF7QZGdQZJya+3VsjJIcX42AfFXEAVcgWnZ 7tN+T45aPl2j7CtpghJc/8NJEC5LCgF6mnVoJrpyDEICJdu8eUlGkwnfWtG8WaVkUAPN +dUPlq2RI/yC7E29AANILwtu99x6GGIsGcKCWZ3MHbmdNmIVPjQm0BCpodwC2EQvvv+F h6kwwMv+Fryv9/urFZl3/QqxPVmAexyrP/vcnrH8wHyOBMDnM+H3XiOxTasz4OFqERGH xMCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=EGPeJiMXosUJijAt7RuXm+pmjxWP8fX0ZGBt8oYnlKY=; b=oAKgC6+bu5fvnOCSCuZkIiyw8Wnze4fuHGHZCjZO+2uJGUdNtZQyIvH8AorUCoIRKP vSiUg8r4YsaNlSFNJZZBQGd45A+OL7O+wxXB2pXEzrsJN0dVTpCuwRcdmEZtlulQungB ME07nA9wACJEhs3gXCYI5MkUgU9+L6XssQy30Abdp5VTyFoHC9koi9O1dfQUClCLPchh JjNZ6lmT1rtA+pJRuCJj75lBCv/x3bf/pFIxnfiE2rALHGRKkw7vbQZziqEuIBVq/KKI pP44ozmrezJdbhqtbzTD5h5BhXXxCrgzWdlBI1SvzKmKQISVYB24eOs7sai6sGwsfaD0 37MQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w1si3896021pgp.157.2021.04.09.12.26.49; Fri, 09 Apr 2021 12:27:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235064AbhDIT0W (ORCPT + 99 others); Fri, 9 Apr 2021 15:26:22 -0400 Received: from mga04.intel.com ([192.55.52.120]:15048 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234785AbhDIT0V (ORCPT ); Fri, 9 Apr 2021 15:26:21 -0400 IronPort-SDR: cejcgb3A32ZiuYOwrXx9AsVZ26qaf196zte1yuUjEcleIgFkhOoghBbw4Ifqt0C6Hbcv8hvEFy gv5oN8xbZ9Ug== X-IronPort-AV: E=McAfee;i="6000,8403,9949"; a="191678591" X-IronPort-AV: E=Sophos;i="5.82,210,1613462400"; d="scan'208";a="191678591" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2021 12:26:08 -0700 IronPort-SDR: khjZaMZqAYHRcrgzO3Z8fi8TjQibQSfqWrCWFJmjkH5N4mZ4l+CkYq5Hlu1eJZ/tqeMm5Vr5xd A/uf2uKSmgHw== X-IronPort-AV: E=Sophos;i="5.82,210,1613462400"; d="scan'208";a="422857448" Received: from samudral-mobl.amr.corp.intel.com (HELO [10.212.251.215]) ([10.212.251.215]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2021 12:26:07 -0700 Subject: Re: [RFC] net: core: devlink: add port_params_ops for devlink port parameters altering To: Jakub Kicinski , Vadym Kochan Cc: Oleksandr Mazur , netdev@vger.kernel.org, jiri@nvidia.com, davem@davemloft.net, linux-kernel@vger.kernel.org, idosch@idosch.org, Parav Pandit References: <20210409162247.4293-1-oleksandr.mazur@plvision.eu> <20210409170114.GB8110@plvision.eu> <20210409113707.4fad51dc@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: "Samudrala, Sridhar" Message-ID: <1a55a2ed-318e-176d-812b-2762d93c95a4@intel.com> Date: Fri, 9 Apr 2021 12:26:06 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <20210409113707.4fad51dc@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/9/2021 11:37 AM, Jakub Kicinski wrote: > On Fri, 9 Apr 2021 20:01:14 +0300 Vadym Kochan wrote: >> On Fri, Apr 09, 2021 at 09:51:13AM -0700, Samudrala, Sridhar wrote: >>> On 4/9/2021 9:22 AM, Oleksandr Mazur wrote: >>>> I'd like to discuss a possibility of handling devlink port parameters >>>> with devlink port pointer supplied. >>>> >>>> Current design makes it impossible to distinguish which port's parameter >>>> should get altered (set) or retrieved (get) whenever there's a single >>>> parameter registered within a few ports. >>> I also noticed this issue recently when trying to add port parameters and >>> I have a patch that handles this in a different way. The ops in devlink_param >>> struct can be updated to include port_index as an argument >> We were thinking on this direction but rather decided to have more strict >> cb signature which reflects that we are working with devlink_port only. > +1 for passing the actual pointer OK. This way we don't need to change the existing users of devlink param ops.