diff options
| author | Lu Qiuwen <[email protected]> | 2022-04-02 10:34:05 -0400 |
|---|---|---|
| committer | Lu Qiuwen <[email protected]> | 2022-04-02 10:34:05 -0400 |
| commit | d9c07e3a7a177586e20a00786798f38848b5ebbb (patch) | |
| tree | 14103dc64296b831b39386cfa16ecffa102311b6 | |
| parent | ebc2fd0b15b2c085a50913e313b21ee4ca7b8861 (diff) | |
修正部分编译问题。
| -rw-r--r-- | service/include/sc_common.h | 2 | ||||
| -rw-r--r-- | service/src/phydev.c | 2 | ||||
| -rw-r--r-- | service/src/vlan_fwd.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/service/include/sc_common.h b/service/include/sc_common.h index fe859fa..6fce6e2 100644 --- a/service/include/sc_common.h +++ b/service/include/sc_common.h @@ -114,7 +114,7 @@ struct sc_main /* 交换模块 --- 线路交换 */ struct sw_forward_main * sw_forward_main; /* SmartOffload */ - struct smartoffload * smartoffload_main; + struct smartoffload_main * smartoffload_main; /* 交换模块 --- 基于vlan id */ struct vlan_base_fwd_main * vlan_base_fwd_main; }; diff --git a/service/src/phydev.c b/service/src/phydev.c index b1276e4..fe4fd04 100644 --- a/service/src/phydev.c +++ b/service/src/phydev.c @@ -1042,7 +1042,7 @@ static int phydev_scan_virtio_user(struct sc_main * sc, struct phydev_main * phy snprintf(vdev_name, sizeof(vdev_name) - 1, "virtio_user%d", i); char vdev_args[MR_STRING_MAX]; - snprintf(vdev_args, sizeof(vdev_args) - 1, "queues=%d,queue_size=1024,path=/dev/vhost-net,iface=%s", sc->nr_serv_thread,virtio_syms[i]); + snprintf(vdev_args, sizeof(vdev_args) - 1, "queues=%d,queue_size=1024,path=/dev/vhost-net,iface=%s", sc->nr_io_thread, virtio_syms[i]); int ret = rte_eal_hotplug_add("vdev", vdev_name, vdev_args); if (ret < 0) diff --git a/service/src/vlan_fwd.c b/service/src/vlan_fwd.c index ca9fe19..29e9574 100644 --- a/service/src/vlan_fwd.c +++ b/service/src/vlan_fwd.c @@ -268,9 +268,9 @@ static int vb_fwd_init_from_cfg(struct sc_main * sc) char * str_phydev_symbol[MR_TOKENS_MAX]; /* 队列映射 */ - for (int i = 0; i < sc->nr_serv_thread; i++) + for (int i = 0; i < sc->nr_io_thread; i++) { - int ret = cpu_set_location(&sc->cpu_set, i); + int ret = cpu_set_location(&sc->cpu_set_io, i); sc->vlan_base_fwd_main->map_rx_queue[ret] = i; sc->vlan_base_fwd_main->map_tx_queue[ret] = i; MR_VERIFY(ret >= 0); |
