summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/dpdk/device/format.c2
-rw-r--r--src/plugins/dpdk/device/init.c25
2 files changed, 26 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c
index 4b8e3be5240..546f6cf56aa 100644
--- a/src/plugins/dpdk/device/format.c
+++ b/src/plugins/dpdk/device/format.c
@@ -373,7 +373,7 @@ format_dpdk_device_type (u8 * s, va_list * args)
break;
case VNET_DPDK_PMD_FAILSAFE:
- dev_type = "Failsafe Ethernet";
+ dev_type = "FailsafeEthernet";
break;
case VNET_DPDK_PMD_LIOVF_ETHER:
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 2232b89e1b3..5bdb493d086 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -503,6 +503,11 @@ dpdk_lib_init (dpdk_main_t * dm)
xd->port_type = VNET_DPDK_PORT_TYPE_ETH_VF;
break;
+ case VNET_DPDK_PMD_FAILSAFE:
+ xd->port_type = VNET_DPDK_PORT_TYPE_FAILSAFE;
+ xd->port_conf.intr_conf.lsc = 1;
+ break;
+
default:
xd->port_type = VNET_DPDK_PORT_TYPE_UNKNOWN;
}
@@ -632,6 +637,26 @@ dpdk_lib_init (dpdk_main_t * dm)
}
}
}
+
+ if (xd->pmd == VNET_DPDK_PMD_FAILSAFE)
+ {
+ /* failsafe device numerables are reported with active device only,
+ * need to query the mtu for current device setup to overwrite
+ * reported value.
+ */
+ uint16_t dev_mtu;
+ if (!rte_eth_dev_get_mtu (i, &dev_mtu))
+ {
+ mtu = dev_mtu;
+ max_rx_frame = mtu + sizeof (ethernet_header_t);
+
+ if (xd->port_conf.rxmode.hw_strip_crc)
+ {
+ max_rx_frame += 4;
+ }
+ }
+ }
+
/*Set port rxmode config */
xd->port_conf.rxmode.max_rx_pkt_len = max_rx_frame;