--vdev=net_tap0,iface=foo0 --vdev=net_tap1,iface=foo1, ...
-Also the speed of the interface can be changed from 10G to whatever number
-needed, but the interface does not enforce that speed, for example::
-
- --vdev=net_tap0,iface=foo0,speed=25000
-
Normally the PMD will generate a random MAC address, but when testing or with
a static configuration the developer may need a fixed MAC address style.
Using the option ``mac=fixed`` you can create a fixed known MAC address::
#define DEFAULT_TAP_NAME "dtap"
#define ETH_TAP_IFACE_ARG "iface"
-#define ETH_TAP_SPEED_ARG "speed"
#define ETH_TAP_REMOTE_ARG "remote"
#define ETH_TAP_MAC_ARG "mac"
#define ETH_TAP_MAC_FIXED "fixed"
static const char *valid_arguments[] = {
ETH_TAP_IFACE_ARG,
- ETH_TAP_SPEED_ARG,
ETH_TAP_REMOTE_ARG,
ETH_TAP_MAC_ARG,
NULL
return 0;
}
-static int
-set_interface_speed(const char *key __rte_unused,
- const char *value,
- void *extra_args)
-{
- *(int *)extra_args = (value) ? atoi(value) : ETH_SPEED_NUM_10G;
-
- return 0;
-}
-
static int
set_remote_iface(const char *key __rte_unused,
const char *value,
kvlist = rte_kvargs_parse(params, valid_arguments);
if (kvlist) {
- if (rte_kvargs_count(kvlist, ETH_TAP_SPEED_ARG) == 1) {
- ret = rte_kvargs_process(kvlist,
- ETH_TAP_SPEED_ARG,
- &set_interface_speed,
- &speed);
- if (ret == -1)
- goto leave;
- }
-
if (rte_kvargs_count(kvlist, ETH_TAP_IFACE_ARG) == 1) {
ret = rte_kvargs_process(kvlist,
ETH_TAP_IFACE_ARG,
RTE_PMD_REGISTER_ALIAS(net_tap, eth_tap);
RTE_PMD_REGISTER_PARAM_STRING(net_tap,
ETH_TAP_IFACE_ARG "=<string> "
- ETH_TAP_SPEED_ARG "=<int> "
ETH_TAP_MAC_ARG "=" ETH_TAP_MAC_FIXED " "
ETH_TAP_REMOTE_ARG "=<string>");