Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp124210rwb; Fri, 30 Sep 2022 18:48:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM72hKESSuZoDWDQSjWodSi5OhkFs0tm8SeoZgvDbBIT1VU9s4Ewi8xclSrOgfkY+f7iA+Hr X-Received: by 2002:aa7:8497:0:b0:558:ac3b:3bf6 with SMTP id u23-20020aa78497000000b00558ac3b3bf6mr11874638pfn.29.1664588879885; Fri, 30 Sep 2022 18:47:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664588879; cv=none; d=google.com; s=arc-20160816; b=oAr4k9D0F2FNMmpoJnF/efpn26BMXlw0FYR2TjQg9EAImlB2DfqOjtrxHpF8BK8TsF O0egLLJitYePXPv54wG5SKb9pLBJ8y3TFVnDyPfQgu1OtuGZmrAaoFK7uo2JhWPp6jKC tDXKkf59TRs3Mpw8+qkTIwhFhUOY+L7Qy2P46VpJf5zMzWeDtCtCY+N/Hzvv8uC5OpB/ yQTBlWZfGt5Y3Zp2kSHSMLMI49l+3M8Zro2/QtMLB1u3P4fI4dB0bClFjPGKxiBphhHv OegGV714QU6Hs+KjQVf1JTkownQelzoJzs5EQphfKsup7tWRkV3GIebW7hfqgjOBawmk ENeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject; bh=Jw90jpHQwOc7Q90rcFg63tClBgagqo5o5UC0QUTG5Eg=; b=F6YhZa9GM+kmKYSICQnia9emWggrhK13O1H8p7ppEPJeATCO7PyJJUSBXBdl/gE1lk 7pOn66eat30J0P7ILYP/PIp0Cf3sJiUORC/njwiUsgpo+0nYyh653khA/ohiBggGOnEp ZIm690sYirvsxb/x91Ibs/K5uZgGSacipeG4RTIhCJmpe3Mja++umUNPDdj7Gqa8A+UH TAsNzi6bnRTvdM1p/fp9WX3oWKARD4HjimaRk3NNxcS/KdkL5wC7x9Mqtx/0SU0zUUcO /FAc7e1gvM8HvV1qcwSREh69O8t3CmBmXVIkwMHEea4qt+2WRZ9zojoB0KRlior6txa8 LifA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lk13-20020a17090b33cd00b001fb706e96afsi10580761pjb.182.2022.09.30.18.47.47; Fri, 30 Sep 2022 18:47:59 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232580AbiJAAs0 (ORCPT + 99 others); Fri, 30 Sep 2022 20:48:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230311AbiJAAsY (ORCPT ); Fri, 30 Sep 2022 20:48:24 -0400 Received: from mailgw.kylinos.cn (unknown [124.126.103.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3882A1A5981; Fri, 30 Sep 2022 17:48:23 -0700 (PDT) X-UUID: 6d33622a4e774053b950c78ce4b3fea5-20221001 X-CPASD-INFO: 1f54979e095a458f8d720601b7e1c642@erZvVGZpZ5VcWXetg3iDoFiVZ2JgYlC ApHGFYZFmYFKVhH5xTV5uYFV9fWtVYV9dYVR6eGxQYmBgZFJ4i3-XblBgXoZgUZB3gKhvVGllaQ== X-CLOUD-ID: 1f54979e095a458f8d720601b7e1c642 X-CPASD-SUMMARY: SIP:-1,APTIP:-2.0,KEY:0.0,FROMBLOCK:1,OB:0.0,URL:-5,TVAL:155. 0,ESV:1.0,ECOM:-5.0,ML:0.0,FD:0.0,CUTS:111.0,IP:-2.0,MAL:-5.0,PHF:-5.0,PHC:-5 .0,SPF:4.0,EDMS:-5,IPLABEL:-2.0,FROMTO:0,AD:0,FFOB:0.0,CFOB:0.0,SPC:0,SIG:-5, AUF:13,DUF:6106,ACD:96,DCD:96,SL:0,EISP:0,AG:0,CFC:0.675,CFSR:0.053,UAT:0,RAF :2,IMG:-5.0,DFA:0,DTA:0,IBL:-2.0,ADI:-5,SBL:0,REDM:0,REIP:0,ESB:0,ATTNUM:0,EA F:0,CID:-5.0,VERSION:2.3.17 X-CPASD-ID: 6d33622a4e774053b950c78ce4b3fea5-20221001 X-CPASD-BLOCK: 1000 X-CPASD-STAGE: 1 X-UUID: 6d33622a4e774053b950c78ce4b3fea5-20221001 X-User: jianghaoran@kylinos.cn Received: from [192.168.1.105] [(183.242.54.212)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 561742501; Sat, 01 Oct 2022 08:49:09 +0800 Subject: Re: [PATCH] taprio: Set the value of picos_per_byte before fill sched_entry From: jianghaoran To: Jakub Kicinski Cc: vinicius.gomes@intel.com, jhs@mojatatu.com, jiri@resnulli.us, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, vladimir.oltean@nxp.com References: <20220928065830.1544954-1-jianghaoran@kylinos.cn> <20220929191815.51362581@kernel.org> <7b707ba4-c3f2-dd17-e3f2-e4d143b76245@kylinos.cn> Message-ID: <75394e2d-7923-0991-91ad-089c9c9829ef@kylinos.cn> Date: Sat, 1 Oct 2022 08:44:56 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <7b707ba4-c3f2-dd17-e3f2-e4d143b76245@kylinos.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, NICE_REPLY_A,RDNS_DYNAMIC,SPF_HELO_NONE,T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.6 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 在 2022/10/1 上午8:42, jianghaoran 写道: > > 在 2022/9/30 上午10:18, Jakub Kicinski 写道: >> On Wed, 28 Sep 2022 14:58:30 +0800 jianghaoran wrote: >>> If the value of picos_per_byte is set after fill sched_entry, >>> as a result, the min_duration calculated by length_to_duration is 0, >>> and the validity of the input interval cannot be judged, >>> too small intervals couldn't allow any packet to be transmitted. >> >> Meaning an invalid configuration is accepted but no packets >> can ever be transmitted?  Could you make the user-visible >> issue clearer? > > Yes, It's possible that the user specifies an too small interval that > couldn't allow any packet to be transmitted.According to the following example, > the interval is set to 9, and the network port enp5s0f0 cannot send any > data > >>> It will appear like commit b5b73b26b3ca ("taprio: >>> Fix allowing too small intervals") described problem. >>> Here is a further modification of this problem. >>> >>> example: >> >> Here as well it seems worthwhile to mention what this is an example of. >> e.g. "example configuration which will not be able to transmit packets" >> >>> tc qdisc replace dev enp5s0f0 parent root handle 100 taprio \ >>>                num_tc 3 \ >>>                map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \ >>>                queues 1@0 1@1 2@2 \ >>>                base-time  1528743495910289987 \ >>>                sched-entry S 01 9 \ >>>           sched-entry S 02 9 \ >>>           sched-entry S 04 9 \ >>>                clockid CLOCK_TAI >> >> Please add a Fixes tag pointing to the first commit where the issue was >> present, and CC Vladimir Oltean on the next >> version. >> > Thank you for your suggestion. I will modify it as suggested