[PATCH 3/3] sched: support for 100G+ rates in subport/pipe config
Ajmera, Megha
megha.ajmera at intel.com
Tue Oct 18 07:40:12 CEST 2022
> > 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
More information about the stable
mailing list