Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1570306pxf; Fri, 9 Apr 2021 11:39:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUDh3IiiX1BVTjcNgQ1Z/E6le73ozcDJ/SboF2pcM070/DvywwkzypfhuoLdNuXHfA5CVj X-Received: by 2002:a05:6402:27d4:: with SMTP id c20mr18963928ede.271.1617993545240; Fri, 09 Apr 2021 11:39:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617993545; cv=none; d=google.com; s=arc-20160816; b=oF2iCBiLadc/t8KLZ8kcOA6Qe9MIGNIGOFdeCPhfHOotQOHxYHEYN0+JxyPr10SjIV juIfBP342OwTrg2PGO8By5MNpy28GjWl48/BReNFFB105Tb/PL/rsGYCl4wgUS7F1FSE egLUxSDwP9GNnMJqAwhvBszvXrSlbwJEUwvN0CXXILS9C4SIntcALGDlbrVZB6MhpHJo jKn+MHthFvaKpFxJZy4r5BzwZiuGjywL1ME+nYiX/hewe2Uo9lLJZaPw4wjfw1WwBWZK rvLMcIgfpnW5IFlQa0QCqqS1yOq35G1kUQwwuLUpuJDVZUcOnMGy1hFiwLtYpnIEiQ7p DC+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=4BgPDcHVWYAoR3C7HptlVPe3WR4lCTKFimCwepoqXD4=; b=XNUWka2b8eDeUwdqSgNEaoB99c5GfGrWvcSbKHvHdvo4z8HnHkO47T9yDRhlIZlTl0 PwHucvyhVDRKa3WN8RDKslDFjW86hgITua51BYpmFUNzLPapISg/0SjKRBoLTZlNGOWt 1KpZl3lJLgYnHxEIgxfEC9PjS8FxgC8Z4Dcy6zKk2mmsnIeX0I3bKVNc7WQ9UV0RjwyW SyKkE0Sz1caysRDlSn6lV6O4xF9nOCc+so04+MX8Gnov9ERliuSJ3j6FrAnyIArktKsP TgES3XeQH+UN4YZ3S8/al+WCLxmbNaWqtACEMLM25yZZOlA6kw302PdlYv1oPDf7vVTI qERQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HCQ+iCfw; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v11si2429498eje.681.2021.04.09.11.38.41; Fri, 09 Apr 2021 11:39:05 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HCQ+iCfw; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234518AbhDIShX (ORCPT + 99 others); Fri, 9 Apr 2021 14:37:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:48510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234469AbhDIShX (ORCPT ); Fri, 9 Apr 2021 14:37:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A09B861104; Fri, 9 Apr 2021 18:37:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617993429; bh=Iy3Qb7NwLtOCYIRd5re3QWLFgzfiolRSmn+5l2eQUiE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HCQ+iCfwvt/MKTGJ77VEaRMsFssdYRLng0FXgJI/uXkMCBcztBQdf1x0meBu8/qp9 ksKdRg1pdr5lq8RJlDaiz8H+ea1ONgvH8lwrbD7f8hqNGbZB2o1NKWj+KHN9a0IBKE SkryDl7+ZNH/jV+sf3cnEMJfh1X8uAewzaMghwykjNGbPNt6QdtvZ8xxQ7KxYraxrk owQ+E+kfmWHM4lvtOVWjNl0+BYV9mV+Zy7kAjgjTE1ls2J7XudJjpJYDOkU2tR1lEq oVV62blZ5SmQjIPdDUI2RU64ZaG40n8Ba7zePu73ArRSSCsPVuXo1b3j0fNpvGE6jB x+2vU7tOip4MA== Date: Fri, 9 Apr 2021 11:37:07 -0700 From: Jakub Kicinski To: Vadym Kochan Cc: "Samudrala, Sridhar" , Oleksandr Mazur , netdev@vger.kernel.org, jiri@nvidia.com, davem@davemloft.net, linux-kernel@vger.kernel.org, idosch@idosch.org, Parav Pandit Subject: Re: [RFC] net: core: devlink: add port_params_ops for devlink port parameters altering Message-ID: <20210409113707.4fad51dc@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20210409170114.GB8110@plvision.eu> References: <20210409162247.4293-1-oleksandr.mazur@plvision.eu> <20210409170114.GB8110@plvision.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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