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 622DFA09EC for ; 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 5848542BFA; Wed, 19 Oct 2022 20:37:18 +0200 (CEST) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mails.dpdk.org (Postfix) with ESMTP id 3C4CE42BF9 for ; Wed, 19 Oct 2022 20:37:17 +0200 (CEST) Received: by mail-pj1-f47.google.com with SMTP id fw14so17659101pjb.3 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=5TRfiPg0dLNizOrKkpl1tffNPB/FM6E3EO0tKFM7EWHNfm33rV9NTPbZ1ZObh8W9VL E4JSoD/sldZvKXB3/6e9vIw/5XJgtXVkQbPmrX18haKmXWcN+Iz2uF9Tu+Tcs8UR16hs 5Gzl3yb2cYA4Iu/CQJs0CZgqAVagiib33Cb9ilDdnAhRukvsMXlAHDjdFeOf4wqYW7yc 3J7DjbrfhTv44OJvbSihUr7CsVQN3RWp7TC+VnzN5Jfo9EEhkFayn2LkqRjU/BKhINI+ k2BYkLxgzAg8Z/4FGUIpmIuNGk5jGuhvLG98CtwRBWmdxjn7TAPUFVn+2iLXa2ldKtzN sZUA== X-Gm-Message-State: ACrzQf1Ne+/NCXws3iFTTApdf+7IrH3JyIvv11FhuvpyVEu4ckY8c+A9 GUo9tDnrxwwS8oGYaJ+fOXObow== 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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.