MCPcopy Create free account
hub / github.com/F-Stack/f-stack / create_eal_parameters

Method create_eal_parameters

dpdk/dts/framework/testbed_model/sut_node.py:289–344  ·  view source on GitHub ↗

Generate eal parameters character string; :param lcore_filter_specifier: a number of lcores/cores/sockets to use or a list of lcore ids to use. The default will select one lcore for each of two cores on one sock

(
        self,
        lcore_filter_specifier: LogicalCoreCount | LogicalCoreList = LogicalCoreCount(),
        ascending_cores: bool = True,
        prefix: str = "dpdk",
        append_prefix_timestamp: bool = True,
        no_pci: bool = False,
        vdevs: list[VirtualDevice] = None,
        other_eal_param: str = "",
    )

Source from the content-addressed store, hash-verified

287 self._dpdk_prefix_list = []
288
289 def create_eal_parameters(
290 self,
291 lcore_filter_specifier: LogicalCoreCount | LogicalCoreList = LogicalCoreCount(),
292 ascending_cores: bool = True,
293 prefix: str = "dpdk",
294 append_prefix_timestamp: bool = True,
295 no_pci: bool = False,
296 vdevs: list[VirtualDevice] = None,
297 other_eal_param: str = "",
298 ) -> "EalParameters":
299 """
300 Generate eal parameters character string;
301 :param lcore_filter_specifier: a number of lcores/cores/sockets to use
302 or a list of lcore ids to use.
303 The default will select one lcore for each of two cores
304 on one socket, in ascending order of core ids.
305 :param ascending_cores: True, use cores with the lowest numerical id first
306 and continue in ascending order. If False, start with the
307 highest id and continue in descending order. This ordering
308 affects which sockets to consider first as well.
309 :param prefix: set file prefix string, eg:
310 prefix='vf'
311 :param append_prefix_timestamp: if True, will append a timestamp to
312 DPDK file prefix.
313 :param no_pci: switch of disable PCI bus eg:
314 no_pci=True
315 :param vdevs: virtual device list, eg:
316 vdevs=[
317 VirtualDevice('net_ring0'),
318 VirtualDevice('net_ring1')
319 ]
320 :param other_eal_param: user defined DPDK eal parameters, eg:
321 other_eal_param='--single-file-segments'
322 :return: eal param string, eg:
323 '-c 0xf -a 0000:88:00.0 --file-prefix=dpdk_1112_20190809143420';
324 """
325
326 lcore_list = LogicalCoreList(self.filter_lcores(lcore_filter_specifier, ascending_cores))
327
328 if append_prefix_timestamp:
329 prefix = f"{prefix}_{self._dpdk_timestamp}"
330 prefix = self.main_session.get_dpdk_file_prefix(prefix)
331 if prefix:
332 self._dpdk_prefix_list.append(prefix)
333
334 if vdevs is None:
335 vdevs = []
336
337 return EalParameters(
338 lcore_list=lcore_list,
339 memory_channels=self.config.memory_channels,
340 prefix=prefix,
341 no_pci=no_pci,
342 vdevs=vdevs,
343 other_eal_param=other_eal_param,
344 )
345
346 def run_dpdk_app(

Calls 5

LogicalCoreCountClass · 0.85
LogicalCoreListClass · 0.85
EalParametersClass · 0.85
filter_lcoresMethod · 0.80
get_dpdk_file_prefixMethod · 0.45

Tested by 2