summaryrefslogtreecommitdiffstats
path: root/stacks/lwip_stack/lwip_src/netif
diff options
context:
space:
mode:
authorrainbow_0206 <jiangwenjiang@huawei.com>2018-10-19 17:04:02 +0800
committerrainbow_0206 <jiangwenjiang@huawei.com>2018-10-29 17:03:49 +0800
commit4ed7096d4a4aff47a812a79252edd0834277ee30 (patch)
treeb009b4341f123a69869b507504973a4ab42b7e7a /stacks/lwip_stack/lwip_src/netif
parent0e8e4b657d5d388a6ac988b9da97f1f81740a0b0 (diff)
Feat: support vhost-user in lwip stack
Change-Id: I6685fae6dafb4a4ac4f03bd868aa5ca636ce7054 Signed-off-by: rainbow_0206 <jiangwenjiang@huawei.com>
Diffstat (limited to 'stacks/lwip_stack/lwip_src/netif')
-rw-r--r--stacks/lwip_stack/lwip_src/netif/spl_hal.c21
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 c7cfca1..93e6cf6 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))
{