Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp344637rdb; Fri, 6 Oct 2023 05:28:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/jExDypQiDf2LYWPmdh8NHE9DcZazlo1q7sFEtCvfSzRTum0fNHrIxONbkp96F1lr0/7Z X-Received: by 2002:a17:902:eb44:b0:1c3:ed30:cdf4 with SMTP id i4-20020a170902eb4400b001c3ed30cdf4mr7651427pli.4.1696595309615; Fri, 06 Oct 2023 05:28:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696595309; cv=none; d=google.com; s=arc-20160816; b=NCPbQYZE1ETL81Zu7XM3O1LF4rknnjHaa/QNktWziObQabYpkG1O1E565crWkEAhud gACOBM9N1egFp27BleV6tAjFvHZa1rXepv5s3+mA06tTPI78Ddz+rPtG7UCROlBUKnXx X4jheroEW3QuLXWXD747VINfEaWrjYFJXhyk62Ge9kcLNtkgoEufJ16x+l6Edt0zn3Fi sNMo03oJYi7pZ4xR8yyjKtGz7eUWS5nnL+pI6fA9x1rRn6LihUOd6Vr95ujWxq/I7lnZ wcZevaOMK5dWuq6/kEAnoYnrSEWOlF34f7IOdRwi0GA0Z4Fht2qMT2gx3YUoIvxxkeAe 8TGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=b9rkx/aS3+iPrsCk/a4W7ZkQMnjwANgKt9vMwAyiEFc=; fh=agK8+J15YMIayIzevyirhmHDwNpizSRmeSJVb7izqXA=; b=0a70gGwGVk3RfHe3Yba8K5iZ5wLPHkqaOrIwpyLMEHdwC9PQGZ+fpy0oNDYLslMP3g jB0pdPJ+BQsXRivqPzqhnOuJQ4IFxkLOM/yjdszJXAEtHfDAobYHv7kvrJ9gu5Wvb0EA 6MCV6AW+AZBSZJNDuf2mv/+7cWruAIJ+Gz3KP+8X1AfvLe+PXJfgs3thckAPw7f+MU7l G44oS9AnkqPhfpY3jZeVlKJs48G6Xh0DUyw3A/OlZXz1a43ZMrcW7mYyw62u8jOrjvCy oGN1D4PWD54f+86gCG24SX50EupVkY3A0Sd1pzdA9F3oFaew5dfOol5NKdRF2iLJyso4 1cOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WPDPrQ9+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id kl14-20020a170903074e00b001c60ec1e654si3595148plb.416.2023.10.06.05.28.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 05:28:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WPDPrQ9+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 8AA3E816EBCC; Fri, 6 Oct 2023 05:28:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231948AbjJFM2T (ORCPT + 99 others); Fri, 6 Oct 2023 08:28:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231262AbjJFM2S (ORCPT ); Fri, 6 Oct 2023 08:28:18 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78C96CA for ; Fri, 6 Oct 2023 05:28:17 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 312EDC433C7; Fri, 6 Oct 2023 12:28:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696595297; bh=3SAB/z4JQ4yxIUvay/XIvVc0hYSL/L+0t04LAbPkpLk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=WPDPrQ9+pRgzQfUM0f3fFkybB7R/kGWvExeuUXVpngubEpgHTnWMQb4rVb9tP+ycF oItjTvm8E6AsrpKfvQVvlFwQDKjqczh/KzYSw5jlwd11vR+E8m8YBKb9ibvgkFcck7 lQteEFVfKoH+wpZXut06j4jpEPYHSeaFGahTYyqeqFpDgCIwzK1hjaRTJsna4HJCyn m6f6zvVO8XVwLn+KJ8uoSAykfCgSy+Bocz6WGQbGmln35r9fG0dU20R5OgWthwMxRy /90WvZrhMPr+QXc0Qn+xycU0S+4jgplvxN45zloqlpqBbMcHKrAu3FZ+6yddfSaSY0 Xflvv0YmEq7pQ== Message-ID: Date: Fri, 6 Oct 2023 15:28:11 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 net-next 2/4] net: ethernet: ti: am65-cpsw: add mqprio qdisc offload in channel mode Content-Language: en-US To: Simon Horman Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, vladimir.oltean@nxp.com, s-vadapalli@ti.com, srk@ti.com, vigneshr@ti.com, p-varis@ti.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230927072741.21221-1-rogerq@kernel.org> <20230927072741.21221-3-rogerq@kernel.org> <20231001065554.GH92317@kernel.org> From: Roger Quadros In-Reply-To: <20231001065554.GH92317@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 06 Oct 2023 05:28:25 -0700 (PDT) X-Spam-Level: ** On 01/10/2023 09:55, Simon Horman wrote: > On Wed, Sep 27, 2023 at 10:27:39AM +0300, Roger Quadros wrote: > > ... > >> +static int am65_cpsw_setup_mqprio(struct net_device *ndev, void *type_data) >> +{ >> + struct am65_cpsw_port *port = am65_ndev_to_port(ndev); >> + struct am65_cpsw_mqprio *p_mqprio = &port->qos.mqprio; >> + struct tc_mqprio_qopt_offload *mqprio = type_data; >> + struct am65_cpsw_common *common = port->common; >> + struct tc_mqprio_qopt *qopt = &mqprio->qopt; >> + int tc, offset, count, ret, prio; >> + u8 num_tc = qopt->num_tc; >> + u32 tx_prio_map = 0; >> + int i; >> + >> + memcpy(&p_mqprio->mqprio_hw, mqprio, sizeof(*mqprio)); >> + >> + ret = pm_runtime_get_sync(common->dev); >> + if (ret < 0) { >> + pm_runtime_put_noidle(common->dev); >> + return ret; >> + } >> + >> + if (!num_tc) { >> + am65_cpsw_reset_tc_mqprio(ndev); >> + goto exit_put;am65_cpsw_iet_commit_preemptible_tcs >> + } >> + >> + ret = am65_cpsw_mqprio_verify_shaper(port, mqprio); >> + if (ret) >> + goto exit_put; >> + >> + netdev_set_num_tc(ndev, num_tc); >> + >> + /* Multiple Linux priorities can map to a Traffic Class >> + * A Traffic Class can have multiple contiguous Queues, >> + * Queues get mapped to Channels (thread_id), >> + * if not VLAN tagged, thread_id is used as packet_priority >> + * if VLAN tagged. VLAN priority is used as packet_priorit > > Hi, > > I don't think it is worth respinning just because of this, but > there seems to be a 'y' missing from the end of the line above. Now that there will be a re-spin. I'll fix this. Thanks! > >> + * packet_priority gets mapped to header_priority in p0_rx_pri_map, >> + * header_priority gets mapped to switch_priority in pn_tx_pri_map. >> + * As p0_rx_pri_map is left at defaults (0x76543210), we can >> + * assume that Queue_n gets mapped to header_priority_n. We can then >> + * set the switch priority in pn_tx_pri_map. >> + */ > > ... -- cheers, -roger