Funny, this commit addresses a comment I had on the previous. I think it makes a lot of sense to split the EAL parameter information into a DPDK specific config that the TG doesn't have since it likely won't need it.
On Thu, Jun 13, 2024 at 4:22 PM Nicholas Pratte <npra...@iol.unh.edu> wrote: > > Rework 'lcores' and 'memory_channels' into a new 'dpdk_config' > subsection in an effort to make these attributes SUT specific; the > traffic generator, more often than not, does not need this information. > Ideally, if such information is needed, then it will be listed in the > 'traffic_generator' component in TG Node configuration. Such logic is > not introduced in this patch, but the framework can be rewritten to do > so without any implications of extreme effort. > > To make this work, use_first_core has been removed from the framework I think it makes more sense to do this in the commit where you removed it from the config as well and just completely take it out. There isn't really a need to keep it in the framework in that commit so I'd be more in favor of removing it from there entirely and then this commit won't need to since it's less relevant here. > entirely in favor of doing this within the LogicalCoreListFilter object. > Since use_first_core was only ever activated when logical core 0 was > explicitly defined, core 0 can be removed from the list of total logical > cores assuming that it was not listed within filter_specifier. > > This patch also removes 'vdevs' from 'system_under_test_node' and moves > it into 'executions.' > > Bugzilla ID: 1360 > Signed-off-by: Nicholas Pratte <npra...@iol.unh.edu> > > --- <snip> > diff --git a/dts/framework/testbed_model/cpu.py > b/dts/framework/testbed_model/cpu.py > index 9e33b2825d..0c315a0da6 100644 > --- a/dts/framework/testbed_model/cpu.py > +++ b/dts/framework/testbed_model/cpu.py > @@ -210,6 +210,8 @@ def filter(self) -> list[LogicalCore]: > Returns: > The filtered cores. > """ > + if 0 in self._lcores_to_filter: > + self._lcores_to_filter = self._lcores_to_filter[1:] > sockets_to_filter = self._filter_sockets(self._lcores_to_filter) > filtered_lcores = [] > for socket_to_filter in sockets_to_filter: > @@ -328,6 +330,9 @@ def filter(self) -> list[LogicalCore]: > Return: > The filtered logical CPU cores. > """ > + if 0 not in self._filter_specifier.lcore_list: > + self._lcores_to_filter = self._lcores_to_filter[1:] > + I don't really understand what these two conditionals are doing. if 0 is in the lcore_list, why do we need to omit the first value from the filter list? Or if it is in the cores to filter why do we need to remove the first element from that list? Also, is this attempting to omit core 0 in the list? I think where it appears in the list can be different depending on if the list is ascending or descending which is different depending on the EAL parameters function it seems. Regardless, can we add a comment on why this is needed? > if not len(self._filter_specifier.lcore_list): > return self._lcores_to_filter > <snip> > 2.44.0 >