From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04589C04AA5 for ; Thu, 25 Aug 2022 00:55:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230338AbiHYAy7 (ORCPT ); Wed, 24 Aug 2022 20:54:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231538AbiHYAy5 (ORCPT ); Wed, 24 Aug 2022 20:54:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBA486379 for ; Wed, 24 Aug 2022 17:54:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 66EA561ABA for ; Thu, 25 Aug 2022 00:54:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8835FC433C1; Thu, 25 Aug 2022 00:54:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661388894; bh=2ZK8Ox7YgBI8BHBToit9cyRcKHNJ/MgbCpq8DEt2f6k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jTzviOJVKb9007oN6I+AEQL8KnVVeJJeySq+ZIBnN9LF6bQXl2FkGJjazFhCfNJqO sxY+okvOZIYKWmeH/j7Ah3s+dtl0dZ5A9BVImVXVBylyVwr//JNhwleRTntfoMUIFy hpn19ijLQ7ctKFfcFaI7BFIOhn649u/S3C4TVGLLF6VONPszV3KsMMeKZDvfPbWV7d bS1NL4jlsxtKjT4nEdM8uic9usAKtV6KEOTPwIKQn6NjFcUpnPOBZazKcVBCU4Bocj SqUDPZ4ViwmKe8z6gm57+pQn8+zYSIJYBihp+hykY+m8F8GqpB4p/g3BwVoKgfU51U bDIzxccLZZFvQ== Date: Wed, 24 Aug 2022 17:54:53 -0700 From: Jakub Kicinski To: Petr Machata Cc: , , , , , , , Subject: Re: Basic PCP/DEI-based queue classification Message-ID: <20220824175453.0bc82031@kernel.org> In-Reply-To: <87k06xjplj.fsf@nvidia.com> References: <874jy8mo0n.fsf@nvidia.com> <87v8qklbly.fsf@nvidia.com> <87pmgpki9v.fsf@nvidia.com> <87k06xjplj.fsf@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 24 Aug 2022 21:36:54 +0200 Petr Machata wrote: > > So far only subtle changes. Now how do you see trust going in. Can you > > elaborate a little on the policy selector you mentioned? > > Sure. In my mind the policy is a array that describes the order in which > APP rules are applied. "default" is implicitly last. > > So "trust DSCP" has a policy of just [DSCP]. "Trust PCP" of [PCP]. > "Trust DSCP, then PCP" of [DSCP, PCP]. "Trust port" (i.e. just default) > is simply []. Etc. > > Individual drivers validate whether their device can implement the > policy. > > I expect most devices to really just support the DSCP and PCP parts, but > this is flexible in allowing more general configuration in devices that > allow it. > > ABI-wise it is tempting to reuse APP to assign priority to selectors in > the same way that it currently assigns priority to field values: > > # dcb app replace dev X sel-prio dscp:2 pcp:1 > > But that feels like a hack. It will probably be better to have a > dedicated object for this: > > # dcb app-policy set dev X sel-order dscp pcp > > This can be sliced in different ways that we can bikeshed to death > later. Does the above basically address your request? For an uneducated maintainer like myself, how do embedded people look at DCB? Only place I've seen it used is in RDMA clusers. I suggested to Vladimir to look at DCBNL for frame preemption because it's the only existing API we have that's vaguely relevant to HW/prio control but he ended up going with ethtool. No preference here, just trying to map it out in my head.