Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp805578rwb; Fri, 13 Jan 2023 04:31:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXsEC9Cpxvwwk8V9+TmkIx0vpEbZNgPfDLiYtKe+kUyEEHlytMggx/sHwnbCoZwDt/EVhsOz X-Received: by 2002:a17:907:d412:b0:86b:c8a:4c18 with SMTP id vi18-20020a170907d41200b0086b0c8a4c18mr1296295ejc.66.1673613089494; Fri, 13 Jan 2023 04:31:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673613089; cv=none; d=google.com; s=arc-20160816; b=ZD9s+fnJZgfx9Qp62KjUuf5xDTxz8EbEa3ZtbkU8GyHUzXbiklhNcTBXAf/qtOeLUm O7dH9TTKcfKpKTSEA43jocL5POwrWkitRseKOt/fu36xyewSJzvtZqfIWmCFMCefCfcx ctqi4QA+SInC4v40yXvwpCJuPFsRntcUZkp+0qin1GEgxPAhXp3+mECJMcnT3O7nQh/2 ibBraAYuvFndK1sHHSt5Q3BN66henQV2CagrHUD/wPiiLLN0SMoGTykgcDzOeUxk4awx pjjsaMhwyPed/b1d5+0iCYpQVCUV8ifwC4JYijw8qeloZ59C5NtAD2COgP2DZaGQ3rTX OPpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lTyCLU2tnSwpMO6ISe/l+z0ifaohdA0x9bYd5cr8na4=; b=GV9t3DNMpVFAc9tsdAcbEAEoajMtWdZKzWG1Ig5PBb+16ecw5PEBzYXc9GZGXaVNqA 2gkqL9q/I6aao0dcpfr2VZGujoAHEbtdBbnesAEvVcn9GU+0IiV/YVngCss40n9nk3ZH z9eWf3tAcv8o+lFsPBN6n2gl8m53/rypsQ69IfrKHmQuZC/5Gx2Gs5052/Q0azAbpyN8 AWAWi8kS6s1uoSENyhqahdPjcySqNu+ZCI4ktbAUchlB6/6ojbmOhBOzIeRAzzQXoV1/ XmkH9Xs8zWIAIIe3PiTjn2ByhuB+8Bxb/cE7y2DIdTHN75seqrnsXxm4snmzJyBVTCnD 7tpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dEZj1oJn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he17-20020a1709073d9100b0078def5c29e3si24031680ejc.596.2023.01.13.04.31.16; Fri, 13 Jan 2023 04:31:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dEZj1oJn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230079AbjAMMX5 (ORCPT + 51 others); Fri, 13 Jan 2023 07:23:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241343AbjAMMXb (ORCPT ); Fri, 13 Jan 2023 07:23:31 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74F1678EBA; Fri, 13 Jan 2023 04:19:44 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id f34so32854241lfv.10; Fri, 13 Jan 2023 04:19:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=lTyCLU2tnSwpMO6ISe/l+z0ifaohdA0x9bYd5cr8na4=; b=dEZj1oJnyFv3WcL9hNTNJGZTia8Em/TAD/oYNjESsqaD738KGcaShpQH1VtT504Z1E xEf/ai65XZ/c63fD8IMzpXHaJWd15qO5piwWX1c4YsC8JM67gMtP/rdq2y6fmsKnB4K+ cl2baYKRvH0lH3nMEXOXnMzVJRMXW2jPhA11YHUI/BYYx7M3TfBcSDkWzFe2i+gL/XMZ oWHn+FK1WH269gCkqG8MRcEUP+vCB/UW22xdpBt3j23sdSfvH3rrl5dpvuy0gsjAaw0I ZNHMbrtzqJMTfg+lpODFpzlVPH4u/0MsmviDpVaFA8aPXNr+dZd8Nm5AJphT8if4VlEa 21Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=lTyCLU2tnSwpMO6ISe/l+z0ifaohdA0x9bYd5cr8na4=; b=REgdnD4I3y6thpOuxEoUBncSSybSpsn2g/+XoJshfUEwhALTRT0DmbHLANFQSFvNku UnMn6eLnssPnhW4o0pXuYCBXa94tQGbt4LjOEFWXjhITEbwqi9W5/mjNesnr10HXshoU a1bCDEoy74bxPXLhXNJs6Zo81gn+wp1RHTtMcnqGqxQ/81gr6e9/Xrmxew3F6NFW/8pA wcqcYx4pM4ZrA3ARw3vcUBQJVGXXW1VbYoSrCrz7AXvrvK206lyQyqEsKwrvbYYT82zq UySXnFtHW5da+V10g1VFYqOumxHg2E3/B9BqyrEndDZnu0IZiRqkO38h/gnulw1AhH4m mjOg== X-Gm-Message-State: AFqh2kob2zFWFTc4sNf/tg0Q8AAfKDmn/YUzv+xR7msL3Uc+NCr2AE6n YOqmabf4FzFAXrSAyTA/PwM= X-Received: by 2002:a05:6512:2a90:b0:4ac:b7bf:697a with SMTP id dt16-20020a0565122a9000b004acb7bf697amr4868907lfb.4.1673612382685; Fri, 13 Jan 2023 04:19:42 -0800 (PST) Received: from localhost ([185.244.30.32]) by smtp.gmail.com with ESMTPSA id k3-20020ac257c3000000b004a764f9d653sm3814621lfo.242.2023.01.13.04.19.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 04:19:42 -0800 (PST) Date: Fri, 13 Jan 2023 14:19:38 +0200 From: Maxim Mikityanskiy To: Hariprasad Kelam Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com, edumazet@google.com, sgoutham@marvell.com, lcherian@marvell.com, gakula@marvell.com, jerinj@marvell.com, sbhatta@marvell.com, Naveen Mamindlapalli , Tariq Toukan , Saeed Mahameed , Gal Pressman Subject: Re: [net-next PATCH 1/5] sch_htb: Allow HTB priority parameter in offload mode Message-ID: References: <20230112173120.23312-1-hkelam@marvell.com> <20230112173120.23312-2-hkelam@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230112173120.23312-2-hkelam@marvell.com> X-Spam-Status: No, score=1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SBL_CSS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 12, 2023 at 11:01:16PM +0530, Hariprasad Kelam wrote: > From: Naveen Mamindlapalli > > The current implementation of HTB offload returns the EINVAL error > for unsupported parameters like prio and quantum. This patch removes > the error returning checks for 'prio' parameter and populates its > value to tc_htb_qopt_offload structure such that driver can use the > same. > > Signed-off-by: Naveen Mamindlapalli > Signed-off-by: Hariprasad Kelam > Signed-off-by: Sunil Kovvuri Goutham > --- > include/net/pkt_cls.h | 1 + > net/sched/sch_htb.c | 7 +++---- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h > index 4cabb32a2ad9..02afb1baf39d 100644 > --- a/include/net/pkt_cls.h > +++ b/include/net/pkt_cls.h > @@ -864,6 +864,7 @@ struct tc_htb_qopt_offload { > u16 qid; > u64 rate; > u64 ceil; > + u8 prio; > }; > > #define TC_HTB_CLASSID_ROOT U32_MAX > diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c > index 2238edece1a4..f2d034cdd7bd 100644 > --- a/net/sched/sch_htb.c > +++ b/net/sched/sch_htb.c > @@ -1806,10 +1806,6 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, > NL_SET_ERR_MSG(extack, "HTB offload doesn't support the quantum parameter"); > goto failure; > } > - if (hopt->prio) { > - NL_SET_ERR_MSG(extack, "HTB offload doesn't support the prio parameter"); > - goto failure; > - } The check should go to mlx5e then. > } > > /* Keeping backward compatible with rate_table based iproute2 tc */ > @@ -1905,6 +1901,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, > TC_HTB_CLASSID_ROOT, > .rate = max_t(u64, hopt->rate.rate, rate64), > .ceil = max_t(u64, hopt->ceil.rate, ceil64), > + .prio = hopt->prio, > .extack = extack, > }; > err = htb_offload(dev, &offload_opt); > @@ -1925,6 +1922,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, > TC_H_MIN(parent->common.classid), > .rate = max_t(u64, hopt->rate.rate, rate64), > .ceil = max_t(u64, hopt->ceil.rate, ceil64), > + .prio = hopt->prio, > .extack = extack, > }; > err = htb_offload(dev, &offload_opt); > @@ -2010,6 +2008,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, > .classid = cl->common.classid, > .rate = max_t(u64, hopt->rate.rate, rate64), > .ceil = max_t(u64, hopt->ceil.rate, ceil64), > + .prio = hopt->prio, > .extack = extack, > }; > err = htb_offload(dev, &offload_opt); > -- > 2.17.1 >