patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
Cc: "Ajmera, Megha" <megha.ajmera@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Singh, Jasvinder" <jasvinder.singh@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [PATCH 3/3] sched: support for 100G+ rates in subport/pipe config
Date: Wed, 19 Oct 2022 11:37:14 -0700	[thread overview]
Message-ID: <20221019113714.1e949cd2@hermes.local> (raw)
In-Reply-To: <CH0PR11MB572406C980FD4F786385C8E3EB289@CH0PR11MB5724.namprd11.prod.outlook.com>

On Tue, 18 Oct 2022 13:12:10 +0000
"Dumitrescu, Cristian" <cristian.dumitrescu@intel.com> wrote:

> > -----Original Message-----
> > From: Ajmera, Megha <megha.ajmera@intel.com>
> > Sent: Tuesday, October 18, 2022 6:40 AM
> > To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; dev@dpdk.org;
> > Singh, Jasvinder <jasvinder.singh@intel.com>
> > 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.

  reply	other threads:[~2022-10-19 18:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-05 17:22 [PATCH v2] sched: Fix subport profile id not set correctly Megha Ajmera
2022-10-05 19:19 ` Dumitrescu, Cristian
2022-10-11  4:59   ` Ajmera, Megha
2022-10-06 19:00 ` [PATCH 1/3] sched: fix " Megha Ajmera
2022-10-06 19:00   ` [PATCH 2/3] sched: removed unused subport field in hqos profile Megha Ajmera
2022-10-11 14:26     ` Dumitrescu, Cristian
2022-10-06 19:00   ` [PATCH 3/3] sched: support for 100G+ rates in subport/pipe config Megha Ajmera
2022-10-11 13:09     ` Dumitrescu, Cristian
2022-10-18  5:40       ` Ajmera, Megha
2022-10-18 13:12         ` Dumitrescu, Cristian
2022-10-19 18:37           ` Stephen Hemminger [this message]
2022-10-20  9:47             ` [PATCH v4 1/3] sched: fix subport profile ID Megha Ajmera
2022-10-20  9:47               ` [PATCH v4 2/3] sched: fix number of subport profiles Megha Ajmera
2022-10-20  9:47               ` [PATCH v4 3/3] sched: support for 100G+ rates in subport/pipe config Megha Ajmera
2022-10-24 18:57                 ` Dumitrescu, Cristian
2022-10-20  9:55             ` [PATCH " Ajmera, Megha
2022-10-11 14:22   ` [PATCH 1/3] sched: fix subport profile id not set correctly Dumitrescu, Cristian
2022-10-28  8:09   ` [PATCH v5 1/3] sched: fix subport profile ID Megha Ajmera
2022-10-28  8:09     ` [PATCH v5 2/3] sched: fix number of subport profiles Megha Ajmera
2022-10-28  8:09     ` [PATCH v5 3/3] sched: support for 100G+ rates in subport/pipe config Megha Ajmera
2022-10-28  9:55   ` [PATCH v6 1/3] sched: fix subport profile ID Megha Ajmera
2022-10-28  9:55     ` [PATCH v6 2/3] sched: fix number of subport profiles Megha Ajmera
2022-10-28 14:02       ` David Marchand
2022-10-28  9:55     ` [PATCH v6 3/3] sched: support for 100G+ rates in subport/pipe config Megha Ajmera
2022-10-28 10:57       ` Dumitrescu, Cristian
2022-10-28 14:04         ` David Marchand
2022-10-28 14:01     ` [PATCH v6 1/3] sched: fix subport profile ID David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221019113714.1e949cd2@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=jasvinder.singh@intel.com \
    --cc=megha.ajmera@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).