!342 [sync] PR-337: sync optimite select_path and pbuf_take
From: @openeuler-sync-bot Reviewed-by: @jiangheng12 Signed-off-by: @jiangheng12
This commit is contained in:
commit
608f92e3a6
204
0223-revert-select_thread_path-and-optimize-app-thread-wh.patch
Normal file
204
0223-revert-select_thread_path-and-optimize-app-thread-wh.patch
Normal file
@ -0,0 +1,204 @@
|
||||
From f93092054d3fbf55d522a16c888fefeee00b5da0 Mon Sep 17 00:00:00 2001
|
||||
From: kircher <majun65@huawei.com>
|
||||
Date: Wed, 22 Mar 2023 20:07:28 +0800
|
||||
Subject: [PATCH] revert select_thread_path and optimize app thread when
|
||||
sendmsg
|
||||
|
||||
---
|
||||
src/lstack/api/lstack_wrap.c | 26 ++++++-----------
|
||||
src/lstack/core/lstack_init.c | 53 -----------------------------------
|
||||
src/lstack/core/lstack_lwip.c | 4 +--
|
||||
3 files changed, 11 insertions(+), 72 deletions(-)
|
||||
|
||||
diff --git a/src/lstack/api/lstack_wrap.c b/src/lstack/api/lstack_wrap.c
|
||||
index e1b82fc..5234c19 100644
|
||||
--- a/src/lstack/api/lstack_wrap.c
|
||||
+++ b/src/lstack/api/lstack_wrap.c
|
||||
@@ -49,9 +49,7 @@ enum KERNEL_LWIP_PATH {
|
||||
PATH_UNKNOW,
|
||||
};
|
||||
|
||||
-bool select_thread_path(void);
|
||||
-
|
||||
-static enum KERNEL_LWIP_PATH select_path(int fd)
|
||||
+static inline enum KERNEL_LWIP_PATH select_path(int fd)
|
||||
{
|
||||
if (unlikely(posix_api == NULL)) {
|
||||
/*
|
||||
@@ -64,29 +62,21 @@ static enum KERNEL_LWIP_PATH select_path(int fd)
|
||||
return PATH_KERNEL;
|
||||
}
|
||||
|
||||
- if (!select_thread_path()) {
|
||||
- return PATH_KERNEL;
|
||||
- }
|
||||
-
|
||||
if (unlikely(posix_api->ues_posix)) {
|
||||
return PATH_KERNEL;
|
||||
}
|
||||
|
||||
- struct lwip_sock *sock = posix_api->get_socket(fd);
|
||||
+ struct lwip_sock *sock = get_socket_by_fd(fd);
|
||||
|
||||
/* AF_UNIX case */
|
||||
- if (!sock) {
|
||||
+ if (!sock || !sock->conn || CONN_TYPE_IS_HOST(sock->conn)) {
|
||||
return PATH_KERNEL;
|
||||
}
|
||||
|
||||
- if (CONN_TYPE_IS_LIBOS(sock->conn)) {
|
||||
+ if (likely(CONN_TYPE_IS_LIBOS(sock->conn))) {
|
||||
return PATH_LWIP;
|
||||
}
|
||||
|
||||
- if (CONN_TYPE_IS_HOST(sock->conn)) {
|
||||
- return PATH_KERNEL;
|
||||
- }
|
||||
-
|
||||
struct tcp_pcb *pcb = sock->conn->pcb.tcp;
|
||||
/* after lwip connect, call send immediately, pcb->state is SYN_SENT, need return PATH_LWIP */
|
||||
/* pcb->state default value is CLOSED when call socket, need return PATH_UNKNOW */
|
||||
@@ -133,7 +123,7 @@ static inline int32_t do_epoll_create(int32_t size)
|
||||
|
||||
static inline int32_t do_epoll_ctl(int32_t epfd, int32_t op, int32_t fd, struct epoll_event* event)
|
||||
{
|
||||
- if (unlikely(posix_api->ues_posix) || !select_thread_path()) {
|
||||
+ if (unlikely(posix_api->ues_posix)) {
|
||||
return posix_api->epoll_ctl_fn(epfd, op, fd, event);
|
||||
}
|
||||
|
||||
@@ -142,7 +132,7 @@ static inline int32_t do_epoll_ctl(int32_t epfd, int32_t op, int32_t fd, struct
|
||||
|
||||
static inline int32_t do_epoll_wait(int32_t epfd, struct epoll_event* events, int32_t maxevents, int32_t timeout)
|
||||
{
|
||||
- if (unlikely(posix_api->ues_posix) || !select_thread_path()) {
|
||||
+ if (unlikely(posix_api->ues_posix)) {
|
||||
return posix_api->epoll_wait_fn(epfd, events, maxevents, timeout);
|
||||
}
|
||||
|
||||
@@ -291,8 +281,10 @@ static int32_t do_connect(int32_t s, const struct sockaddr *name, socklen_t name
|
||||
snprintf(listen_ring_name, sizeof(listen_ring_name), "listen_rx_ring_%u", remote_port);
|
||||
if (is_dst_ip_localhost(name) && rte_ring_lookup(listen_ring_name) == NULL) {
|
||||
ret = posix_api->connect_fn(s, name, namelen);
|
||||
+ SET_CONN_TYPE_HOST(sock->conn);
|
||||
} else {
|
||||
ret = rpc_call_connect(s, name, namelen);
|
||||
+ SET_CONN_TYPE_LIBOS(sock->conn);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -524,7 +516,7 @@ static inline int32_t do_close(int32_t s)
|
||||
|
||||
static int32_t do_poll(struct pollfd *fds, nfds_t nfds, int32_t timeout)
|
||||
{
|
||||
- if (unlikely(posix_api->ues_posix) || fds == NULL || nfds == 0 || !select_thread_path()) {
|
||||
+ if (unlikely(posix_api->ues_posix) || fds == NULL || nfds == 0) {
|
||||
return posix_api->poll_fn(fds, nfds, timeout);
|
||||
}
|
||||
|
||||
diff --git a/src/lstack/core/lstack_init.c b/src/lstack/core/lstack_init.c
|
||||
index 3537002..c40938d 100644
|
||||
--- a/src/lstack/core/lstack_init.c
|
||||
+++ b/src/lstack/core/lstack_init.c
|
||||
@@ -51,10 +51,8 @@
|
||||
#define LSTACK_SO_NAME "liblstack.so"
|
||||
#define LSTACK_PRELOAD_NAME_LEN PATH_MAX
|
||||
#define LSTACK_PRELOAD_ENV_PROC "GAZELLE_BIND_PROCNAME"
|
||||
-#define LSTACK_ENV_THREAD "GAZELLE_THREAD_NAME"
|
||||
|
||||
static volatile bool g_init_fail = false;
|
||||
-static PER_THREAD int32_t g_thread_path = -1;
|
||||
|
||||
void set_init_fail(void)
|
||||
{
|
||||
@@ -69,34 +67,14 @@ bool get_init_fail(void)
|
||||
struct lstack_preload {
|
||||
int32_t preload_switch;
|
||||
char env_procname[LSTACK_PRELOAD_NAME_LEN];
|
||||
- bool get_thread_name;
|
||||
- char env_threadname[LSTACK_PRELOAD_NAME_LEN];
|
||||
};
|
||||
static struct lstack_preload g_preload_info = {0};
|
||||
|
||||
-static void get_select_thread_name(void)
|
||||
-{
|
||||
- g_preload_info.get_thread_name = true;
|
||||
-
|
||||
- char *enval = NULL;
|
||||
- enval = getenv(LSTACK_ENV_THREAD);
|
||||
- if (enval == NULL) {
|
||||
- return;
|
||||
- }
|
||||
- if (strcpy_s(g_preload_info.env_threadname, LSTACK_PRELOAD_NAME_LEN, enval) != EOK) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- LSTACK_PRE_LOG(LSTACK_INFO, "thread name=%s ok\n", g_preload_info.env_threadname);
|
||||
-}
|
||||
-
|
||||
static int32_t preload_info_init(void)
|
||||
{
|
||||
char *enval = NULL;
|
||||
|
||||
g_preload_info.preload_switch = 0;
|
||||
-
|
||||
- get_select_thread_name();
|
||||
|
||||
enval = getenv(LSTACK_PRELOAD_ENV_SYS);
|
||||
if (enval == NULL) {
|
||||
@@ -120,37 +98,6 @@ static int32_t preload_info_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-bool select_thread_path(void)
|
||||
-{
|
||||
- if (g_thread_path >= 0) {
|
||||
- return g_thread_path;
|
||||
- }
|
||||
-
|
||||
- if (!g_preload_info.get_thread_name) {
|
||||
- get_select_thread_name();
|
||||
- }
|
||||
-
|
||||
- /* not set GAZELLE_THREAD_NAME, select all thread */
|
||||
- if (g_preload_info.env_threadname[0] == '\0') {
|
||||
- g_thread_path = 1;
|
||||
- return true;
|
||||
- }
|
||||
-
|
||||
- char thread_name[PATH_MAX] = {0};
|
||||
- if (pthread_getname_np(pthread_self(), thread_name, PATH_MAX) != 0) {
|
||||
- g_thread_path = 0;
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- if (strstr(thread_name, g_preload_info.env_threadname) == NULL) {
|
||||
- g_thread_path = 0;
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- g_thread_path = 1;
|
||||
- return true;
|
||||
-}
|
||||
-
|
||||
static void check_process_start(void) {
|
||||
if (get_global_cfg_params()->is_primary) {
|
||||
return;
|
||||
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
|
||||
index 7355d7b..b4a08ea 100644
|
||||
--- a/src/lstack/core/lstack_lwip.c
|
||||
+++ b/src/lstack/core/lstack_lwip.c
|
||||
@@ -886,8 +886,8 @@ ssize_t gazelle_same_node_ring_send(struct lwip_sock *sock, const void *buf, siz
|
||||
PER_THREAD uint16_t stack_sock_num[GAZELLE_MAX_STACK_NUM] = {0};
|
||||
PER_THREAD uint16_t max_sock_stack = 0;
|
||||
|
||||
-static void thread_bind_stack(struct lwip_sock *sock) {
|
||||
- if (likely(!sock->stack || sock->already_bind_numa)) {
|
||||
+static inline void thread_bind_stack(struct lwip_sock *sock) {
|
||||
+ if (likely(sock->already_bind_numa || !sock->stack)) {
|
||||
return;
|
||||
}
|
||||
sock->already_bind_numa = 1;
|
||||
--
|
||||
2.33.0
|
||||
|
||||
243
0224-sepeate_string_to-array-add-error-args-handle.patch
Normal file
243
0224-sepeate_string_to-array-add-error-args-handle.patch
Normal file
@ -0,0 +1,243 @@
|
||||
From db72811dedba01003a24bc85eaa6fccb65342ef0 Mon Sep 17 00:00:00 2001
|
||||
From: jiangheng12 <jiangheng14@huawei.com>
|
||||
Date: Fri, 24 Mar 2023 10:12:53 +0800
|
||||
Subject: [PATCH] sepeate_string_to array add error args handle
|
||||
|
||||
---
|
||||
src/common/gazelle_base_func.h | 2 +-
|
||||
src/common/gazelle_opt.h | 2 +
|
||||
src/common/gazelle_parse_config.c | 89 ++++++++++++++++---------------
|
||||
src/lstack/core/lstack_cfg.c | 25 +++++----
|
||||
src/ltran/ltran_param.c | 3 +-
|
||||
5 files changed, 67 insertions(+), 54 deletions(-)
|
||||
|
||||
diff --git a/src/common/gazelle_base_func.h b/src/common/gazelle_base_func.h
|
||||
index 22d7a7f..d21ef5f 100644
|
||||
--- a/src/common/gazelle_base_func.h
|
||||
+++ b/src/common/gazelle_base_func.h
|
||||
@@ -28,7 +28,7 @@
|
||||
#define NODE_ENTRY(node, type, member) \
|
||||
((type*)((char*)(node) - (size_t)&((type*)0)->member))
|
||||
|
||||
-int32_t separate_str_to_array(char *args, uint32_t *array, int32_t array_size);
|
||||
+int32_t separate_str_to_array(char *args, uint32_t *array, int32_t array_size, int32_t max_value);
|
||||
|
||||
int32_t check_and_set_run_dir(void);
|
||||
|
||||
diff --git a/src/common/gazelle_opt.h b/src/common/gazelle_opt.h
|
||||
index fe0483b..4420ba4 100644
|
||||
--- a/src/common/gazelle_opt.h
|
||||
+++ b/src/common/gazelle_opt.h
|
||||
@@ -88,6 +88,8 @@
|
||||
#define GAZELLE_PRIMARY_START_PATH "/var/run/gazelle/gazelle_primary"
|
||||
#define GAZELLE_FILE_PERMISSION 0700
|
||||
|
||||
+#define GAZELLE_MAX_PORTS_VALUE (UINT16_MAX - 1)
|
||||
+
|
||||
#define SEND_TIME_WAIT_NS 20000
|
||||
#define SECOND_NSECOND 1000000000
|
||||
|
||||
diff --git a/src/common/gazelle_parse_config.c b/src/common/gazelle_parse_config.c
|
||||
index fc286d9..a2bdde1 100644
|
||||
--- a/src/common/gazelle_parse_config.c
|
||||
+++ b/src/common/gazelle_parse_config.c
|
||||
@@ -31,58 +31,63 @@
|
||||
#define COMMON_INFO(fmt, ...) LSTACK_LOG(INFO, LSTACK, fmt, ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
-static int32_t parse_str_data(char *args, uint32_t *array, int32_t array_size)
|
||||
+int32_t separate_str_to_array(char *args, uint32_t *array, int32_t array_size, int32_t max_value)
|
||||
{
|
||||
- const char *delim = "-";
|
||||
- char *elem = NULL;
|
||||
- char *next_token = NULL;
|
||||
- char *endptr = NULL;
|
||||
- int32_t cnt = 0;
|
||||
- int64_t start, end;
|
||||
+ uint32_t count = 0;
|
||||
+ char *end = NULL;
|
||||
+ int32_t min, max;
|
||||
+ int32_t idx;
|
||||
|
||||
- elem = strtok_s(args, delim, &next_token);
|
||||
- start = strtol(elem, &endptr, 0);
|
||||
- if (endptr == elem) {
|
||||
- return cnt;
|
||||
+ for (idx = 0; idx < array_size; idx++) {
|
||||
+ array[idx] = 0;
|
||||
}
|
||||
|
||||
- elem = strtok_s(NULL, delim, &next_token);
|
||||
- if (elem == NULL) {
|
||||
- /* just a single data */
|
||||
- array[cnt++] = (uint32_t)start;
|
||||
- return cnt;
|
||||
- }
|
||||
- end = strtol(elem, &endptr, 0);
|
||||
- if (endptr == elem) {
|
||||
- array[cnt++] = start;
|
||||
- return cnt;
|
||||
+ while (isblank(*args)) {
|
||||
+ args++;
|
||||
}
|
||||
|
||||
- for (int64_t i = start; i <= end && cnt < array_size; i++) {
|
||||
- if (i < 0 || i > UINT_MAX) {
|
||||
- break;
|
||||
+ min = array_size;
|
||||
+ do {
|
||||
+ while (isblank(*args)) {
|
||||
+ args++;
|
||||
}
|
||||
- array[cnt++] = (uint32_t)i;
|
||||
- }
|
||||
-
|
||||
- return cnt;
|
||||
-}
|
||||
-
|
||||
-/* support '-' and ',' */
|
||||
-int32_t separate_str_to_array(char *args, uint32_t *array, int32_t array_size)
|
||||
-{
|
||||
- const char *delim = ",";
|
||||
- char *elem = NULL;
|
||||
- char *next_token = NULL;
|
||||
- int32_t cnt = 0;
|
||||
+ if (*args == '\0') {
|
||||
+ return -1;
|
||||
+ }
|
||||
+ errno = 0;
|
||||
+ idx = strtol(args, &end, 10); /* 10: decimal */
|
||||
+ if (errno || end == NULL) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (idx < 0 || idx >= max_value) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+ while (isblank(*end)) {
|
||||
+ end++;
|
||||
+ }
|
||||
+ if (*end == '-') {
|
||||
+ min = idx;
|
||||
+ } else if ((*end == ',') || (*end == '\0') || (*end == '\n')) {
|
||||
+ max = idx;
|
||||
+ if (min == array_size) {
|
||||
+ min = idx;
|
||||
+ }
|
||||
+ for (idx = min; idx <= max; idx++) {
|
||||
+ array[count] = idx;
|
||||
+ count++;
|
||||
+ }
|
||||
+ min = array_size;
|
||||
+ } else {
|
||||
+ return -1;
|
||||
+ }
|
||||
+ args = end + 1;
|
||||
+ } while (*end != '\0' && *end != '\n');
|
||||
|
||||
- elem = strtok_s(args, delim, &next_token);
|
||||
- while (elem != NULL && cnt < array_size) {
|
||||
- cnt += parse_str_data(elem, &array[cnt], array_size - cnt);
|
||||
- elem = strtok_s(NULL, delim, &next_token);
|
||||
+ if (count == 0) {
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
- return cnt;
|
||||
+ return count;
|
||||
}
|
||||
|
||||
int32_t check_and_set_run_dir(void)
|
||||
diff --git a/src/lstack/core/lstack_cfg.c b/src/lstack/core/lstack_cfg.c
|
||||
index bed102e..f033fa7 100644
|
||||
--- a/src/lstack/core/lstack_cfg.c
|
||||
+++ b/src/lstack/core/lstack_cfg.c
|
||||
@@ -309,7 +309,7 @@ static int32_t parse_stack_cpu_number(void)
|
||||
}
|
||||
|
||||
char *tmp_arg = strdup(args);
|
||||
- int32_t cnt = separate_str_to_array(tmp_arg, g_config_params.cpus, CFG_MAX_CPUS);
|
||||
+ int32_t cnt = separate_str_to_array(tmp_arg, g_config_params.cpus, CFG_MAX_CPUS, CFG_MAX_CPUS);
|
||||
free(tmp_arg);
|
||||
if (cnt <= 0 || cnt > CFG_MAX_CPUS) {
|
||||
return -EINVAL;
|
||||
@@ -342,7 +342,7 @@ static int32_t parse_stack_cpu_number(void)
|
||||
}
|
||||
|
||||
char *tmp_arg_send = strdup(args);
|
||||
- int32_t cnt = separate_str_to_array(tmp_arg_send, g_config_params.send_cpus, CFG_MAX_CPUS);
|
||||
+ int32_t send_cpu_cnt = separate_str_to_array(tmp_arg_send, g_config_params.send_cpus, CFG_MAX_CPUS, CFG_MAX_CPUS);
|
||||
free(tmp_arg_send);
|
||||
|
||||
// recv_num_cpus
|
||||
@@ -368,15 +368,15 @@ static int32_t parse_stack_cpu_number(void)
|
||||
}
|
||||
|
||||
char *tmp_arg_recv = strdup(args);
|
||||
- cnt = separate_str_to_array(tmp_arg_recv, g_config_params.recv_cpus, CFG_MAX_CPUS);
|
||||
+ int32_t recv_cpu_cnt = separate_str_to_array(tmp_arg_recv, g_config_params.recv_cpus, CFG_MAX_CPUS, CFG_MAX_CPUS);
|
||||
free(tmp_arg_recv);
|
||||
|
||||
- if (cnt <= 0 || cnt > CFG_MAX_CPUS / 2) {
|
||||
+ if (send_cpu_cnt <= 0 || send_cpu_cnt > CFG_MAX_CPUS / 2 || send_cpu_cnt != recv_cpu_cnt) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- g_config_params.num_cpu = cnt;
|
||||
- g_config_params.num_queue = (uint16_t)cnt * 2;
|
||||
+ g_config_params.num_cpu = send_cpu_cnt;
|
||||
+ g_config_params.num_queue = (uint16_t)send_cpu_cnt * 2;
|
||||
g_config_params.tot_queue_num = g_config_params.num_queue;
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ static int32_t numa_to_cpusnum(unsigned socket_id, uint32_t *cpulist, int32_t nu
|
||||
return -1;
|
||||
}
|
||||
|
||||
- int32_t count = separate_str_to_array(strbuf, cpulist, num);
|
||||
+ int32_t count = separate_str_to_array(strbuf, cpulist, num, CFG_MAX_CPUS);
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -492,9 +492,14 @@ static int32_t gazelle_parse_socket_mem(const char *arg, struct secondary_attach
|
||||
return -1;
|
||||
}
|
||||
|
||||
- int32_t count = separate_str_to_array(socket_mem, sec_attach_arg->socket_per_size, GAZELLE_MAX_NUMA_NODES);
|
||||
+ int32_t count = separate_str_to_array(socket_mem, sec_attach_arg->socket_per_size, GAZELLE_MAX_NUMA_NODES, GAZELLE_MAX_PORTS_VALUE);
|
||||
+
|
||||
+ if (count < 0) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
- mem_size += sec_attach_arg->socket_per_size[count];
|
||||
+ mem_size += sec_attach_arg->socket_per_size[i];
|
||||
}
|
||||
mem_size *= 1024LL;
|
||||
mem_size *= 1024LL;
|
||||
@@ -993,7 +998,7 @@ static int32_t parse_process_numa(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
- ret = separate_str_to_array((char *)args, g_config_params.process_numa, PROTOCOL_STACK_MAX);
|
||||
+ ret = separate_str_to_array((char *)args, g_config_params.process_numa, PROTOCOL_STACK_MAX, GAZELLE_MAX_NUMA_NODES);
|
||||
if (ret <= 0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
diff --git a/src/ltran/ltran_param.c b/src/ltran/ltran_param.c
|
||||
index 1b9d82b..7cf3423 100644
|
||||
--- a/src/ltran/ltran_param.c
|
||||
+++ b/src/ltran/ltran_param.c
|
||||
@@ -339,7 +339,8 @@ static int32_t parse_bond_ports(const config_t *config, const char *key, struct
|
||||
return GAZELLE_ERR;
|
||||
}
|
||||
|
||||
- ltran_config->bond.port_num = separate_str_to_array(port_str, ltran_config->bond.portmask, GAZELLE_MAX_BOND_NUM);
|
||||
+ ltran_config->bond.port_num = separate_str_to_array(port_str, ltran_config->bond.portmask, GAZELLE_MAX_BOND_NUM, GAZELLE_MAX_PORTS_VALUE);
|
||||
+
|
||||
if (ltran_config->bond.port_num > GAZELLE_MAX_BOND_NUM) {
|
||||
free(port_str);
|
||||
gazelle_set_errno(GAZELLE_ERANGE);
|
||||
--
|
||||
2.33.0
|
||||
|
||||
471
0225-check-primary-process-idx-and-secondary-lstack-num.patch
Normal file
471
0225-check-primary-process-idx-and-secondary-lstack-num.patch
Normal file
@ -0,0 +1,471 @@
|
||||
From fa4c8d298f37e7dad01d91cec6834238841d81b3 Mon Sep 17 00:00:00 2001
|
||||
From: jiangheng12 <jiangheng14@huawei.com>
|
||||
Date: Fri, 24 Mar 2023 11:12:34 +0800
|
||||
Subject: [PATCH] check primary process idx and secondary lstack num
|
||||
|
||||
---
|
||||
src/common/gazelle_dfx_msg.h | 5 +-
|
||||
src/lstack/api/lstack_wrap.c | 9 ++-
|
||||
src/lstack/core/lstack_cfg.c | 5 ++
|
||||
src/lstack/core/lstack_init.c | 8 ++
|
||||
src/lstack/core/lstack_lwip.c | 20 ++---
|
||||
src/lstack/include/lstack_cfg.h | 1 +
|
||||
src/lstack/include/lstack_ethdev.h | 1 +
|
||||
src/lstack/netif/lstack_ethdev.c | 126 ++++++++++++++++++-----------
|
||||
src/ltran/ltran_dfx.c | 4 +-
|
||||
9 files changed, 112 insertions(+), 67 deletions(-)
|
||||
|
||||
diff --git a/src/common/gazelle_dfx_msg.h b/src/common/gazelle_dfx_msg.h
|
||||
index 1863837..9105871 100644
|
||||
--- a/src/common/gazelle_dfx_msg.h
|
||||
+++ b/src/common/gazelle_dfx_msg.h
|
||||
@@ -200,13 +200,14 @@ struct gazelle_stat_low_power_info {
|
||||
};
|
||||
|
||||
#define RTE_ETH_XSTATS_NAME_SIZE 64
|
||||
+#define RTE_ETH_XSTATS_MAX_LEN 128
|
||||
struct nic_eth_xstats_name {
|
||||
char name[RTE_ETH_XSTATS_NAME_SIZE];
|
||||
};
|
||||
|
||||
struct nic_eth_xstats {
|
||||
- struct nic_eth_xstats_name xstats_name[128];
|
||||
- uint64_t values[128];
|
||||
+ struct nic_eth_xstats_name xstats_name[RTE_ETH_XSTATS_MAX_LEN];
|
||||
+ uint64_t values[RTE_ETH_XSTATS_MAX_LEN];
|
||||
uint32_t len;
|
||||
uint16_t port_id;
|
||||
};
|
||||
diff --git a/src/lstack/api/lstack_wrap.c b/src/lstack/api/lstack_wrap.c
|
||||
index 5234c19..5132ee9 100644
|
||||
--- a/src/lstack/api/lstack_wrap.c
|
||||
+++ b/src/lstack/api/lstack_wrap.c
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <sys/epoll.h>
|
||||
#include <unistd.h>
|
||||
#include <net/if.h>
|
||||
+#include <securec.h>
|
||||
|
||||
#include <lwip/posix_api.h>
|
||||
#include <lwip/lwipsock.h>
|
||||
@@ -187,8 +188,8 @@ static int get_addr(struct sockaddr_in *sin, char *interface)
|
||||
|
||||
if ((sockfd = posix_api->socket_fn(AF_INET, SOCK_STREAM, 0)) < 0) return -1;
|
||||
|
||||
- memset(&ifr, 0, sizeof(ifr));
|
||||
- snprintf(ifr.ifr_name, (sizeof(ifr.ifr_name) - 1), "%s", interface);
|
||||
+ memset_s(&ifr, sizeof(ifr), 0, sizeof(ifr));
|
||||
+ snprintf_s(ifr.ifr_name, sizeof(ifr.ifr_name), (sizeof(ifr.ifr_name) - 1), "%s", interface);
|
||||
|
||||
if(posix_api->ioctl_fn(sockfd, SIOCGIFADDR, &ifr) < 0){
|
||||
posix_api->close_fn(sockfd);
|
||||
@@ -243,7 +244,7 @@ bool is_dst_ip_localhost(const struct sockaddr *addr)
|
||||
char interface[20] = {0};
|
||||
strncpy(interface, p, n);
|
||||
|
||||
- memset(sin, 0, sizeof(struct sockaddr_in));
|
||||
+ memset_s(sin, sizeof(struct sockaddr_in), 0, sizeof(struct sockaddr_in));
|
||||
int ret = get_addr(sin, interface);
|
||||
if (ret == 0) {
|
||||
if(sin->sin_addr.s_addr == servaddr->sin_addr.s_addr){
|
||||
@@ -278,7 +279,7 @@ static int32_t do_connect(int32_t s, const struct sockaddr *name, socklen_t name
|
||||
int32_t ret = 0;
|
||||
char listen_ring_name[RING_NAME_LEN];
|
||||
int remote_port = htons(((struct sockaddr_in *)name)->sin_port);
|
||||
- snprintf(listen_ring_name, sizeof(listen_ring_name), "listen_rx_ring_%u", remote_port);
|
||||
+ snprintf_s(listen_ring_name, sizeof(listen_ring_name), sizeof(listen_ring_name) - 1, "listen_rx_ring_%u", remote_port);
|
||||
if (is_dst_ip_localhost(name) && rte_ring_lookup(listen_ring_name) == NULL) {
|
||||
ret = posix_api->connect_fn(s, name, namelen);
|
||||
SET_CONN_TYPE_HOST(sock->conn);
|
||||
diff --git a/src/lstack/core/lstack_cfg.c b/src/lstack/core/lstack_cfg.c
|
||||
index f033fa7..95590e2 100644
|
||||
--- a/src/lstack/core/lstack_cfg.c
|
||||
+++ b/src/lstack/core/lstack_cfg.c
|
||||
@@ -1040,5 +1040,10 @@ static int parse_tuple_filter(void)
|
||||
if (g_config_params.use_ltran || g_config_params.listen_shadow) {
|
||||
return -EINVAL;
|
||||
}
|
||||
+
|
||||
+ // check primary process_idx
|
||||
+ if (g_config_params.is_primary && g_config_params.process_idx != 0) {
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
return 0;
|
||||
}
|
||||
diff --git a/src/lstack/core/lstack_init.c b/src/lstack/core/lstack_init.c
|
||||
index c40938d..76dd384 100644
|
||||
--- a/src/lstack/core/lstack_init.c
|
||||
+++ b/src/lstack/core/lstack_init.c
|
||||
@@ -324,6 +324,14 @@ __attribute__((constructor)) void gazelle_network_init(void)
|
||||
return;
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * check lstack num, and get process idx
|
||||
+ */
|
||||
+ if (check_params_from_primary() < 0) {
|
||||
+ LSTACK_PRE_LOG(LSTACK_ERR, "lstack num error, not same to primary process!\n");
|
||||
+ LSTACK_EXIT(1, "lstack num error, not same to primary process!\n");
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* save initial affinity */
|
||||
if (!get_global_cfg_params()->main_thread_affinity) {
|
||||
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
|
||||
index b4a08ea..a4e6e0b 100644
|
||||
--- a/src/lstack/core/lstack_lwip.c
|
||||
+++ b/src/lstack/core/lstack_lwip.c
|
||||
@@ -1386,7 +1386,7 @@ err_t netif_loop_output(struct netif *netif, struct pbuf *p)
|
||||
if ((flags & TCP_SYN) && !(flags & TCP_ACK)) {
|
||||
/* SYN packet, send to listen_ring */
|
||||
char ring_name[RING_NAME_LEN] = {0};
|
||||
- snprintf(ring_name, sizeof(ring_name), "listen_rx_ring_%d", pcb->remote_port);
|
||||
+ snprintf_s(ring_name, sizeof(ring_name), sizeof(ring_name) - 1, "listen_rx_ring_%d", pcb->remote_port);
|
||||
struct rte_ring *ring = rte_ring_lookup(ring_name);
|
||||
if (ring == NULL) {
|
||||
LSTACK_LOG(INFO, LSTACK, "netif_loop_output: cant find listen_rx_ring %d\n", pcb->remote_port);
|
||||
@@ -1411,7 +1411,7 @@ err_t netif_loop_output(struct netif *netif, struct pbuf *p)
|
||||
err_t find_same_node_memzone(struct tcp_pcb *pcb, struct lwip_sock *nsock)
|
||||
{
|
||||
char name[RING_NAME_LEN];
|
||||
- snprintf(name, sizeof(name), "rte_mz_rx_%u", pcb->remote_port);
|
||||
+ snprintf_s(name, sizeof(name), sizeof(name) - 1, "rte_mz_rx_%u", pcb->remote_port);
|
||||
if ((nsock->same_node_tx_ring_mz = rte_memzone_lookup(name)) == NULL) {
|
||||
LSTACK_LOG(INFO, LSTACK, "lwip_accept: can't find %s\n",name);
|
||||
return -1;
|
||||
@@ -1420,13 +1420,13 @@ err_t find_same_node_memzone(struct tcp_pcb *pcb, struct lwip_sock *nsock)
|
||||
}
|
||||
nsock->same_node_tx_ring = (struct same_node_ring *)nsock->same_node_tx_ring_mz->addr;
|
||||
|
||||
- snprintf(name, sizeof(name), "rte_mz_buf_rx_%u", pcb->remote_port);
|
||||
+ snprintf_s(name, sizeof(name), sizeof(name) - 1, "rte_mz_buf_rx_%u", pcb->remote_port);
|
||||
if ((nsock->same_node_tx_ring->mz = rte_memzone_lookup(name)) == NULL) {
|
||||
LSTACK_LOG(INFO, LSTACK, "lwip_accept: can't find %s\n",name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
- snprintf(name, sizeof(name), "rte_mz_tx_%u", pcb->remote_port);
|
||||
+ snprintf_s(name, sizeof(name), sizeof(name) - 1, "rte_mz_tx_%u", pcb->remote_port);
|
||||
if ((nsock->same_node_rx_ring_mz = rte_memzone_lookup(name)) == NULL) {
|
||||
LSTACK_LOG(INFO, LSTACK, "lwip_accept: can't find %s\n",name);
|
||||
return -1;
|
||||
@@ -1435,7 +1435,7 @@ err_t find_same_node_memzone(struct tcp_pcb *pcb, struct lwip_sock *nsock)
|
||||
}
|
||||
nsock->same_node_rx_ring = (struct same_node_ring *)nsock->same_node_rx_ring_mz->addr;
|
||||
|
||||
- snprintf(name, sizeof(name), "rte_mz_buf_tx_%u", pcb->remote_port);
|
||||
+ snprintf_s(name, sizeof(name), sizeof(name) - 1,"rte_mz_buf_tx_%u", pcb->remote_port);
|
||||
if ((nsock->same_node_rx_ring->mz = rte_memzone_lookup(name)) == NULL) {
|
||||
LSTACK_LOG(INFO, LSTACK, "lwip_accept: can't find %s\n",name);
|
||||
return -1;
|
||||
@@ -1450,7 +1450,7 @@ err_t find_same_node_memzone(struct tcp_pcb *pcb, struct lwip_sock *nsock)
|
||||
err_t same_node_memzone_create(const struct rte_memzone **zone, int size, int port, char *name, char *rx)
|
||||
{
|
||||
char mem_name[RING_NAME_LEN] = {0};
|
||||
- snprintf(mem_name, sizeof(mem_name), "%s_%s_%u", name, rx, port);
|
||||
+ snprintf_s(mem_name, sizeof(mem_name), sizeof(mem_name) - 1, "%s_%s_%u", name, rx, port);
|
||||
|
||||
*zone = rte_memzone_reserve_aligned(mem_name, size, rte_socket_id(), 0, RTE_CACHE_LINE_SIZE);
|
||||
if (*zone == NULL) {
|
||||
@@ -1473,7 +1473,7 @@ err_t same_node_ring_create(struct rte_ring **ring, int size, int port, char *na
|
||||
flags = RING_F_SP_ENQ | RING_F_SC_DEQ;
|
||||
}
|
||||
|
||||
- snprintf(ring_name, sizeof(ring_name), "%s_%s_ring_%u", name, rx, port);
|
||||
+ snprintf_s(ring_name, sizeof(ring_name), sizeof(ring_name) - 1, "%s_%s_ring_%u", name, rx, port);
|
||||
*ring = rte_ring_create(ring_name, size, rte_socket_id(), flags);
|
||||
if (*ring == NULL) {
|
||||
LSTACK_LOG(ERR, LSTACK, "cannot create rte_ring %s, errno is %d\n", ring_name, rte_errno);
|
||||
@@ -1550,10 +1550,10 @@ END:
|
||||
err_t find_same_node_ring(struct tcp_pcb *npcb)
|
||||
{
|
||||
char name[RING_NAME_LEN] = {0};
|
||||
- snprintf(name, sizeof(name), "client_tx_ring_%u", npcb->remote_port);
|
||||
+ snprintf_s(name, sizeof(name), sizeof(name) - 1, "client_tx_ring_%u", npcb->remote_port);
|
||||
npcb->client_rx_ring = rte_ring_lookup(name);
|
||||
- memset(name, 0, sizeof(name));
|
||||
- snprintf(name, sizeof(name), "client_rx_ring_%u", npcb->remote_port);
|
||||
+ memset_s(name, sizeof(name), 0, sizeof(name));
|
||||
+ snprintf_s(name, sizeof(name), sizeof(name) - 1, "client_rx_ring_%u", npcb->remote_port);
|
||||
npcb->client_tx_ring = rte_ring_lookup(name);
|
||||
npcb->free_ring = 0;
|
||||
if (npcb->client_tx_ring == NULL ||
|
||||
diff --git a/src/lstack/include/lstack_cfg.h b/src/lstack/include/lstack_cfg.h
|
||||
index 16f37b4..a4170ca 100644
|
||||
--- a/src/lstack/include/lstack_cfg.h
|
||||
+++ b/src/lstack/include/lstack_cfg.h
|
||||
@@ -34,6 +34,7 @@
|
||||
#define LOG_DIR_PATH PATH_MAX
|
||||
#define LOG_LEVEL_LEN 16
|
||||
#define GAZELLE_MAX_NUMA_NODES 8
|
||||
+#define MAX_PROCESS_NUM 32
|
||||
|
||||
/* Default value of low power mode parameters */
|
||||
#define LSTACK_LPM_DETECT_MS_MIN (5 * 1000)
|
||||
diff --git a/src/lstack/include/lstack_ethdev.h b/src/lstack/include/lstack_ethdev.h
|
||||
index 39a972d..7f944eb 100644
|
||||
--- a/src/lstack/include/lstack_ethdev.h
|
||||
+++ b/src/lstack/include/lstack_ethdev.h
|
||||
@@ -45,6 +45,7 @@ int32_t gazelle_eth_dev_poll(struct protocol_stack *stack, uint8_t use_ltran_fla
|
||||
void eth_dev_recv(struct rte_mbuf *mbuf, struct protocol_stack *stack);
|
||||
|
||||
int recv_pkts_from_other_process(int process_index, void* arg);
|
||||
+int32_t check_params_from_primary(void);
|
||||
void kni_handle_rx(uint16_t port_id);
|
||||
void delete_user_process_port(uint16_t dst_port, enum port_type type);
|
||||
void add_user_process_port(uint16_t dst_port, uint8_t process_idx, enum port_type type);
|
||||
diff --git a/src/lstack/netif/lstack_ethdev.c b/src/lstack/netif/lstack_ethdev.c
|
||||
index b35852b..8d05bdd 100644
|
||||
--- a/src/lstack/netif/lstack_ethdev.c
|
||||
+++ b/src/lstack/netif/lstack_ethdev.c
|
||||
@@ -58,6 +58,9 @@
|
||||
#define ERROR_REPLY "error"
|
||||
#define PACKET_READ_SIZE 32
|
||||
|
||||
+#define GET_LSTACK_NUM 14
|
||||
+#define GET_LSTACK_NUM_STRING "get_lstack_num"
|
||||
+
|
||||
char *client_path = "/var/run/gazelle/client.socket";
|
||||
char *server_path = "/var/run/gazelle/server.socket";
|
||||
const char *split_delim = ",";
|
||||
@@ -171,7 +174,7 @@ void add_rule(char* rule_key, struct rte_flow *flow)
|
||||
HASH_FIND_STR(g_flow_rules, rule_key, rule);
|
||||
if (rule == NULL) {
|
||||
rule = (struct flow_rule*)malloc(sizeof(struct flow_rule));
|
||||
- strcpy(rule->rule_key, rule_key);
|
||||
+ strcpy_s(rule->rule_key, RULE_KEY_LEN, rule_key);
|
||||
HASH_ADD_STR(g_flow_rules, rule_key, rule);
|
||||
}
|
||||
rule->flow = flow;
|
||||
@@ -202,20 +205,26 @@ int transfer_pkt_to_other_process(char *buf, int process_index, int write_len, b
|
||||
|
||||
sockfd = posix_api->socket_fn(AF_UNIX, SOCK_STREAM, 0);
|
||||
|
||||
- memset(&serun, 0, sizeof(serun));
|
||||
+ memset_s(&serun, sizeof(serun), 0, sizeof(serun));
|
||||
serun.sun_family = AF_UNIX;
|
||||
sprintf_s(serun.sun_path, PATH_MAX,"%s%d", server_path, process_index);
|
||||
- int len = offsetof(struct sockaddr_un, sun_path) + strlen(serun.sun_path);
|
||||
+ int32_t len = offsetof(struct sockaddr_un, sun_path) + strlen(serun.sun_path);
|
||||
if (posix_api->connect_fn(sockfd, (struct sockaddr *)&serun, len) < 0){
|
||||
return CONNECT_ERROR;
|
||||
}
|
||||
posix_api->write_fn(sockfd, buf, write_len);
|
||||
if (need_reply) {
|
||||
char reply_message[REPLY_LEN];
|
||||
- posix_api->read_fn(sockfd, reply_message, REPLY_LEN);
|
||||
- if (strcmp(reply_message, SUCCESS_REPLY) == 0) {
|
||||
- ret = TRANSFER_SUCESS;
|
||||
- }else {
|
||||
+ int32_t read_result = posix_api->read_fn(sockfd, reply_message, REPLY_LEN);
|
||||
+ if (read_result > 0) {
|
||||
+ if (strcmp(reply_message, SUCCESS_REPLY) == 0) {
|
||||
+ ret = TRANSFER_SUCESS;
|
||||
+ } else if (strcmp(reply_message, ERROR_REPLY) == 0) {
|
||||
+ ret = REPLY_ERROR;
|
||||
+ } else {
|
||||
+ ret = atoi(reply_message);
|
||||
+ }
|
||||
+ } else {
|
||||
ret = REPLY_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -224,6 +233,21 @@ int transfer_pkt_to_other_process(char *buf, int process_index, int write_len, b
|
||||
return ret;
|
||||
}
|
||||
|
||||
+int32_t check_params_from_primary(void){
|
||||
+ struct cfg_params *cfg = get_global_cfg_params();
|
||||
+ if (cfg->is_primary) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+ // check lstack num
|
||||
+ char get_lstack_num[GET_LSTACK_NUM];
|
||||
+ sprintf_s(get_lstack_num, GET_LSTACK_NUM, "%s", GET_LSTACK_NUM_STRING);
|
||||
+ int32_t ret = transfer_pkt_to_other_process(get_lstack_num, 0, GET_LSTACK_NUM, true);
|
||||
+ if (ret != cfg->num_cpu) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
struct rte_flow *
|
||||
create_flow_director(uint16_t port_id, uint16_t queue_id, uint32_t src_ip, uint32_t dst_ip,
|
||||
uint16_t src_port, uint16_t dst_port, struct rte_flow_error *error)
|
||||
@@ -240,14 +264,14 @@ create_flow_director(uint16_t port_id, uint16_t queue_id, uint32_t src_ip, uint3
|
||||
struct rte_flow_item_tcp tcp_mask;
|
||||
int res;
|
||||
|
||||
- memset(pattern, 0, sizeof(pattern));
|
||||
- memset(action, 0, sizeof(action));
|
||||
+ memset_s(pattern, sizeof(pattern), 0, sizeof(pattern));
|
||||
+ memset_s(action, sizeof(action), 0, sizeof(action));
|
||||
|
||||
/*
|
||||
* set the rule attribute.
|
||||
* in this case only ingress packets will be checked.
|
||||
*/
|
||||
- memset(&attr, 0, sizeof(struct rte_flow_attr));
|
||||
+ memset_s(&attr, sizeof(struct rte_flow_attr), 0, sizeof(struct rte_flow_attr));
|
||||
attr.ingress = 1;
|
||||
|
||||
/*
|
||||
@@ -262,8 +286,8 @@ create_flow_director(uint16_t port_id, uint16_t queue_id, uint32_t src_ip, uint3
|
||||
pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;
|
||||
|
||||
// ip header
|
||||
- memset(&ip_spec, 0, sizeof(struct rte_flow_item_ipv4));
|
||||
- memset(&ip_mask, 0, sizeof(struct rte_flow_item_ipv4));
|
||||
+ memset_s(&ip_spec, sizeof(struct rte_flow_item_ipv4), 0, sizeof(struct rte_flow_item_ipv4));
|
||||
+ memset_s(&ip_mask, sizeof(struct rte_flow_item_ipv4), 0, sizeof(struct rte_flow_item_ipv4));
|
||||
ip_spec.hdr.dst_addr = dst_ip;
|
||||
ip_mask.hdr.dst_addr = FULL_MASK;
|
||||
ip_spec.hdr.src_addr = src_ip;
|
||||
@@ -273,8 +297,8 @@ create_flow_director(uint16_t port_id, uint16_t queue_id, uint32_t src_ip, uint3
|
||||
pattern[1].mask = &ip_mask;
|
||||
|
||||
// tcp header, full mask 0xffff
|
||||
- memset(&tcp_spec, 0, sizeof(struct rte_flow_item_tcp));
|
||||
- memset(&tcp_mask, 0, sizeof(struct rte_flow_item_tcp));
|
||||
+ memset_s(&tcp_spec, sizeof(struct rte_flow_item_tcp), 0, sizeof(struct rte_flow_item_tcp));
|
||||
+ memset_s(&tcp_mask, sizeof(struct rte_flow_item_tcp), 0, sizeof(struct rte_flow_item_tcp));
|
||||
pattern[2].type = RTE_FLOW_ITEM_TYPE_TCP;
|
||||
tcp_spec.hdr.src_port = src_port;
|
||||
tcp_spec.hdr.dst_port = dst_port;
|
||||
@@ -392,7 +416,7 @@ static int str_to_array(char *args, uint32_t *array, int size)
|
||||
char *elem = NULL;
|
||||
char *next_token = NULL;
|
||||
|
||||
- memset(array, 0, sizeof(*array) * size);
|
||||
+ memset_s(array, sizeof(*array) * size, 0, sizeof(*array) * size);
|
||||
elem = strtok_s((char *)args, split_delim, &next_token);
|
||||
while (elem != NULL) {
|
||||
if (cnt >= size) {
|
||||
@@ -548,50 +572,50 @@ int recv_pkts_from_other_process(int process_index, void* arg){
|
||||
int listenfd, connfd, size;
|
||||
char buf[132];
|
||||
/* socket */
|
||||
- if ((listenfd = posix_api->socket_fn(AF_UNIX, SOCK_STREAM, 0)) < 0) {
|
||||
- perror("socket error");
|
||||
- return -1;
|
||||
- }
|
||||
+ if ((listenfd = posix_api->socket_fn(AF_UNIX, SOCK_STREAM, 0)) < 0) {
|
||||
+ perror("socket error");
|
||||
+ return -1;
|
||||
+ }
|
||||
/* bind */
|
||||
- memset(&serun, 0, sizeof(serun));
|
||||
- serun.sun_family = AF_UNIX;
|
||||
+ memset_s(&serun, sizeof(serun), 0, sizeof(serun));
|
||||
+ serun.sun_family = AF_UNIX;
|
||||
char process_server_path[PATH_MAX];
|
||||
sprintf_s(process_server_path, sizeof(process_server_path), "%s%d", server_path, process_index);
|
||||
- strcpy(serun.sun_path, process_server_path);
|
||||
- size = offsetof(struct sockaddr_un, sun_path) + strlen(serun.sun_path);
|
||||
- unlink(process_server_path);
|
||||
+ strcpy_s(serun.sun_path, sizeof(serun.sun_path),process_server_path);
|
||||
+ size = offsetof(struct sockaddr_un, sun_path) + strlen(serun.sun_path);
|
||||
+ unlink(process_server_path);
|
||||
if (posix_api->bind_fn(listenfd, (struct sockaddr *)&serun, size) < 0) {
|
||||
- perror("bind error");
|
||||
- return -1;
|
||||
+ perror("bind error");
|
||||
+ return -1;
|
||||
}
|
||||
- if (posix_api->listen_fn(listenfd, 20) < 0) {
|
||||
+ if (posix_api->listen_fn(listenfd, 20) < 0) { /* 20: max backlog */
|
||||
perror("listen error");
|
||||
- return -1;
|
||||
+ return -1;
|
||||
}
|
||||
sem_post((sem_t *)arg);
|
||||
/* block */
|
||||
while(1) {
|
||||
- cliun_len = sizeof(cliun);
|
||||
- if ((connfd = posix_api->accept_fn(listenfd, (struct sockaddr *)&cliun, &cliun_len)) < 0){
|
||||
- perror("accept error");
|
||||
- continue;
|
||||
- }
|
||||
- while(1) {
|
||||
- int n = posix_api->read_fn(connfd, buf, sizeof(buf));
|
||||
- if (n < 0) {
|
||||
- perror("read error");
|
||||
- break;
|
||||
- } else if(n == 0) {
|
||||
- break;
|
||||
+ cliun_len = sizeof(cliun);
|
||||
+ if ((connfd = posix_api->accept_fn(listenfd, (struct sockaddr *)&cliun, &cliun_len)) < 0){
|
||||
+ perror("accept error");
|
||||
+ continue;
|
||||
+ }
|
||||
+ while(1) {
|
||||
+ int n = posix_api->read_fn(connfd, buf, sizeof(buf));
|
||||
+ if (n < 0) {
|
||||
+ perror("read error");
|
||||
+ break;
|
||||
+ } else if(n == 0) {
|
||||
+ break;
|
||||
}
|
||||
|
||||
if(n == LSTACK_MBUF_LEN){
|
||||
/* arp */
|
||||
parse_arp_and_transefer(buf);
|
||||
- }else if(n == TRANSFER_TCP_MUBF_LEN) {
|
||||
+ } else if (n == TRANSFER_TCP_MUBF_LEN) {
|
||||
/* tcp. lstack_mbuf_queue_id */
|
||||
parse_tcp_and_transefer(buf);
|
||||
- }else if (n == DELETE_FLOWS_PARAMS_LENGTH) {
|
||||
+ } else if (n == DELETE_FLOWS_PARAMS_LENGTH) {
|
||||
/* delete rule */
|
||||
parse_and_delete_rule(buf);
|
||||
}else if(n == CREATE_FLOWS_PARAMS_LENGTH){
|
||||
@@ -599,20 +623,24 @@ int recv_pkts_from_other_process(int process_index, void* arg){
|
||||
parse_and_create_rule(buf);
|
||||
char reply_buf[REPLY_LEN];
|
||||
sprintf_s(reply_buf, sizeof(reply_buf), "%s", SUCCESS_REPLY);
|
||||
- posix_api->write_fn(connfd, reply_buf, REPLY_LEN);
|
||||
- }else {
|
||||
+ posix_api->write_fn(connfd, reply_buf, REPLY_LEN);
|
||||
+ }else if (n == GET_LSTACK_NUM) {
|
||||
+ char reply_buf[REPLY_LEN];
|
||||
+ sprintf_s(reply_buf, sizeof(reply_buf), "%d", get_global_cfg_params()->num_cpu);
|
||||
+ posix_api->write_fn(connfd, reply_buf, REPLY_LEN);
|
||||
+ }else{
|
||||
/* add port */
|
||||
parse_and_add_or_delete_listen_port(buf);
|
||||
char reply_buf[REPLY_LEN];
|
||||
sprintf_s(reply_buf, sizeof(reply_buf), "%s", SUCCESS_REPLY);
|
||||
- posix_api->write_fn(connfd, reply_buf, REPLY_LEN);
|
||||
+ posix_api->write_fn(connfd, reply_buf, REPLY_LEN);
|
||||
}
|
||||
|
||||
- }
|
||||
- posix_api->close_fn(connfd);
|
||||
+ }
|
||||
+ posix_api->close_fn(connfd);
|
||||
}
|
||||
- posix_api->close_fn(listenfd);
|
||||
- return 0;
|
||||
+ posix_api->close_fn(listenfd);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
void concat_mbuf_and_queue_id(struct rte_mbuf *mbuf, uint16_t queue_id, char* mbuf_and_queue_id, int write_len){
|
||||
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
|
||||
index 331a23c..9180e89 100644
|
||||
--- a/src/ltran/ltran_dfx.c
|
||||
+++ b/src/ltran/ltran_dfx.c
|
||||
@@ -139,8 +139,8 @@ static void gazelle_print_lstack_xstats(void *buf, const struct gazelle_stat_msg
|
||||
|
||||
printf("###### NIC extended statistics for port %-2d #########\n", 0);
|
||||
printf("%s############################\n",nic_stats_border);
|
||||
- if (xstats->len <= 0) {
|
||||
- printf("Cannot get xstats\n");
|
||||
+ if (xstats->len <= 0 || xstats->len > RTE_ETH_XSTATS_MAX_LEN) {
|
||||
+ printf("xstats item(%d) num error!\n", xstats->len);
|
||||
return;
|
||||
}
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
322
0226-optimite-select_path-and-pbuf_take.patch
Normal file
322
0226-optimite-select_path-and-pbuf_take.patch
Normal file
@ -0,0 +1,322 @@
|
||||
From ff2512a2ac5000b3e0bedc4fd194d5f8a2b07887 Mon Sep 17 00:00:00 2001
|
||||
From: kircher <majun65@huawei.com>
|
||||
Date: Fri, 24 Mar 2023 19:30:09 +0800
|
||||
Subject: [PATCH] optimite select_path and pbuf_take
|
||||
|
||||
---
|
||||
src/lstack/api/lstack_wrap.c | 65 +++++++++++++++++++++-----------
|
||||
src/lstack/core/lstack_lwip.c | 22 ++++++++---
|
||||
src/lstack/include/lstack_lwip.h | 2 +-
|
||||
3 files changed, 60 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/src/lstack/api/lstack_wrap.c b/src/lstack/api/lstack_wrap.c
|
||||
index 5132ee9..1fe576f 100644
|
||||
--- a/src/lstack/api/lstack_wrap.c
|
||||
+++ b/src/lstack/api/lstack_wrap.c
|
||||
@@ -50,7 +50,7 @@ enum KERNEL_LWIP_PATH {
|
||||
PATH_UNKNOW,
|
||||
};
|
||||
|
||||
-static inline enum KERNEL_LWIP_PATH select_path(int fd)
|
||||
+static inline enum KERNEL_LWIP_PATH select_path(int fd, struct lwip_sock **socket)
|
||||
{
|
||||
if (unlikely(posix_api == NULL)) {
|
||||
/*
|
||||
@@ -75,6 +75,7 @@ static inline enum KERNEL_LWIP_PATH select_path(int fd)
|
||||
}
|
||||
|
||||
if (likely(CONN_TYPE_IS_LIBOS(sock->conn))) {
|
||||
+ *socket = sock;
|
||||
return PATH_LWIP;
|
||||
}
|
||||
|
||||
@@ -82,6 +83,7 @@ static inline enum KERNEL_LWIP_PATH select_path(int fd)
|
||||
/* after lwip connect, call send immediately, pcb->state is SYN_SENT, need return PATH_LWIP */
|
||||
/* pcb->state default value is CLOSED when call socket, need return PATH_UNKNOW */
|
||||
if (pcb != NULL && pcb->state <= ESTABLISHED && pcb->state >= LISTEN) {
|
||||
+ *socket = sock
|
||||
return PATH_LWIP;
|
||||
}
|
||||
|
||||
@@ -150,7 +152,8 @@ static inline int32_t do_epoll_wait(int32_t epfd, struct epoll_event* events, in
|
||||
|
||||
static inline int32_t do_accept(int32_t s, struct sockaddr *addr, socklen_t *addrlen)
|
||||
{
|
||||
- if (select_path(s) == PATH_KERNEL) {
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(s, &sock) == PATH_KERNEL) {
|
||||
return posix_api->accept_fn(s, addr, addrlen);
|
||||
}
|
||||
|
||||
@@ -168,7 +171,8 @@ static int32_t do_accept4(int32_t s, struct sockaddr *addr, socklen_t *addrlen,
|
||||
GAZELLE_RETURN(EINVAL);
|
||||
}
|
||||
|
||||
- if (select_path(s) == PATH_KERNEL) {
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(s, &sock) == PATH_KERNEL) {
|
||||
return posix_api->accept4_fn(s, addr, addrlen, flags);
|
||||
}
|
||||
|
||||
@@ -208,7 +212,8 @@ static int32_t do_bind(int32_t s, const struct sockaddr *name, socklen_t namelen
|
||||
GAZELLE_RETURN(EINVAL);
|
||||
}
|
||||
|
||||
- if (select_path(s) == PATH_KERNEL) {
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(s, &sock) == PATH_KERNEL) {
|
||||
return posix_api->bind_fn(s, name, namelen);
|
||||
}
|
||||
|
||||
@@ -263,11 +268,11 @@ static int32_t do_connect(int32_t s, const struct sockaddr *name, socklen_t name
|
||||
GAZELLE_RETURN(EINVAL);
|
||||
}
|
||||
|
||||
- if (select_path(s) == PATH_KERNEL) {
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(s, &sock) == PATH_KERNEL) {
|
||||
return posix_api->connect_fn(s, name, namelen);
|
||||
}
|
||||
|
||||
- struct lwip_sock *sock = get_socket(s);
|
||||
if (sock == NULL) {
|
||||
return posix_api->connect_fn(s, name, namelen);
|
||||
}
|
||||
@@ -293,7 +298,8 @@ static int32_t do_connect(int32_t s, const struct sockaddr *name, socklen_t name
|
||||
|
||||
static inline int32_t do_listen(int32_t s, int32_t backlog)
|
||||
{
|
||||
- if (select_path(s) == PATH_KERNEL) {
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(s, &sock) == PATH_KERNEL) {
|
||||
return posix_api->listen_fn(s, backlog);
|
||||
}
|
||||
|
||||
@@ -317,7 +323,8 @@ static inline int32_t do_getpeername(int32_t s, struct sockaddr *name, socklen_t
|
||||
GAZELLE_RETURN(EINVAL);
|
||||
}
|
||||
|
||||
- if (select_path(s) == PATH_LWIP) {
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(s, &sock) == PATH_LWIP) {
|
||||
return rpc_call_getpeername(s, name, namelen);
|
||||
}
|
||||
|
||||
@@ -330,7 +337,8 @@ static inline int32_t do_getsockname(int32_t s, struct sockaddr *name, socklen_t
|
||||
GAZELLE_RETURN(EINVAL);
|
||||
}
|
||||
|
||||
- if (select_path(s) == PATH_LWIP) {
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(s, &sock) == PATH_LWIP) {
|
||||
return rpc_call_getsockname(s, name, namelen);
|
||||
}
|
||||
|
||||
@@ -351,7 +359,8 @@ static bool unsupport_optname(int32_t optname)
|
||||
|
||||
static inline int32_t do_getsockopt(int32_t s, int32_t level, int32_t optname, void *optval, socklen_t *optlen)
|
||||
{
|
||||
- if (select_path(s) == PATH_LWIP && !unsupport_optname(optname)) {
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(s, &sock) == PATH_LWIP && !unsupport_optname(optname)) {
|
||||
return rpc_call_getsockopt(s, level, optname, optval, optlen);
|
||||
}
|
||||
|
||||
@@ -360,7 +369,8 @@ static inline int32_t do_getsockopt(int32_t s, int32_t level, int32_t optname, v
|
||||
|
||||
static inline int32_t do_setsockopt(int32_t s, int32_t level, int32_t optname, const void *optval, socklen_t optlen)
|
||||
{
|
||||
- if (select_path(s) == PATH_KERNEL || unsupport_optname(optname)) {
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(s, &sock) == PATH_KERNEL || unsupport_optname(optname)) {
|
||||
return posix_api->setsockopt_fn(s, level, optname, optval, optlen);
|
||||
}
|
||||
|
||||
@@ -393,7 +403,8 @@ static inline ssize_t do_recv(int32_t sockfd, void *buf, size_t len, int32_t fla
|
||||
return 0;
|
||||
}
|
||||
|
||||
- if (select_path(sockfd) == PATH_LWIP) {
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(sockfd, &sock) == PATH_LWIP) {
|
||||
return read_stack_data(sockfd, buf, len, flags);
|
||||
}
|
||||
|
||||
@@ -410,7 +421,8 @@ static inline ssize_t do_read(int32_t s, void *mem, size_t len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
- if (select_path(s) == PATH_LWIP) {
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(s, &sock) == PATH_LWIP) {
|
||||
return read_stack_data(s, mem, len, 0);
|
||||
}
|
||||
return posix_api->read_fn(s, mem, len);
|
||||
@@ -418,7 +430,8 @@ static inline ssize_t do_read(int32_t s, void *mem, size_t len)
|
||||
|
||||
static inline ssize_t do_readv(int32_t s, const struct iovec *iov, int iovcnt)
|
||||
{
|
||||
- if (select_path(s) != PATH_LWIP) {
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(s, &sock) != PATH_LWIP) {
|
||||
return posix_api->readv_fn(s, iov, iovcnt);
|
||||
}
|
||||
|
||||
@@ -441,7 +454,8 @@ static inline ssize_t do_readv(int32_t s, const struct iovec *iov, int iovcnt)
|
||||
|
||||
static inline ssize_t do_send(int32_t sockfd, const void *buf, size_t len, int32_t flags)
|
||||
{
|
||||
- if (select_path(sockfd) != PATH_LWIP) {
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(sockfd, &sock) != PATH_LWIP) {
|
||||
return posix_api->send_fn(sockfd, buf, len, flags);
|
||||
}
|
||||
|
||||
@@ -450,7 +464,8 @@ static inline ssize_t do_send(int32_t sockfd, const void *buf, size_t len, int32
|
||||
|
||||
static inline ssize_t do_write(int32_t s, const void *mem, size_t size)
|
||||
{
|
||||
- if (select_path(s) != PATH_LWIP) {
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(s, &sock) != PATH_LWIP) {
|
||||
return posix_api->write_fn(s, mem, size);
|
||||
}
|
||||
|
||||
@@ -459,7 +474,8 @@ static inline ssize_t do_write(int32_t s, const void *mem, size_t size)
|
||||
|
||||
static inline ssize_t do_writev(int32_t s, const struct iovec *iov, int iovcnt)
|
||||
{
|
||||
- if (select_path(s) != PATH_LWIP) {
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(s, &sock) != PATH_LWIP) {
|
||||
return posix_api->writev_fn(s, iov, iovcnt);
|
||||
}
|
||||
|
||||
@@ -472,7 +488,7 @@ static inline ssize_t do_writev(int32_t s, const struct iovec *iov, int iovcnt)
|
||||
msg.msg_control = NULL;
|
||||
msg.msg_controllen = 0;
|
||||
msg.msg_flags = 0;
|
||||
- return sendmsg_to_stack(s, &msg, 0);
|
||||
+ return sendmsg_to_stack(sock, s, &msg, 0);
|
||||
}
|
||||
|
||||
static inline ssize_t do_recvmsg(int32_t s, struct msghdr *message, int32_t flags)
|
||||
@@ -481,7 +497,8 @@ static inline ssize_t do_recvmsg(int32_t s, struct msghdr *message, int32_t flag
|
||||
GAZELLE_RETURN(EINVAL);
|
||||
}
|
||||
|
||||
- if (select_path(s) == PATH_LWIP) {
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(s, &sock) == PATH_LWIP) {
|
||||
return recvmsg_from_stack(s, message, flags);
|
||||
}
|
||||
|
||||
@@ -494,8 +511,9 @@ static inline ssize_t do_sendmsg(int32_t s, const struct msghdr *message, int32_
|
||||
GAZELLE_RETURN(EINVAL);
|
||||
}
|
||||
|
||||
- if (select_path(s) == PATH_LWIP) {
|
||||
- return sendmsg_to_stack(s, message, flags);
|
||||
+ struct lwip_sock *sock = NULL;
|
||||
+ if (select_path(s, &sock) == PATH_LWIP) {
|
||||
+ return sendmsg_to_stack(sock, s, message, flags);
|
||||
}
|
||||
|
||||
return posix_api->send_msg(s, message, flags);
|
||||
@@ -508,7 +526,7 @@ static inline int32_t do_close(int32_t s)
|
||||
return lstack_epoll_close(s);
|
||||
}
|
||||
|
||||
- if (select_path(s) == PATH_KERNEL) {
|
||||
+ if (select_path(s, &sock) == PATH_KERNEL) {
|
||||
return posix_api->close_fn(s);
|
||||
}
|
||||
|
||||
@@ -561,7 +579,8 @@ static int32_t do_sigaction(int32_t signum, const struct sigaction *act, struct
|
||||
va_start(ap, _cmd); \
|
||||
val = va_arg(ap, typeof(val)); \
|
||||
va_end(ap); \
|
||||
- if (select_path(_fd) == PATH_KERNEL) \
|
||||
+ struct lwip_sock *sock = NULL; \
|
||||
+ if (select_path(_fd, &sock) == PATH_KERNEL) \
|
||||
return _fcntl_fn(_fd, _cmd, val); \
|
||||
int32_t ret = _fcntl_fn(_fd, _cmd, val); \
|
||||
if (ret == -1) \
|
||||
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
|
||||
index a4e6e0b..71abbc6 100644
|
||||
--- a/src/lstack/core/lstack_lwip.c
|
||||
+++ b/src/lstack/core/lstack_lwip.c
|
||||
@@ -344,19 +344,28 @@ static ssize_t do_app_write(struct pbuf *pbufs[], void *buf, size_t len, uint32_
|
||||
{
|
||||
ssize_t send_len = 0;
|
||||
uint32_t i = 0;
|
||||
+ uint32_t expand_send_ring = get_global_cfg_params()->expand_send_ring;
|
||||
|
||||
for (i = 0; i < write_num - 1; i++) {
|
||||
rte_prefetch0(pbufs[i + 1]);
|
||||
rte_prefetch0(pbufs[i + 1]->payload);
|
||||
rte_prefetch0((char *)buf + send_len + MBUF_MAX_DATA_LEN);
|
||||
- pbuf_take(pbufs[i], (char *)buf + send_len, MBUF_MAX_DATA_LEN);
|
||||
+ if (expand_send_ring) {
|
||||
+ pbuf_take(pbufs[i], (char *)buf + send_len, MBUF_MAX_DATA_LEN);
|
||||
+ } else {
|
||||
+ rte_memcpy((char *)pbufs[i]->payload, (char *)buf + send_len, MBUF_MAX_DATA_LEN);
|
||||
+ }
|
||||
pbufs[i]->tot_len = pbufs[i]->len = MBUF_MAX_DATA_LEN;
|
||||
send_len += MBUF_MAX_DATA_LEN;
|
||||
}
|
||||
|
||||
/* reduce the branch in loop */
|
||||
uint16_t copy_len = len - send_len;
|
||||
- pbuf_take(pbufs[i], (char *)buf + send_len, copy_len);
|
||||
+ if (expand_send_ring) {
|
||||
+ pbuf_take(pbufs[i], (char *)buf + send_len, copy_len);
|
||||
+ } else {
|
||||
+ rte_memcpy((char *)pbufs[i]->payload, (char *)buf + send_len, copy_len);
|
||||
+ }
|
||||
pbufs[i]->tot_len = pbufs[i]->len = copy_len;
|
||||
send_len += copy_len;
|
||||
|
||||
@@ -500,7 +509,11 @@ static inline size_t merge_data_lastpbuf(struct lwip_sock *sock, void *buf, size
|
||||
|
||||
uint16_t offset = last_pbuf->len;
|
||||
last_pbuf->tot_len = last_pbuf->len = offset + send_len;
|
||||
- pbuf_take_at(last_pbuf, buf, send_len, offset);
|
||||
+ if (get_global_cfg_params()->expand_send_ring) {
|
||||
+ pbuf_take_at(last_pbuf, buf, send_len, offset);
|
||||
+ } else {
|
||||
+ rte_memcpy((char *)last_pbuf->payload + offset, buf, send_len);
|
||||
+ }
|
||||
|
||||
gazelle_ring_lastover(last_pbuf);
|
||||
|
||||
@@ -924,12 +937,11 @@ ssize_t gazelle_send(int32_t fd, const void *buf, size_t len, int32_t flags)
|
||||
return send;
|
||||
}
|
||||
|
||||
-ssize_t sendmsg_to_stack(int32_t s, const struct msghdr *message, int32_t flags)
|
||||
+ssize_t sendmsg_to_stack(struct lwip_sock *sock, int32_t s, const struct msghdr *message, int32_t flags)
|
||||
{
|
||||
int32_t ret;
|
||||
int32_t i;
|
||||
ssize_t buflen = 0;
|
||||
- struct lwip_sock *sock = get_socket_by_fd(s);
|
||||
|
||||
if (check_msg_vaild(message)) {
|
||||
GAZELLE_RETURN(EINVAL);
|
||||
diff --git a/src/lstack/include/lstack_lwip.h b/src/lstack/include/lstack_lwip.h
|
||||
index d52a06d..0b29e71 100644
|
||||
--- a/src/lstack/include/lstack_lwip.h
|
||||
+++ b/src/lstack/include/lstack_lwip.h
|
||||
@@ -43,7 +43,7 @@ void stack_send(struct rpc_msg *msg);
|
||||
void app_rpc_write(struct rpc_msg *msg);
|
||||
int32_t gazelle_alloc_pktmbuf(struct rte_mempool *pool, struct rte_mbuf **mbufs, uint32_t num);
|
||||
void gazelle_free_pbuf(struct pbuf *pbuf);
|
||||
-ssize_t sendmsg_to_stack(int32_t s, const struct msghdr *message, int32_t flags);
|
||||
+ssize_t sendmsg_to_stack(struct lwip_sock *sock, int32_t s, const struct msghdr *message, int32_t flags);
|
||||
ssize_t recvmsg_from_stack(int32_t s, struct msghdr *message, int32_t flags);
|
||||
ssize_t gazelle_send(int32_t fd, const void *buf, size_t len, int32_t flags);
|
||||
void rpc_replenish(struct rpc_msg *msg);
|
||||
--
|
||||
2.33.0
|
||||
|
||||
12
gazelle.spec
12
gazelle.spec
@ -2,7 +2,7 @@
|
||||
|
||||
Name: gazelle
|
||||
Version: 1.0.1
|
||||
Release: 58
|
||||
Release: 59
|
||||
Summary: gazelle is a high performance user-mode stack
|
||||
License: MulanPSL-2.0
|
||||
URL: https://gitee.com/openeuler/gazelle
|
||||
@ -237,6 +237,10 @@ Patch9219: 0219-fix-parse-args-error.patch
|
||||
Patch9220: 0220-gazelle-send-recv-thread-bind-numa.patch
|
||||
Patch9221: 0221-waiting-when-primary-process-not-start-already.patch
|
||||
Patch9222: 0222-do-not-transfer-broadcast-arp-pkts-to-other-process.patch
|
||||
Patch9223: 0223-revert-select_thread_path-and-optimize-app-thread-wh.patch
|
||||
Patch9224: 0224-sepeate_string_to-array-add-error-args-handle.patch
|
||||
Patch9225: 0225-check-primary-process-idx-and-secondary-lstack-num.patch
|
||||
Patch9226: 0226-optimite-select_path-and-pbuf_take.patch
|
||||
|
||||
%description
|
||||
%{name} is a high performance user-mode stack.
|
||||
@ -277,6 +281,12 @@ install -Dpm 0640 %{_builddir}/%{name}-%{version}/src/ltran/ltran.conf %{b
|
||||
%config(noreplace) %{conf_path}/ltran.conf
|
||||
|
||||
%changelog
|
||||
* Mon Mar 27 2023 kircher <majun65@huawei.com> - 1.0.1-59
|
||||
- optimite select_path and pbuf_take
|
||||
- check primary process idx and secondary lstack num
|
||||
- sepeate_string_to array add error args handle
|
||||
- revert select_thread_path and optimize app thread when sendmsg
|
||||
|
||||
* Wed Mar 22 2023 kircher <majun65@huawei.com> - 1.0.1-58
|
||||
- do not transfer broadcast arp pkts to other process
|
||||
- waiting when primary process not start already
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user