From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 74D054DC96 for ; Tue, 1 Aug 2023 15:56:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1D61C433C7; Tue, 1 Aug 2023 15:56:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690905406; bh=DFsjXNVLkHjDFwEKintpZ37wRLSBecvpAbIibBjOS9M=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=rb4Jew786K6rs+JCpx0uQf8xEXbgQVXIabu3vxcTh3uXx7Nn4Bpx0ihY0qlE51MkJ fhUQinKjjeQkbWrj1fQ744Xky2bCYIUfRxX/sMf1z4c5JGcs9PuP8Vydf88TF0WcDJ pB9L+nuEpYomy/iuOPnNTpySwL5QG3JstA6SdfvR/edVFjfFOPno+GpwxeGNDA9tkN lNE/iZyGOOFfLA0ZJWvpuQDFNs/gC3xJsTwBPf+wMKs7cgSY18yfZhGBHWv1Eri6PU tOFDzzbbsaM+ID6CFHeJX90vjBlJODdz2MzwqN1l20SBxCsLtd9tZ3igLMsuO98xjQ cibsZocCirsyQ== Date: Tue, 1 Aug 2023 08:56:44 -0700 From: Jakub Kicinski To: Jiri Pirko Cc: netdev@vger.kernel.org, pabeni@redhat.com, davem@davemloft.net, edumazet@google.com, moshe@nvidia.com, saeedm@nvidia.com, idosch@nvidia.com, petrm@nvidia.com Subject: Re: [patch net-next v2 11/11] devlink: extend health reporter dump selector by port index Message-ID: <20230801085644.7be5b2e4@kernel.org> In-Reply-To: References: <20230720121829.566974-1-jiri@resnulli.us> <20230720121829.566974-12-jiri@resnulli.us> <20230725114803.78e1ae00@kernel.org> <20230731100632.02c02b76@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 1 Aug 2023 08:49:45 +0200 Jiri Pirko wrote: > >for_each_obj() { > > if (obj_dump_filtered(obj, dump_info)) // < run filter > > continue; // < skip object > > > > dump_one(obj) > > I don't see how this would help. For example, passing PORT_INDEX, I know > exactly what object to reach, according to this PORT_INDEX. Why to > iterate over all of them and try the filter? Does not make sense to me. > > Maybe we are each understanding this feature differently. This is about > passing keys which index the objects. It is always devlink handle, > sometimes port index and I see another example in shared buffer index. > That's about it. Basically user passes partial tuple of indexes. > Example: > devlink port show > the key is: bus_name/dev_name/port_index > user passes bus_name/dev_name, this is the selector, a partial key. > > The sophisticated filtering is not a focus of this patchset. User can do > it putting bpf filter on the netlink socket. Okay, I was trying to be helpful, I don't want to argue for a particular implementation. IMO what's posted is too ugly to be merged, please restructure it.