Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp547856lqz; Sat, 30 Mar 2024 07:56:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWhVg8dKqWd1luUTwFMk5PncHEkarh5dxDPpk7xQwnucxQM4ERxUcEfuiqQeqMtUuUM4vUODm2/VNRsFZAUyvS/xO0zEQYMW37spS7VKg== X-Google-Smtp-Source: AGHT+IGwwQ2Gmzb/tpgVxbACsvuCUPwgF5CkDd6gJNKJaLO1pntLtTn3v+NKM9QJ4Iq1Kf2W0//4 X-Received: by 2002:a0d:d654:0:b0:611:2913:382c with SMTP id y81-20020a0dd654000000b006112913382cmr5066560ywd.49.1711810562382; Sat, 30 Mar 2024 07:56:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711810562; cv=pass; d=google.com; s=arc-20160816; b=IeSS9tqRlQl/nT92ONCQzHqLr1rrHDtcxlfG+btsVfgU+NsPE5lFL8vYushF3ojRnA R3zIk2M3TjJ7dDhA4fQSJKJLAbzhJtAZJCjK2XTkUfo0sUpBN2nfAgucAQEXqnXjhiPm JsUyyWqv0XIpc8lkaJ1m5HK4vrxvtzIzR2fCK7UO7W4nJvFsW/S97llN8hZsW39twDax GzIcrC/dqF76p6/YxlkV+gSUl1fxGFxr7xbgM7JBQWQ+eKEPnGWbVg1HOeNt3zp8o/G6 yBNeINRfIlvp6PMNZtqjw9dZyOQz2UjYqZQQtE2QTXufWg92zsY83MlY7o+crPTM+xAV +EWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=i/6JfkfliaNMfwhDGWlvIXAGN6NTlYUrDkhzdTnQte4=; fh=4PW2eNv0s7xyto0WREwUls2r/JcERYk6dJIDm1q8QJM=; b=bPDKdGtc/Uk0uzBzHKveCCjEJagCEqtwrBYgTeBusFkHOz8U1F8jB1CFkxgciKNJxS elLOeY5LgTREJUh3onXb+4YQKRQt3ayfDYLTVGOsoyxYX5N1s0yjO3+H+b0s3CFEKCm3 komA52r3//JEogL+XvIqIVcGZubiwCN4T2wOCqRzPPZiFgRV/BY+Uces4tL3xoYu33y5 1sInPUPNjVq6ip69du4UJ6hH3HtfuRL1ZKH91RqQC+x22H9x5wyhOV1ZKyk9cm3wVtl7 IsKTopk5b7WklHrK9sd1lkU5lal0F5lC6DDw0Qj952rLwTVPkC5BNM9xTOJ2SNQQm+Ou D/wg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=ZjG4kDdv; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-125750-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125750-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v3-20020a05620a440300b0078bc1b44947si5704642qkp.158.2024.03.30.07.56.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Mar 2024 07:56:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125750-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=ZjG4kDdv; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-125750-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125750-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 09FC11C20DDB for ; Sat, 30 Mar 2024 14:56:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0202E383B5; Sat, 30 Mar 2024 14:55:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="ZjG4kDdv" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 4CC981C0DD5; Sat, 30 Mar 2024 14:55:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711810552; cv=none; b=kBPAq2GmPn5VEpxqE9LWkBpupDoU2I5UbhWf26TMrFoPNwwH2uvlpasFxVR8CCXDeQOALxh6gLAzC7jhC1Uq0amh9w/lqOcg4h2HIheOu8bzIkLlxoJqy34idxouaG5KLXiUCy5W2EFvpa12F6fMcch0y3I3arBy5e3d5KAROxU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711810552; c=relaxed/simple; bh=Bu98VYPJpdmrwrEz8b1VMmazgKsb+agiRZbtiMnaTQs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ghCMwNSPOR3s2BmSONAE7n6buJC66KW+qWnzV7AuoEtLT5+16GWHm886qJ+MMtLKs6NMcBNx8AtLL8/HqA1bAy7TGrAQbQlRPKa1T5Kkr9i0vAMtyANfWfIuaFSYT+du2kiDGggJjSqjfMYZu56GiPdc1YwQOPHjVJmUlBg2CeQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=ZjG4kDdv; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=i/6JfkfliaNMfwhDGWlvIXAGN6NTlYUrDkhzdTnQte4=; b=ZjG4kDdvIpKXA5GJPbn7sy969m ocfEnE7p6HBX6JZF80QePZXJGeRsYeDtNQ6eHpTkDmtfX8QkZ7B2K5AD071vJS/pZGiwyl9p47OU2 Imq1mLdmDAs4/36hiFZXMWJbUpikGpAgMdZzi15kUkF3iBb8jcWDqA/Gnz7dOA5q0GqQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rqa7S-00Bj3E-0y; Sat, 30 Mar 2024 15:55:42 +0100 Date: Sat, 30 Mar 2024 15:55:42 +0100 From: Andrew Lunn To: Naveen Mamindlapalli Cc: Oleksij Rempel , "David S. Miller" , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , Woojung Huh , Arun Ramadoss , "kernel@pengutronix.de" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "UNGLinuxDriver@microchip.com" , David Ahern , Simon Horman , Willem de Bruijn , =?iso-8859-1?Q?S=F8ren?= Andersen Subject: Re: [PATCH net-next v1 5/9] net: dsa: microchip: add support for different DCB app configurations Message-ID: <4380faf1-9911-4188-9982-a7060e143394@lunn.ch> References: <20240328160518.2396238-1-o.rempel@pengutronix.de> <20240328160518.2396238-6-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Mar 29, 2024 at 09:29:32AM +0000, Naveen Mamindlapalli wrote: > > > +int ksz_init_global_dscp_map(struct ksz_device *dev) { > > + int reg, per_reg, ret, dscp; > > + u8 data = 0; > > + u8 mask; > > + > > + /* On KSZ9xxx variants, DSCP remapping is disabled by default. > > + * Enable to have, predictable and reproducible behavior across > > + * different devices. > > + */ > > + if (!is_ksz8(dev)) { > > + ret = ksz_rmw8(dev, KSZ9477_REG_SW_MAC_TOS_CTRL, > > + KSZ9477_SW_TOS_DSCP_REMAP, > > + KSZ9477_SW_TOS_DSCP_REMAP); > > + if (ret) > > + return ret; > > + } > > + > > + ksz_get_dscp_prio_reg(dev, ®, &per_reg, &mask); > > + > > + for (dscp = 0; dscp < DSCP_MAX; dscp++) { > > + int ipv, shift; > > + > > + /* Map DSCP to Traffic Type, which is corresponding to the > > + * Internal Priority Value (IPV) in the switch. > > + */ > > + if (!is_ksz8(dev)) { > > + ipv = ietf_dscp_to_ieee8021q_tt(dscp); > > + } else { > > + ipv = > > ieee8021q_tt_to_tc(ietf_dscp_to_ieee8021q_tt(dscp), > > + dev->info->num_tx_queues); > > + } > > No need for braces for single statement. Please trim the email when replying. It is very easy to miss comments when it is 99% quoted text with a couple of one-liners mixed in. Andrew