diff options
author | yalei wang <wylandrea@gmail.com> | 2018-10-30 07:40:15 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2018-10-30 07:40:15 +0000 |
commit | dbc4c0c8284eddb91e5294ba00e0b43c8faab930 (patch) | |
tree | 615beff297ee2e0681169fb5929017d35be7fc5a /stacks/lwip_stack/lwip_src/netif/spl_hal.c | |
parent | 3dd2a5fdd89db1d532229d2ec29078e8e4b23689 (diff) | |
parent | 4ed7096d4a4aff47a812a79252edd0834277ee30 (diff) |
Merge "Feat: support vhost-user in lwip stack"
Diffstat (limited to 'stacks/lwip_stack/lwip_src/netif/spl_hal.c')
-rw-r--r-- | stacks/lwip_stack/lwip_src/netif/spl_hal.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/stacks/lwip_stack/lwip_src/netif/spl_hal.c b/stacks/lwip_stack/lwip_src/netif/spl_hal.c index 596962e..db843d4 100644 --- a/stacks/lwip_stack/lwip_src/netif/spl_hal.c +++ b/stacks/lwip_stack/lwip_src/netif/spl_hal.c @@ -962,6 +962,23 @@ spl_hal_port_config (unsigned int *port_num) NSPOL_LOGINF (SC_DPDK_INFO, "if_name %s", p_stackx_port_zone-> stackx_one_port[port_index].linux_ip.if_name); + + retVal = + STRCPY_S (p_stackx_port_zone-> + stackx_one_port[port_index].linux_ip.if_type, + sizeof (p_stackx_port_zone-> + stackx_one_port[port_index].linux_ip.if_type), + network->nic_type_name); + if (EOK != retVal) + { + NSPOL_LOGERR ("strcpy_s failed]ret=%d.", retVal); + return -1; + } + + NSPOL_LOGINF (SC_DPDK_INFO, "if_type %s", + p_stackx_port_zone-> + stackx_one_port[port_index].linux_ip.if_type); + retVal = STRCPY_S (p_stackx_port_zone-> stackx_one_port[port_index].linux_ip.ip_addr_linux, @@ -1286,7 +1303,9 @@ spl_hal_port_start (uint16_t nic_id, struct stackx_port_info *p_port_info, conf.tx.ring_size[q] = HAL_TX_RING_SIZE; } - hdl = hal_create (p_port_info->linux_ip.if_name, &conf); + hdl = + hal_create (p_port_info->linux_ip.if_name, p_port_info->linux_ip.if_type, + &conf); if (!hal_is_valid (hdl)) { |