diff options
author | 2018-10-30 07:40:15 +0000 | |
---|---|---|
committer | 2018-10-30 07:40:15 +0000 | |
commit | dbc4c0c8284eddb91e5294ba00e0b43c8faab930 (patch) | |
tree | 615beff297ee2e0681169fb5929017d35be7fc5a /src/framework | |
parent | 3dd2a5fdd89db1d532229d2ec29078e8e4b23689 (diff) | |
parent | 4ed7096d4a4aff47a812a79252edd0834277ee30 (diff) |
Merge "Feat: support vhost-user in lwip stack"
Diffstat (limited to 'src/framework')
-rw-r--r-- | src/framework/hal/hal.c | 4 | ||||
-rw-r--r-- | src/framework/hal/hal.h | 3 | ||||
-rw-r--r-- | src/framework/include/hal_api.h | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/framework/hal/hal.c b/src/framework/hal/hal.c index 545c759..49b1fb7 100644 --- a/src/framework/hal/hal.c +++ b/src/framework/hal/hal.c @@ -312,7 +312,7 @@ hal_get_invalid_hdl () Called By : *****************************************************************************/ hal_hdl_t -hal_create (const char *name, hal_netif_config_t * conf) +hal_create (const char *name, const char *nic_type, hal_netif_config_t * conf) { int ret = -1; uint32_t netif_type; @@ -336,7 +336,7 @@ hal_create (const char *name, hal_netif_config_t * conf) /*open */ for (netif_type = 0; NULL != netif_ops_table[netif_type]; ++netif_type) { - ret = netif_ops_table[netif_type]->open (inst, name); + ret = netif_ops_table[netif_type]->open (inst, name, nic_type); if (0 == ret) { diff --git a/src/framework/hal/hal.h b/src/framework/hal/hal.h index 36ad79d..5a8f51e 100644 --- a/src/framework/hal/hal.h +++ b/src/framework/hal/hal.h @@ -66,6 +66,7 @@ typedef struct dpdk_if char pci_addr[HAL_MAX_PCI_ADDR_LEN]; char nic_name[HAL_MAX_NIC_NAME_LEN]; + char nic_type[HAL_MAX_NIC_NAME_LEN]; char driver_name[HAL_MAX_DRIVER_NAME_LEN]; } dpdk_if_t; @@ -93,7 +94,7 @@ typedef struct netif_ops const char *name; int (*init_global) (int argc, char **argv); int (*init_local) (void); - int (*open) (netif_inst_t * inst, const char *name); + int (*open) (netif_inst_t * inst, const char *name, const char *type); int (*close) (netif_inst_t * inst); int (*start) (netif_inst_t * inst); int (*stop) (netif_inst_t * inst); diff --git a/src/framework/include/hal_api.h b/src/framework/include/hal_api.h index 90c3100..a5d7725 100644 --- a/src/framework/include/hal_api.h +++ b/src/framework/include/hal_api.h @@ -110,7 +110,8 @@ typedef struct hal_netif_config int hal_init_global (int argc, char **argv); int hal_init_local (); -hal_hdl_t hal_create (const char *name, hal_netif_config_t * conf); +hal_hdl_t hal_create (const char *name, const char *nic_type, + hal_netif_config_t * conf); hal_hdl_t hal_bond (const char *bond_name, uint8_t slave_num, hal_hdl_t slave_hdl[]); |