aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchuhong yao <ych@panath.cn>2018-05-29 16:31:48 +0800
committerDamjan Marion <dmarion.lists@gmail.com>2018-05-29 15:38:00 +0000
commit17b8efc7ab111be40330515a443075a71e3be3e4 (patch)
treea0871c24163ec90d31766d80ab6bdd25324cf71a
parent1977a3488e91c6a4074a5538730418031515b299 (diff)
dpdk: Add PMD type for Cavium LiquidIO II CN23XX
1、Adding PMD type for support Cavium LiquidIO II CN23XX NIC; 2、Our company is using VPP + DPDK +Cavium LiquidIO II CN23XX NIC, Unfortunately, the latest VPP code does not support Cavium LiquidIO II CN23XX pci. So I increased the PMD type to support LiquidIO NIC, and can run normally, we most subsequent projects are based on VPP + DPDK + Cavium LiquidIO II CN23XX NIC model, so I hope VPP team can adopt this requirement, thanks a lot. Change-Id: I604ae444d69b37c2e26962bfe4ccdfe983b75041 Signed-off-by: chuhong yao <ych@panath.cn>
-rw-r--r--src/plugins/dpdk/device/dpdk.h3
-rw-r--r--src/plugins/dpdk/device/format.c4
-rw-r--r--[-rwxr-xr-x]src/plugins/dpdk/device/init.c7
3 files changed, 13 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index c60312e804b..b1610e72fa1 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -81,7 +81,8 @@ extern vlib_node_registration_t dpdk_input_node;
_ ("net_virtio_user", VIRTIO_USER) \
_ ("net_vhost", VHOST_ETHER) \
_ ("net_ena", ENA) \
- _ ("net_failsafe", FAILSAFE)
+ _ ("net_failsafe", FAILSAFE) \
+ _ ("net_liovf", LIOVF_ETHER)
typedef enum
{
diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c
index 6dd80e01ede..3750eb33fbb 100644
--- a/src/plugins/dpdk/device/format.c
+++ b/src/plugins/dpdk/device/format.c
@@ -372,6 +372,10 @@ format_dpdk_device_type (u8 * s, va_list * args)
dev_type = "Failsafe Ethernet";
break;
+ case VNET_DPDK_PMD_LIOVF_ETHER:
+ dev_type = "Cavium Lio VF";
+ break;
+
default:
case VNET_DPDK_PMD_UNKNOWN:
dev_type = "### UNKNOWN ###";
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 1f17c61ccaf..f147bcb6e11 100755..100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -476,6 +476,10 @@ dpdk_lib_init (dpdk_main_t * dm)
xd->port_type = VNET_DPDK_PORT_TYPE_VHOST_ETHER;
break;
+ case VNET_DPDK_PMD_LIOVF_ETHER:
+ xd->port_type = VNET_DPDK_PORT_TYPE_ETH_VF;
+ break;
+
default:
xd->port_type = VNET_DPDK_PORT_TYPE_UNKNOWN;
}
@@ -773,6 +777,9 @@ dpdk_bind_devices_to_uio (dpdk_config_main_t * conf)
/* Amazen Elastic Network Adapter */
else if (d->vendor_id == 0x1d0f && d->device_id >= 0xec20 && d->device_id <= 0xec21)
;
+ /* Cavium Network Adapter */
+ else if (d->vendor_id == 0x177d && d->device_id == 0x9712)
+ ;
/* Mellanox */
else if (d->vendor_id == 0x15b3 && d->device_id >= 0x1013 && d->device_id <= 0x101a)
{