summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/framework/hal/hal.c4
-rw-r--r--src/framework/hal/hal.h3
-rw-r--r--src/framework/include/hal_api.h3
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[]);