From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EBD0FA09EC; Wed, 19 Oct 2022 20:37:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8190642C1E; Wed, 19 Oct 2022 20:37:18 +0200 (CEST) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTP id 3E65542BFA for ; Wed, 19 Oct 2022 20:37:17 +0200 (CEST) Received: by mail-pj1-f54.google.com with SMTP id pq16so17680763pjb.2 for ; Wed, 19 Oct 2022 11:37:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=nMAbjo1QLasNIANghImmDeFAzOAG5NTNJW6XXkzshvo=; b=njvEzk5CTlEmsaniUqAJ9dOlvMX+PmgTQ7KqD4E5d3QYrwwgyvDuMCL+hccK8T7ekv GTUJIJry7X0Sj+gWRYDr2vAEd3wXGW2Kz7mpEjwhbVuJM789tCWH++ddiXI3kBaOTFSN ka9Lwyxz//aPjuRDcPO4ukiTdg72SgDSTKbYxOg90qsfVWv8sC9ZNFwfSxskFX4jD48P ssOkFs44uUBra1umLP1mi3iIssPO9AYO3xtDIteHE+YaC3NCtTClQE91lrn0SVvcyLl2 6JgTFp1zeJcwp4Q9o7gdDV5tP28Z4gfHXJMfb+CcGE7UETOaj3iqGaME1c6cS23dmYye k+jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nMAbjo1QLasNIANghImmDeFAzOAG5NTNJW6XXkzshvo=; b=1/tbPO5YnKFAfeZ+gvlgeGVas6i1yuR18mbDslNpsNjkI/NUbYtDh9OPZaYMHZ+RM3 Oe8HafPZYaVE9PeM4UYhkfPUn4vl5HI1NplM7EnQSMOVaARrl98W2I6vUlD1moYJe/jH NlstazAQgYwSfs/nAPp6i1REcbidkKBV5m+px2s1rZzyJS3evyyLlJAzJgrV9haBEu6e OuyZNF3geKk4xYXh+gJA+klfoXlBTpbdpHJbg22w0XUvrCnj8gCcL9tC5BvolvBNbogn PMYlpk/d4osMfgP/Oi05CZw92ECvlVT25LaGZc0f710Gtz0LcPaLbzwsCCEJKXx3AJf+ lCUQ== X-Gm-Message-State: ACrzQf3RtN1ut4tzgU/Qa8xrRxz5KwBT76OFg2eEZa8wejwDrKAyFmL5 Fvfuj7tuKKopaU0JUI8mFNosdQ== X-Google-Smtp-Source: AMsMyM54C0nxbvfr5YBfrVXB438eQ0hQEuWxhTCmHjV4TCnN21CDUfOTQACMrbxUS1LtjJbdM0mRUg== X-Received: by 2002:a17:90a:ab06:b0:20d:8764:b97a with SMTP id m6-20020a17090aab0600b0020d8764b97amr11523324pjq.7.1666204636464; Wed, 19 Oct 2022 11:37:16 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id v8-20020a654608000000b0044046aec036sm10103411pgq.81.2022.10.19.11.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 11:37:16 -0700 (PDT) Date: Wed, 19 Oct 2022 11:37:14 -0700 From: Stephen Hemminger To: "Dumitrescu, Cristian" Cc: "Ajmera, Megha" , "dev@dpdk.org" , "Singh, Jasvinder" , "stable@dpdk.org" Subject: Re: [PATCH 3/3] sched: support for 100G+ rates in subport/pipe config Message-ID: <20221019113714.1e949cd2@hermes.local> In-Reply-To: References: <20221005172239.254327-1-megha.ajmera@intel.com> <20221006190038.431828-1-megha.ajmera@intel.com> <20221006190038.431828-3-megha.ajmera@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, 18 Oct 2022 13:12:10 +0000 "Dumitrescu, Cristian" wrote: > > -----Original Message----- > > From: Ajmera, Megha > > Sent: Tuesday, October 18, 2022 6:40 AM > > To: Dumitrescu, Cristian ; dev@dpdk.org; > > Singh, Jasvinder > > Cc: stable@dpdk.org > > Subject: RE: [PATCH 3/3] sched: support for 100G+ rates in subport/pipe > > config > > > > > > entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 12 rate"); > > > > if (entry) > > > > - subport_profile[i].tc_rate[12] = (uint64_t)atoi(entry); > > > > + subport_profile[i].tc_rate[12] = atol(entry); > > > > } > > > > > > > > return 0; > > > > -- > > > > 2.25.1 > > > > > > Hi Megha, > > > > > > Maybe you can explain how removing this typecast can provide support for > > > 100+G rates? > > > > > > The atoi() function returns a 32-bit value, while the subport and pipe rates > > are > > > 64-bit values; this typecast can at most remove a compiler warning ... > > > > Hi Cristian, > > > > We have now changed 'atoi' to 'atol' which will return 64-bit value so it will > > take care of 100G+ port speeds. However, I noticed that 'atol' will return > > signed-64-bit so typecast may still be needed to assign it to unsigned-64-bit > > variable. Will send updated patch today. > > > > Regards, > > Megha > > You need to use 'atoll', not 'atol'. And yes, typecast is still required. The code should be using strtoull() and checking for errors.