+
+ @staticmethod
+ def get_l3fwd_pmd_options(**kwargs):
+ """Create PMD parameters options for l3fwd (without --).
+
+ :param kwargs: List of l3fwd parameters.
+ :type kwargs: dict
+ :returns: PMD parameters.
+ :rtype: OptionString
+ """
+ options = OptionString(prefix=u"--")
+ # Set to use software to analyze packet type.
+ options.add_if_from_dict(
+ u"parse-ptype", u"pmd_parse_ptype", kwargs, True
+ )
+ # Set the MAC address XX:XX:XX:XX:XX:XX of the peer port N.
+ options.add_equals_from_dict(
+ u"eth-dest", u"pmd_eth_dest_0", kwargs
+ )
+ options.add_equals_from_dict(
+ u"eth-dest", u"pmd_eth_dest_1", kwargs
+ )
+ # Determines which queues from which ports are mapped to which cores.
+ options.add_equals_from_dict(
+ u"config", u"pmd_config", kwargs
+ )
+ # Enables jumbo frames.
+ options.add_if_from_dict(
+ u"enable-jumbo", u"pmd_enable_jumbo", kwargs, False
+ )
+ # Set the max packet length.
+ options.add_with_value_if_from_dict(
+ u"max-pkt-len", u"9200", u"pmd_max_pkt_len", kwargs, False
+ )
+ return options
+
+ @staticmethod
+ def get_l3fwd_args(**kwargs):
+ """Get DPDK l3fwd command line arguments.
+
+ :param kwargs: Key-value l3fwd parameters.
+ :type kwargs: dict
+ :returns: Command line string.
+ :rtype: OptionString
+ """
+ options = OptionString()
+ options.extend(DpdkUtil.get_eal_options(**kwargs))
+ options.add(u"--")
+ options.extend(DpdkUtil.get_l3fwd_pmd_options(**kwargs))
+ return options