- pmd_nb_cores = '--nb-cores={} '.format(
- bin(int(args['eal_coremask'], 0)).count('1')-1)\
- if args.get('eal_coremask', '') else ''
- pmd_options = '-- '\
- + pmd_fwd_mode\
- + pmd_burst\
- + pmd_txd\
- + pmd_rxd\
- + pmd_txq\
- + pmd_rxq\
- + pmd_txqflags\
- + pmd_total_num_mbufs\
- + pmd_portmask\
- + pmd_disable_hw_vlan\
- + pmd_disable_rss\
- + pmd_eth_peer_0\
- + pmd_eth_peer_1\
- + pmd_nb_cores\
- + pmd_max_pkt_len
- return pmd_options
+ pmd_nb_cores = '--nb-cores={}'.format(
+ args.get('pmd_nb_cores', ''))\
+ if args.get('pmd_nb_cores', '') else ''
+
+ return ' '.join([pmd_fwd_mode,
+ pmd_burst,
+ pmd_txd,
+ pmd_rxd,
+ pmd_txq,
+ pmd_rxq,
+ pmd_tx_offloads,
+ pmd_total_num_mbufs,
+ pmd_disable_hw_vlan,
+ pmd_eth_peer_0,
+ pmd_eth_peer_1,
+ pmd_max_pkt_len,
+ pmd_nb_cores])
+
+ @staticmethod
+ def get_testpmd_cmdline(**kwargs):
+ """Get DPDK testpmd command line arguments.
+
+ :param args: Key-value testpmd parameters.
+ :type args: dict
+ :returns: Command line string.
+ :rtype: str
+ """
+ eal_options = DpdkUtil.get_eal_options(**kwargs)
+ pmd_options = DpdkUtil.get_pmd_options(**kwargs)
+
+ return 'testpmd {0} -- {1}'.format(eal_options, pmd_options)