!690 [sync] PR-688: sync adpat dpdk 23.11

From: @openeuler-sync-bot 
Reviewed-by: @jiangheng12 
Signed-off-by: @jiangheng12
This commit is contained in:
openeuler-ci-bot 2024-01-20 08:47:17 +00:00 committed by Gitee
commit d8a3fbe695
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
9 changed files with 1448 additions and 1 deletions

View File

@ -0,0 +1,51 @@
From 0fddaa74aa71ec25ee9cb1db141dd8a778e6e76d Mon Sep 17 00:00:00 2001
From: zhengjiebing <zhengjiebing_yewu@cmss.chinamobile.com>
Date: Mon, 8 Jan 2024 15:08:24 +0800
Subject: [PATCH] listen_shadow support ipv6
---
src/lstack/core/lstack_protocol_stack.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/lstack/core/lstack_protocol_stack.c b/src/lstack/core/lstack_protocol_stack.c
index f849bcd..e7b541e 100644
--- a/src/lstack/core/lstack_protocol_stack.c
+++ b/src/lstack/core/lstack_protocol_stack.c
@@ -1128,9 +1128,15 @@ int32_t stack_single_listen(int32_t fd, int32_t backlog)
/* listen sync to all protocol stack thread, so that any protocol stack thread can build connect */
int32_t stack_broadcast_listen(int32_t fd, int32_t backlog)
{
+ typedef union sockaddr_union {
+ struct sockaddr sa;
+ struct sockaddr_in in;
+ struct sockaddr_in6 in6;
+ } sockaddr_t;
+
struct protocol_stack *cur_stack = get_protocol_stack_by_fd(fd);
struct protocol_stack *stack = NULL;
- struct sockaddr addr;
+ sockaddr_t addr;
socklen_t addr_len = sizeof(addr);
int32_t ret, clone_fd;
@@ -1140,7 +1146,7 @@ int32_t stack_broadcast_listen(int32_t fd, int32_t backlog)
GAZELLE_RETURN(EINVAL);
}
- ret = rpc_call_getsockname(fd, &addr, &addr_len);
+ ret = rpc_call_getsockname(fd, (struct sockaddr *)&addr, &addr_len);
if (ret != 0) {
return ret;
}
@@ -1154,7 +1160,7 @@ int32_t stack_broadcast_listen(int32_t fd, int32_t backlog)
continue;
}
if (stack != cur_stack) {
- clone_fd = rpc_call_shadow_fd(stack, fd, &addr, sizeof(addr));
+ clone_fd = rpc_call_shadow_fd(stack, fd, (struct sockaddr *)&addr, addr_len);
if (clone_fd < 0) {
stack_broadcast_close(fd);
return clone_fd;
--
2.33.0

View File

@ -0,0 +1,78 @@
From aa0bd688a6dae115e136771fda747c9428e65561 Mon Sep 17 00:00:00 2001
From: yangchen <yangchen145@huawei.com>
Date: Tue, 2 Jan 2024 09:32:00 +0800
Subject: [PATCH] lstack_dpdk: limit mbuf max num
---
src/lstack/core/lstack_dpdk.c | 5 +++++
src/lstack/include/lstack_dpdk.h | 18 ++++++++----------
src/ltran/main.c | 2 +-
3 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/lstack/core/lstack_dpdk.c b/src/lstack/core/lstack_dpdk.c
index 729a84c..580dd1d 100644
--- a/src/lstack/core/lstack_dpdk.c
+++ b/src/lstack/core/lstack_dpdk.c
@@ -155,6 +155,11 @@ struct rte_mempool *create_pktmbuf_mempool(const char *name, uint32_t nb_mbuf,
LSTACK_LOG(ERR, LSTACK, "snprintf_s fail ret=%d \n", ret);
return NULL;
}
+ /* limit mbuf max num based on the dpdk capability */
+ if (nb_mbuf > MBUF_MAX_NUM) {
+ LSTACK_LOG(ERR, LSTACK, "out of the dpdk mbuf quantity range\n");
+ return NULL;
+ }
/* time stamp before pbuf_custom as priv_data */
uint16_t private_size = RTE_ALIGN(sizeof(struct mbuf_private), RTE_CACHE_LINE_SIZE);
diff --git a/src/lstack/include/lstack_dpdk.h b/src/lstack/include/lstack_dpdk.h
index 4a160e0..2a44c6e 100644
--- a/src/lstack/include/lstack_dpdk.h
+++ b/src/lstack/include/lstack_dpdk.h
@@ -17,22 +17,20 @@
#include "gazelle_opt.h"
#include "gazelle_dfx_msg.h"
-#define RXTX_CACHE_SZ (VDEV_RX_QUEUE_SZ)
-#define KNI_NB_MBUF (DEFAULT_RING_SIZE << 4)
+#define RXTX_CACHE_SZ (VDEV_RX_QUEUE_SZ)
-#define RESERVE_NIC_RECV (1024)
+#define KNI_NB_MBUF (DEFAULT_RING_SIZE << 4)
-#define MBUF_HEADER_LEN 64
-
-#define MAX_PACKET_SZ 2048
+#define MAX_PACKET_SZ 2048
#define RING_SIZE(x) ((x) - 1)
-#define MBUF_SZ (MAX_PACKET_SZ + RTE_PKTMBUF_HEADROOM)
+#define MBUF_SZ (MAX_PACKET_SZ + RTE_PKTMBUF_HEADROOM)
-#define MAX_CORE_NUM 256
-#define CALL_MSG_RING_SIZE (unsigned long long)32
-#define CALL_CACHE_SZ 0
+/* DPDK limit ring head-tail distance in rte_ring_init.
+ * Max value is RTE_RING_SZ_MASK / HTD_MAX_DEF, RTE_RING_SZ_MASK is 0x7fffffff, HTD_MAX_DEF is 8.
+ */
+#define MBUF_MAX_NUM 0xfffffff
int thread_affinity_default(void);
int thread_affinity_init(int cpu_id);
diff --git a/src/ltran/main.c b/src/ltran/main.c
index 87f1e14..c2598a7 100644
--- a/src/ltran/main.c
+++ b/src/ltran/main.c
@@ -55,7 +55,7 @@ static void print_stack(void)
static void sig_default_handler(int32_t sig)
{
- LTRAN_ERR("ltran dumpedcaught signal%d.\n", sig);
+ LTRAN_ERR("ltran dumped, caught signal: %d.\n", sig);
print_stack();
dpdk_kni_release();
int ret = 0;
--
2.33.0

View File

@ -0,0 +1,66 @@
From 295ad7d27233404457488089453a51d39e4d8038 Mon Sep 17 00:00:00 2001
From: yangchen <yangchen145@huawei.com>
Date: Mon, 8 Jan 2024 09:12:59 +0800
Subject: [PATCH] gazellectl: add tcp_input empty ack cnt
---
src/common/gazelle_dfx_msg.h | 1 +
src/ltran/ltran_dfx.c | 29 +++++++++++++++--------------
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/src/common/gazelle_dfx_msg.h b/src/common/gazelle_dfx_msg.h
index 478c440..d58a072 100644
--- a/src/common/gazelle_dfx_msg.h
+++ b/src/common/gazelle_dfx_msg.h
@@ -143,6 +143,7 @@ struct gazelle_stat_lstack_snmp {
uint32_t tcp_out_of_seq;
uint32_t tcp_acceptmbox_full;
uint32_t tcp_listen_drops;
+ uint32_t tcp_in_empty_acks;
/* UDP */
uint32_t udp_in_datagrams;
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
index 08c9da3..5d4e74c 100644
--- a/src/ltran/ltran_dfx.c
+++ b/src/ltran/ltran_dfx.c
@@ -855,21 +855,22 @@ static void gazelle_print_lstack_stat_rate(void *buf, const struct gazelle_stat_
static void gazelle_print_lstack_tcp_stat(const struct gazelle_stat_lstack_snmp *snmp)
{
- printf("tcp_act_open: %u\n", snmp->tcp_act_open);
- printf("tcp_passive_open: %u\n", snmp->tcp_passive_open);
- printf("tcp_attempt_fail: %u\n", snmp->tcp_attempt_fail);
- printf("tcp_estab_rst: %u\n", snmp->tcp_estab_rst);
- printf("tcp_out_seg: %u\n", snmp->tcp_out_seg);
- printf("tcp_retran_seg: %u\n", snmp->tcp_retran_seg);
- printf("tcp_in_seg: %u\n", snmp->tcp_in_seg);
- printf("tcp_in_err: %u\n", snmp->tcp_in_err);
- printf("tcp_out_rst: %u\n", snmp->tcp_out_rst);
- printf("tcp_fin_ack_cnt: %u\n", snmp->tcp_fin_ack_cnt);
- printf("tcp_delay_ack_cnt: %u\n", snmp->tcp_delay_ack_cnt);
- printf("tcp_refused_cnt: %u\n", snmp->tcp_refused_cnt);
- printf("tcp_out_of_seq: %u\n", snmp->tcp_out_of_seq);
+ printf("tcp_act_open: %u\n", snmp->tcp_act_open);
+ printf("tcp_passive_open: %u\n", snmp->tcp_passive_open);
+ printf("tcp_attempt_fail: %u\n", snmp->tcp_attempt_fail);
+ printf("tcp_estab_rst: %u\n", snmp->tcp_estab_rst);
+ printf("tcp_out_seg: %u\n", snmp->tcp_out_seg);
+ printf("tcp_retran_seg: %u\n", snmp->tcp_retran_seg);
+ printf("tcp_in_seg: %u\n", snmp->tcp_in_seg);
+ printf("tcp_in_err: %u\n", snmp->tcp_in_err);
+ printf("tcp_out_rst: %u\n", snmp->tcp_out_rst);
+ printf("tcp_fin_ack_cnt: %u\n", snmp->tcp_fin_ack_cnt);
+ printf("tcp_delay_ack_cnt: %u\n", snmp->tcp_delay_ack_cnt);
+ printf("tcp_refused_cnt: %u\n", snmp->tcp_refused_cnt);
+ printf("tcp_out_of_seq: %u\n", snmp->tcp_out_of_seq);
printf("tcp_acceptmbox_full: %u\n", snmp->tcp_acceptmbox_full);
- printf("tcp_listen_drops: %u\n", snmp->tcp_listen_drops);
+ printf("tcp_listen_drops: %u\n", snmp->tcp_listen_drops);
+ printf("tcp_in_empty_acks: %u\n", snmp->tcp_in_empty_acks);
}
static void gazelle_print_ltran_stat_lb_rate(void *buf, const struct gazelle_stat_msg_request *req_msg)
--
2.33.0

View File

@ -0,0 +1,54 @@
From 53457e3ab329eb944579ffe55ddc4435e0bca0a1 Mon Sep 17 00:00:00 2001
From: hantwofish <hankangkang5@huawei.com>
Date: Wed, 10 Jan 2024 09:12:34 +0800
Subject: [PATCH] add socket accept fail cnt
---
src/common/gazelle_dfx_msg.h | 1 +
src/lstack/core/lstack_protocol_stack.c | 2 ++
src/ltran/ltran_dfx.c | 1 +
3 files changed, 4 insertions(+)
diff --git a/src/common/gazelle_dfx_msg.h b/src/common/gazelle_dfx_msg.h
index 478c440..1d3249d 100644
--- a/src/common/gazelle_dfx_msg.h
+++ b/src/common/gazelle_dfx_msg.h
@@ -72,6 +72,7 @@ struct gazelle_stack_stat {
uint64_t tx_drop;
uint64_t tx;
uint64_t tx_prepare_fail;
+ uint64_t accept_fail;
};
struct gazelle_wakeup_stat {
diff --git a/src/lstack/core/lstack_protocol_stack.c b/src/lstack/core/lstack_protocol_stack.c
index f849bcd..0d845dd 100644
--- a/src/lstack/core/lstack_protocol_stack.c
+++ b/src/lstack/core/lstack_protocol_stack.c
@@ -792,9 +792,11 @@ void stack_accept(struct rpc_msg *msg)
{
int32_t fd = msg->args[MSG_ARG_0].i;
msg->result = -1;
+ struct protocol_stack *stack = get_protocol_stack();
int32_t accept_fd = lwip_accept4(fd, msg->args[MSG_ARG_1].p, msg->args[MSG_ARG_2].p, msg->args[MSG_ARG_3].i);
if (accept_fd < 0) {
+ stack->stats.accept_fail++;
LSTACK_LOG(ERR, LSTACK, "fd %d ret %d\n", fd, accept_fd);
return;
}
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
index 5e22e20..461912f 100644
--- a/src/ltran/ltran_dfx.c
+++ b/src/ltran/ltran_dfx.c
@@ -646,6 +646,7 @@ static void show_lstack_stats(struct gazelle_stack_dfx_data *lstack_stat)
printf("send_pkts_fail: %-13"PRIu64" ", lstack_stat->data.pkts.stack_stat.send_pkts_fail);
printf("mbuf_pool_freecnt: %-10"PRIu32" ", lstack_stat->data.pkts.mbufpool_avail_cnt);
printf("rpc_pool_freecnt: %-12"PRIu32" \n", lstack_stat->data.pkts.rpcpool_avail_cnt);
+ printf("accpet_fail: %-12"PRIu64" \n", lstack_stat->data.pkts.stack_stat.accept_fail);
}
static void gazelle_print_lstack_stat_detail(struct gazelle_stack_dfx_data *lstack_stat,
--
2.33.0

View File

@ -0,0 +1,137 @@
From db89062f34f8bcccf80a82d6589e5f3b5bc63cfe Mon Sep 17 00:00:00 2001
From: yinbin <yinbin8@huawei.com>
Date: Sat, 13 Jan 2024 17:03:07 +0800
Subject: [PATCH] diff lstack and ltran dfx sock
---
src/common/gazelle_opt.h | 9 +++++++--
src/lstack/core/lstack_cfg.c | 10 ++++++++--
src/ltran/ltran_base.h | 3 ---
src/ltran/ltran_dfx.c | 8 ++++----
src/ltran/ltran_monitor.c | 8 ++++----
src/ltran/ltran_param.c | 4 ++--
6 files changed, 25 insertions(+), 17 deletions(-)
diff --git a/src/common/gazelle_opt.h b/src/common/gazelle_opt.h
index 36915c6..1d1c5f5 100644
--- a/src/common/gazelle_opt.h
+++ b/src/common/gazelle_opt.h
@@ -85,8 +85,13 @@
#define GAZELLE_MAX_STACK_ARRAY_SIZE GAZELLE_CLIENT_NUM
-#define GAZELLE_REG_SOCK_PATHNAME "/var/run/gazelle/gazelle_client.sock"
-#define GAZELLE_REG_SOCK_FILENAME "gazelle_client.sock"
+#define LTRAN_REG_SOCK_PATHNAME "/var/run/gazelle/ltran_client.sock"
+#define LTRAN_REG_SOCK_FILENAME "ltran_client.sock"
+#define LTRAN_DFX_SOCK_PATHNAME "/var/run/gazelle/ltran_cmd.sock"
+#define LTRAN_DFX_SOCK_FILENAME "ltran_cmd.sock"
+#define LSTACK_DFX_SOCK_PATHNAME "/var/run/gazelle/lstack_cmd.sock"
+#define LSTACK_DFX_SOCK_FILENAME "lstack_cmd.sock"
+
#define GAZELLE_SOCK_FILENAME_MAXLEN 128
#define GAZELLE_RUN_DIR "/var/run/gazelle/"
diff --git a/src/lstack/core/lstack_cfg.c b/src/lstack/core/lstack_cfg.c
index c1f5680..87df790 100644
--- a/src/lstack/core/lstack_cfg.c
+++ b/src/lstack/core/lstack_cfg.c
@@ -1043,8 +1043,14 @@ static int32_t parse_unix_prefix(void)
}
}
- ret = strncat_s(g_config_params.unix_socket_filename, sizeof(g_config_params.unix_socket_filename),
- GAZELLE_REG_SOCK_FILENAME, strlen(GAZELLE_REG_SOCK_FILENAME) + 1);
+ if (g_config_params.use_ltran) {
+ ret = strncat_s(g_config_params.unix_socket_filename, sizeof(g_config_params.unix_socket_filename),
+ LTRAN_REG_SOCK_FILENAME, strlen(LTRAN_REG_SOCK_FILENAME) + 1);
+ } else {
+ ret = strncat_s(g_config_params.unix_socket_filename, sizeof(g_config_params.unix_socket_filename),
+ LSTACK_DFX_SOCK_FILENAME, strlen(LSTACK_DFX_SOCK_FILENAME) + 1);
+ }
+
if (ret != EOK) {
return ret;
}
diff --git a/src/ltran/ltran_base.h b/src/ltran/ltran_base.h
index 6be9152..f174a40 100644
--- a/src/ltran/ltran_base.h
+++ b/src/ltran/ltran_base.h
@@ -98,7 +98,4 @@
#define GAZELLE_INET_ADDRSTRLEN 16
-#define GAZELLE_DFX_SOCK_PATHNAME "/var/run/gazelle/gazelle_cmd.sock"
-#define GAZELLE_DFX_SOCK_FILENAME "gazelle_cmd.sock"
-
#endif /* ifndef __GAZELLE_BASE_H__ */
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
index a64c1d5..05234de 100644
--- a/src/ltran/ltran_dfx.c
+++ b/src/ltran/ltran_dfx.c
@@ -254,15 +254,15 @@ static int32_t dfx_connect_ltran(bool use_ltran, bool probe)
addr.sun_family = AF_UNIX;
if (use_ltran) {
- ret = strncat_s(addr.sun_path, sizeof(addr.sun_path), GAZELLE_DFX_SOCK_FILENAME,
- strlen(GAZELLE_DFX_SOCK_FILENAME) + 1);
+ ret = strncat_s(addr.sun_path, sizeof(addr.sun_path), LTRAN_DFX_SOCK_FILENAME,
+ strlen(LTRAN_DFX_SOCK_FILENAME) + 1);
if (ret != EOK) {
printf("%s:%d strncat_s fail ret=%d\n", __FUNCTION__, __LINE__, ret);
goto END;
}
} else {
- ret = strncat_s(addr.sun_path, sizeof(addr.sun_path), GAZELLE_REG_SOCK_FILENAME,
- strlen(GAZELLE_REG_SOCK_FILENAME) + 1);
+ ret = strncat_s(addr.sun_path, sizeof(addr.sun_path), LSTACK_DFX_SOCK_FILENAME,
+ strlen(LSTACK_DFX_SOCK_FILENAME) + 1);
if (ret != EOK) {
printf("%s:%d strncat_s fail ret=%d\n", __FUNCTION__, __LINE__, ret);
goto END;
diff --git a/src/ltran/ltran_monitor.c b/src/ltran/ltran_monitor.c
index b2bcc07..ea31e84 100644
--- a/src/ltran/ltran_monitor.c
+++ b/src/ltran/ltran_monitor.c
@@ -238,13 +238,13 @@ static void gazelle_ctl_destroy(void)
close(g_epoll_fd);
g_epoll_fd = -1;
- ret = unlink(GAZELLE_DFX_SOCK_PATHNAME);
+ ret = unlink(LTRAN_DFX_SOCK_PATHNAME);
if (ret != 0) {
- LTRAN_WARN("unlink %s ERROR. errno: %d. ret=%d\n", GAZELLE_DFX_SOCK_PATHNAME, errno, ret);
+ LTRAN_WARN("unlink %s ERROR. errno: %d. ret=%d\n", LTRAN_DFX_SOCK_PATHNAME, errno, ret);
}
- ret = unlink(GAZELLE_REG_SOCK_PATHNAME);
+ ret = unlink(LTRAN_REG_SOCK_PATHNAME);
if (ret != 0) {
- LTRAN_WARN("unlink %s ERROR. errno: %d. ret=%d\n", GAZELLE_REG_SOCK_PATHNAME, errno, ret);
+ LTRAN_WARN("unlink %s ERROR. errno: %d. ret=%d\n", LTRAN_REG_SOCK_PATHNAME, errno, ret);
}
}
diff --git a/src/ltran/ltran_param.c b/src/ltran/ltran_param.c
index 1eaace4..bd5a8e1 100644
--- a/src/ltran/ltran_param.c
+++ b/src/ltran/ltran_param.c
@@ -598,14 +598,14 @@ static int32_t parse_unix_prefix(const config_t *config, const char *key, struct
}
ret = strncat_s(ltran_config->unix_socket_filename, sizeof(ltran_config->unix_socket_filename),
- GAZELLE_REG_SOCK_FILENAME, strlen(GAZELLE_REG_SOCK_FILENAME) + 1);
+ LTRAN_REG_SOCK_FILENAME, strlen(LTRAN_REG_SOCK_FILENAME) + 1);
if (ret != EOK) {
gazelle_set_errno(GAZELLE_EINETATON);
return GAZELLE_ERR;
}
ret = strncat_s(ltran_config->dfx_socket_filename, sizeof(ltran_config->dfx_socket_filename),
- GAZELLE_DFX_SOCK_FILENAME, strlen(GAZELLE_DFX_SOCK_FILENAME) + 1);
+ LTRAN_DFX_SOCK_FILENAME, strlen(LTRAN_DFX_SOCK_FILENAME) + 1);
if (ret != EOK) {
gazelle_set_errno(GAZELLE_EINETATON);
return GAZELLE_ERR;
--
2.33.0

View File

@ -0,0 +1,29 @@
From 7c8d80e76f93029437f9a52f04c9d02b0d55dd78 Mon Sep 17 00:00:00 2001
From: zhengjiebing <zhengjiebing_yewu@cmss.chinamobile.com>
Date: Tue, 16 Jan 2024 23:52:23 +0800
Subject: [PATCH] fix host_addr6 can be assigned a multicast address
---
src/lstack/core/lstack_cfg.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/lstack/core/lstack_cfg.c b/src/lstack/core/lstack_cfg.c
index 87df790..5e30e89 100644
--- a/src/lstack/core/lstack_cfg.c
+++ b/src/lstack/core/lstack_cfg.c
@@ -250,6 +250,12 @@ static int32_t parse_host_addr6(void)
if (ip6addr_aton(value, &g_config_params.host_addr6) == 0) {
return -EINVAL;
}
+
+ if (ip6_addr_ismulticast(&g_config_params.host_addr6)) {
+ LSTACK_PRE_LOG(LSTACK_ERR, "cfg: host_addr6 cannot be a multicast address.");
+ return -EINVAL;
+ }
+
return 0;
}
--
2.33.0

View File

@ -0,0 +1,45 @@
From b90801a943f140a62761158a058d1076212dccf3 Mon Sep 17 00:00:00 2001
From: yangchen <yangchen145@huawei.com>
Date: Thu, 18 Jan 2024 10:01:52 +0800
Subject: [PATCH] udp: do not merge data into last pbuf
---
src/lstack/core/lstack_lwip.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
index 87ec1f5..6ebe589 100644
--- a/src/lstack/core/lstack_lwip.c
+++ b/src/lstack/core/lstack_lwip.c
@@ -542,14 +542,14 @@ static ssize_t do_lwip_fill_sendring(struct lwip_sock *sock, const void *buf, si
}
struct protocol_stack *stack = sock->stack;
- if (!stack|| len == 0) {
+ if (!stack || len == 0) {
return 0;
}
ssize_t send_len = 0;
/* merge data into last pbuf */
- if (sock->remain_len) {
+ if (!NETCONN_IS_UDP(sock) && sock->remain_len) {
send_len = merge_data_lastpbuf(sock, (char *)buf, len);
if (send_len >= len) {
send_len = len;
@@ -1045,6 +1045,11 @@ ssize_t do_lwip_read_from_stack(int32_t fd, void *buf, size_t len, int32_t flags
calculate_lstack_latency(&sock->stack->latency, pbuf, GAZELLE_LATENCY_READ);
}
gazelle_ring_read_over(sock->recv_ring);
+
+ /* in udp, if pbuf remaining len less than copy_len, discard these packets */
+ if (recvd > 0 && NETCONN_IS_UDP(sock)) {
+ break;
+ }
}
}
--
2.33.0

969
0119-adpat-dpdk-23.11.patch Normal file
View File

@ -0,0 +1,969 @@
From bbb97803a36a5de0bb6ca6ce0518a6ef0666a22b Mon Sep 17 00:00:00 2001
From: jiangheng <jiangheng14@huawei.com>
Date: Mon, 15 Jan 2024 09:37:20 +0800
Subject: [PATCH] adpat dpdk 23.11
---
src/common/dpdk_common.c | 171 +++++++++++----------
src/common/gazelle_parse_config.c | 1 +
src/lstack/Makefile | 50 +++---
src/lstack/core/lstack_dpdk.c | 34 ++--
src/lstack/core/lstack_init.c | 2 +
src/lstack/core/lstack_protocol_stack.c | 12 +-
src/lstack/include/lstack_ethdev.h | 8 +
src/lstack/include/lstack_protocol_stack.h | 1 -
src/lstack/netif/lstack_ethdev.c | 8 +
src/lstack/netif/lstack_vdev.c | 4 +-
src/ltran/CMakeLists.txt | 33 +++-
src/ltran/ltran_dfx.c | 20 +--
src/ltran/ltran_ethdev.c | 29 +++-
src/ltran/ltran_forward.c | 14 ++
src/ltran/ltran_stack.c | 1 +
src/ltran/ltran_timer.c | 1 +
src/ltran/main.c | 6 +
17 files changed, 254 insertions(+), 141 deletions(-)
diff --git a/src/common/dpdk_common.c b/src/common/dpdk_common.c
index 62278c2..c0c4f63 100644
--- a/src/common/dpdk_common.c
+++ b/src/common/dpdk_common.c
@@ -10,18 +10,21 @@
* See the Mulan PSL v2 for more details.
*/
-#include <rte_kni.h>
+#include <securec.h>
#include <rte_bus_pci.h>
#include <rte_ethdev.h>
#include <rte_bus_pci.h>
#include <rte_mbuf.h>
#include <rte_ethdev.h>
-#include <securec.h>
+#include <rte_version.h>
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
+#include <rte_kni.h>
+#endif
+
+#include <lwip/dpdk_version.h>
#include "dpdk_common.h"
-#define GAZELLE_KNI_IFACES_NUM 1
-#define GAZELLE_KNI_READ_SIZE 32
#define GAZELLE_MAX_PKT_SZ 2048
#ifdef LTRAN_COMPILE
@@ -34,6 +37,9 @@
#define COMMON_INFO(fmt, ...) LSTACK_LOG(INFO, LSTACK, fmt, ##__VA_ARGS__)
#endif
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
+#define GAZELLE_KNI_IFACES_NUM 1
+#define GAZELLE_KNI_READ_SIZE 32
struct rte_kni *g_pkni = NULL;
static volatile bool g_kni_started = false;
@@ -79,84 +85,6 @@ static int32_t kni_config_network_interface(uint16_t port_id, uint8_t if_up)
return ret;
}
-void eth_params_checksum(struct rte_eth_conf *conf, struct rte_eth_dev_info *dev_info)
-{
- uint64_t rx_ol = 0;
- uint64_t tx_ol = 0;
- uint64_t rx_ol_capa = dev_info->rx_offload_capa;
- uint64_t tx_ol_capa = dev_info->tx_offload_capa;
-
- // rx ip
- if (rx_ol_capa & DEV_RX_OFFLOAD_IPV4_CKSUM) {
- rx_ol |= DEV_RX_OFFLOAD_IPV4_CKSUM;
- COMMON_INFO("DEV_RX_OFFLOAD_IPV4_CKSUM\n");
- }
-
- // rx tcp
- if (rx_ol_capa & DEV_RX_OFFLOAD_TCP_CKSUM) {
- rx_ol |= DEV_RX_OFFLOAD_TCP_CKSUM;
- COMMON_INFO("DEV_RX_OFFLOAD_TCP_CKSUM\n");
- }
-
- // rx udp
- if (rx_ol_capa & DEV_RX_OFFLOAD_UDP_CKSUM) {
- rx_ol |= DEV_RX_OFFLOAD_UDP_CKSUM;
- COMMON_INFO("DEV_RX_OFFLOAD_UDP_CKSUM\n");
- }
-
- // rx vlan
- if (rx_ol_capa & DEV_RX_OFFLOAD_VLAN_STRIP) {
- rx_ol |= DEV_RX_OFFLOAD_VLAN_STRIP;
- COMMON_INFO("DEV_RX_OFFLOAD_VLAN_STRIP\n");
- }
-
- // tx ip
- if (tx_ol_capa & DEV_TX_OFFLOAD_IPV4_CKSUM) {
- tx_ol |= DEV_TX_OFFLOAD_IPV4_CKSUM;
- COMMON_INFO("DEV_TX_OFFLOAD_IPV4_CKSUM\n");
- }
-
- // tx tcp
- if (tx_ol_capa & DEV_TX_OFFLOAD_TCP_CKSUM) {
- tx_ol |= DEV_TX_OFFLOAD_TCP_CKSUM;
- COMMON_INFO("DEV_TX_OFFLOAD_TCP_CKSUM\n");
- }
-
- // tx udp
- if (tx_ol_capa & DEV_TX_OFFLOAD_UDP_CKSUM) {
- tx_ol |= DEV_TX_OFFLOAD_UDP_CKSUM;
- COMMON_INFO("DEV_TX_OFFLOAD_UDP_CKSUM\n");
- }
-
- // tx tso
- if (tx_ol_capa & DEV_TX_OFFLOAD_TCP_TSO) {
- tx_ol |= (DEV_TX_OFFLOAD_TCP_TSO | DEV_TX_OFFLOAD_MULTI_SEGS);
- COMMON_INFO("DEV_TX_OFFLOAD_TCP_TSO\n");
- }
-
- // tx vlan
- if (tx_ol_capa & DEV_TX_OFFLOAD_VLAN_INSERT) {
- tx_ol |= DEV_TX_OFFLOAD_VLAN_INSERT;
- COMMON_INFO("DEV_TX_OFFLOAD_VLAN_INSERT\n");
- }
-
- if (!(rx_ol & DEV_RX_OFFLOAD_UDP_CKSUM) ||
- !(rx_ol & DEV_RX_OFFLOAD_TCP_CKSUM) ||
- !(rx_ol & DEV_RX_OFFLOAD_IPV4_CKSUM)) {
- rx_ol = 0;
- }
- if (!(tx_ol & DEV_TX_OFFLOAD_UDP_CKSUM) ||
- !(tx_ol & DEV_TX_OFFLOAD_TCP_CKSUM) ||
- !(tx_ol & DEV_TX_OFFLOAD_IPV4_CKSUM)) {
- tx_ol = 0;
- }
-
- conf->rxmode.offloads = rx_ol;
- conf->txmode.offloads = tx_ol;
-
- COMMON_INFO("Set checksum offloads\n");
-}
-
int32_t dpdk_kni_init(uint16_t port, struct rte_mempool *pool)
{
int32_t ret;
@@ -262,3 +190,82 @@ void kni_process_rx(uint16_t port)
}
}
}
+#endif
+
+void eth_params_checksum(struct rte_eth_conf *conf, struct rte_eth_dev_info *dev_info)
+{
+ uint64_t rx_ol = 0;
+ uint64_t tx_ol = 0;
+ uint64_t rx_ol_capa = dev_info->rx_offload_capa;
+ uint64_t tx_ol_capa = dev_info->tx_offload_capa;
+
+ // rx ip
+ if (rx_ol_capa & RTE_ETH_RX_OFFLOAD_IPV4_CKSUM) {
+ rx_ol |= RTE_ETH_RX_OFFLOAD_IPV4_CKSUM;
+ COMMON_INFO("RTE_ETH_RX_OFFLOAD_IPV4_CKSUM\n");
+ }
+
+ // rx tcp
+ if (rx_ol_capa & RTE_ETH_RX_OFFLOAD_TCP_CKSUM) {
+ rx_ol |= RTE_ETH_RX_OFFLOAD_TCP_CKSUM;
+ COMMON_INFO("RTE_ETH_RX_OFFLOAD_TCP_CKSUM\n");
+ }
+
+ // rx udp
+ if (rx_ol_capa & RTE_ETH_RX_OFFLOAD_UDP_CKSUM) {
+ rx_ol |= RTE_ETH_RX_OFFLOAD_UDP_CKSUM;
+ COMMON_INFO("RTE_ETH_RX_OFFLOAD_UDP_CKSUM\n");
+ }
+
+ // rx vlan
+ if (rx_ol_capa & RTE_ETH_RX_OFFLOAD_VLAN_STRIP) {
+ rx_ol |= RTE_ETH_RX_OFFLOAD_VLAN_STRIP;
+ COMMON_INFO("RTE_ETH_RX_OFFLOAD_VLAN_STRIP\n");
+ }
+
+ // tx ip
+ if (tx_ol_capa & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM) {
+ tx_ol |= RTE_ETH_TX_OFFLOAD_IPV4_CKSUM;
+ COMMON_INFO("RTE_ETH_TX_OFFLOAD_IPV4_CKSUM\n");
+ }
+
+ // tx tcp
+ if (tx_ol_capa & RTE_ETH_TX_OFFLOAD_TCP_CKSUM) {
+ tx_ol |= RTE_ETH_TX_OFFLOAD_TCP_CKSUM;
+ COMMON_INFO("RTE_ETH_TX_OFFLOAD_TCP_CKSUM\n");
+ }
+
+ // tx udp
+ if (tx_ol_capa & RTE_ETH_TX_OFFLOAD_UDP_CKSUM) {
+ tx_ol |= RTE_ETH_TX_OFFLOAD_UDP_CKSUM;
+ COMMON_INFO("RTE_ETH_TX_OFFLOAD_UDP_CKSUM\n");
+ }
+
+ // tx tso
+ if (tx_ol_capa & RTE_ETH_TX_OFFLOAD_TCP_TSO) {
+ tx_ol |= (RTE_ETH_TX_OFFLOAD_TCP_TSO | RTE_ETH_TX_OFFLOAD_MULTI_SEGS);
+ COMMON_INFO("RTE_ETH_TX_OFFLOAD_TCP_TSO\n");
+ }
+
+ // tx vlan
+ if (tx_ol_capa & RTE_ETH_TX_OFFLOAD_VLAN_INSERT) {
+ tx_ol |= RTE_ETH_TX_OFFLOAD_VLAN_INSERT;
+ COMMON_INFO("RTE_ETH_TX_OFFLOAD_VLAN_INSERT\n");
+ }
+
+ if (!(rx_ol & RTE_ETH_RX_OFFLOAD_UDP_CKSUM) ||
+ !(rx_ol & RTE_ETH_RX_OFFLOAD_TCP_CKSUM) ||
+ !(rx_ol & RTE_ETH_RX_OFFLOAD_IPV4_CKSUM)) {
+ rx_ol = 0;
+ }
+ if (!(tx_ol & RTE_ETH_TX_OFFLOAD_UDP_CKSUM) ||
+ !(tx_ol & RTE_ETH_TX_OFFLOAD_TCP_CKSUM) ||
+ !(tx_ol & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM)) {
+ tx_ol = 0;
+ }
+
+ conf->rxmode.offloads = rx_ol;
+ conf->txmode.offloads = tx_ol;
+
+ COMMON_INFO("Set checksum offloads\n");
+}
diff --git a/src/common/gazelle_parse_config.c b/src/common/gazelle_parse_config.c
index 1adce78..0553f0d 100644
--- a/src/common/gazelle_parse_config.c
+++ b/src/common/gazelle_parse_config.c
@@ -15,6 +15,7 @@
#include <limits.h>
#include <stdint.h>
#include <unistd.h>
+#include <ctype.h>
#include <sys/stat.h>
#include <sys/types.h>
diff --git a/src/lstack/Makefile b/src/lstack/Makefile
index d585040..df1ddaa 100644
--- a/src/lstack/Makefile
+++ b/src/lstack/Makefile
@@ -7,17 +7,17 @@
# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
# PURPOSE.
# See the Mulan PSL v2 for more details.
-
LSTACK_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
ROOT_DIR := $(dir $(abspath $(LSTACK_DIR)))
LWIP_INCLUDE_FILE ?= /usr/include/lwip
LIB_PATH ?= /usr/lib64
-ifeq ($(DPDK_VERSION_1911), 1)
- DPDK_INCLUDE_FILE ?= /usr/include/dpdk
+DPDK_VERSION := $(shell rpm -q --queryformat '%{VERSION}' dpdk)
+ifeq ($(DPDK_VERSION),21.11)
+ DPDK_INCLUDE_FILE := /usr/local/include
else
- DPDK_INCLUDE_FILE ?= /usr/local/include/
+ DPDK_INCLUDE_FILE := /usr/include/dpdk
endif
AR = ar
@@ -77,34 +77,36 @@ LIBRTE_LIB = $(LIB_PATH)/librte_pci.so \
$(LIB_PATH)/librte_gro.so \
$(LIB_PATH)/librte_ring.so \
$(LIB_PATH)/librte_mbuf.so \
- $(LIB_PATH)/librte_kni.so \
$(LIB_PATH)/librte_kvargs.so \
$(LIB_PATH)/librte_bus_vdev.so \
$(LIB_PATH)/librte_net.so \
$(LIB_PATH)/librte_ethdev.so \
- $(LIB_PATH)/librte_pdump.so \
+ $(LIB_PATH)/librte_pdump.so
+
+ifeq ($(shell expr $(DPDK_VERSION) \< 23.11), 1)
+ LIBRTE_LIB += $(LIB_PATH)/librte_kni.so
+endif
-ifeq ($(DPDK_VERSION_1911), 1)
- CFLAGS += -DDPDK_VERSION_1911=1
+ifeq ($(DPDK_VERSION), 19.11)
LIBRTE_LIB += $(LIB_PATH)/librte_pmd_pcap.so \
- $(LIB_PATH)/librte_pmd_bond.so \
- $(LIB_PATH)/librte_pmd_hinic.so \
- $(LIB_PATH)/librte_pmd_ixgbe.so \
- $(LIB_PATH)/librte_pmd_virtio.so
- ifneq ($(ARCH), loongarch64)
- LIBRTE_LIB += $(LIB_PATH)/librte_pmd_i40e.so
- endif
+ $(LIB_PATH)/librte_pmd_bond.so \
+ $(LIB_PATH)/librte_pmd_hinic.so \
+ $(LIB_PATH)/librte_pmd_ixgbe.so \
+ $(LIB_PATH)/librte_pmd_virtio.so
+ ifneq ($(ARCH), loongarch64)
+ LIBRTE_LIB += $(LIB_PATH)/librte_pmd_i40e.so
+ endif
else
LIBRTE_LIB += $(LIB_PATH)/librte_net_pcap.so \
- $(LIB_PATH)/librte_net_bond.so \
- $(LIB_PATH)/librte_net_hinic.so \
- $(LIB_PATH)/librte_net_ixgbe.so \
- $(LIB_PATH)/librte_net_virtio.so \
- $(LIB_PATH)/librte_telemetry.so \
- $(LIB_PATH)/librte_pcapng.so
- ifneq ($(ARCH), loongarch64)
- LIBRTE_LIB += $(LIB_PATH)/librte_net_i40e.so
- endif
+ $(LIB_PATH)/librte_net_bond.so \
+ $(LIB_PATH)/librte_net_hinic.so \
+ $(LIB_PATH)/librte_net_ixgbe.so \
+ $(LIB_PATH)/librte_net_virtio.so \
+ $(LIB_PATH)/librte_telemetry.so \
+ $(LIB_PATH)/librte_pcapng.so
+ ifneq ($(ARCH), loongarch64)
+ LIBRTE_LIB += $(LIB_PATH)/librte_net_i40e.so
+ endif
endif
DEP_LIBS = $(LWIP_LIB) $(LIBRTE_LIB)
diff --git a/src/lstack/core/lstack_dpdk.c b/src/lstack/core/lstack_dpdk.c
index 630b043..7f1ceb8 100644
--- a/src/lstack/core/lstack_dpdk.c
+++ b/src/lstack/core/lstack_dpdk.c
@@ -27,7 +27,10 @@
#include <rte_malloc.h>
#include <rte_bus.h>
#include <rte_errno.h>
+#include <rte_version.h>
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
#include <rte_kni.h>
+#endif
#include <rte_pdump.h>
#include <rte_thash.h>
#include <lwip/posix_api.h>
@@ -35,6 +38,7 @@
#include <lwip/pbuf.h>
#include <lwip/reg_sock.h>
#include <lwip/priv/tcp_priv.h>
+
#include <rte_eth_bond_8023ad.h>
#include <rte_eth_bond.h>
#include <rte_ethdev.h>
@@ -59,8 +63,10 @@ struct eth_params {
struct rte_eth_rxconf rx_conf;
struct rte_eth_txconf tx_conf;
};
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
struct rte_kni;
static struct rte_bus *g_pci_bus = NULL;
+#endif
#define RSS_HASH_KEY_LEN 40
static uint8_t g_default_rss_key[] = {
@@ -368,9 +374,9 @@ static struct eth_params *alloc_eth_params(uint16_t port_id, uint16_t nb_queues)
eth_params->nb_queues = nb_queues;
eth_params->nb_rx_desc = get_global_cfg_params()->nic.rxqueue_size;
eth_params->nb_tx_desc = get_global_cfg_params()->nic.txqueue_size;
- eth_params->conf.link_speeds = ETH_LINK_SPEED_AUTONEG;
- eth_params->conf.txmode.mq_mode = ETH_MQ_TX_NONE;
- eth_params->conf.rxmode.mq_mode = ETH_MQ_RX_NONE;
+ eth_params->conf.link_speeds = RTE_ETH_LINK_SPEED_AUTONEG;
+ eth_params->conf.txmode.mq_mode = RTE_ETH_MQ_TX_NONE;
+ eth_params->conf.rxmode.mq_mode = RTE_ETH_MQ_RX_NONE;
return eth_params;
}
@@ -388,7 +394,7 @@ uint64_t get_eth_params_tx_ol(void)
static int eth_params_rss(struct rte_eth_conf *conf, struct rte_eth_dev_info *dev_info)
{
int rss_enable = 0;
- uint64_t def_rss_hf = ETH_RSS_TCP | ETH_RSS_UDP | ETH_RSS_IP;
+ uint64_t def_rss_hf = RTE_ETH_RSS_TCP | RTE_ETH_RSS_UDP | RTE_ETH_RSS_IP;
struct rte_eth_rss_conf rss_conf = {
g_default_rss_key,
RSS_HASH_KEY_LEN,
@@ -404,7 +410,7 @@ static int eth_params_rss(struct rte_eth_conf *conf, struct rte_eth_dev_info *de
if (rss_conf.rss_hf) {
rss_enable = 1;
conf->rx_adv_conf.rss_conf = rss_conf;
- conf->rxmode.mq_mode = ETH_MQ_RX_RSS;
+ conf->rxmode.mq_mode = RTE_ETH_MQ_RX_RSS;
LSTACK_LOG(INFO, LSTACK, "set rss_hf: %lx\n", rss_conf.rss_hf);
}
@@ -427,8 +433,8 @@ static void rss_setup(const int port_id, const uint16_t nb_queues)
return;
}
- reta_conf_size = dev_info.reta_size / RTE_RETA_GROUP_SIZE;
- if (dev_info.reta_size % RTE_RETA_GROUP_SIZE) {
+ reta_conf_size = dev_info.reta_size / RTE_ETH_RETA_GROUP_SIZE;
+ if (dev_info.reta_size % RTE_ETH_RETA_GROUP_SIZE) {
reta_conf_size += 1;
}
@@ -438,8 +444,8 @@ static void rss_setup(const int port_id, const uint16_t nb_queues)
}
for (i = 0; i < dev_info.reta_size; i++) {
struct rte_eth_rss_reta_entry64 *one_reta_conf =
- &reta_conf[i / RTE_RETA_GROUP_SIZE];
- one_reta_conf->reta[i % RTE_RETA_GROUP_SIZE] = i % nb_queues;
+ &reta_conf[i / RTE_ETH_RETA_GROUP_SIZE];
+ one_reta_conf->reta[i % RTE_ETH_RETA_GROUP_SIZE] = i % nb_queues;
}
for (i = 0; i < reta_conf_size; i++) {
@@ -518,7 +524,11 @@ int32_t dpdk_ethdev_init(int port_id, bool bond_port)
return -1;
}
+#if RTE_VERSION >= RTE_VERSION_NUM(23, 11, 0, 0)
+ ret = rte_eth_bond_member_add(port_id, slave_port_id[i]);
+#else
ret = rte_eth_bond_slave_add(port_id, slave_port_id[i]);
+#endif
if (ret != 0) {
LSTACK_LOG(ERR, LSTACK, "dpdk add slave port failed ret = %d\n", ret);
return -1;
@@ -671,6 +681,7 @@ int32_t dpdk_init_lstack_kni(void)
return 0;
}
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
void dpdk_skip_nic_init(void)
{
/* when lstack init nic again, ltran can't read pkts from nic. unregister pci_bus to avoid init nic in lstack */
@@ -686,6 +697,7 @@ void dpdk_restore_pci(void)
rte_bus_register(g_pci_bus);
}
}
+#endif
int32_t init_dpdk_ethdev(void)
{
@@ -849,7 +861,11 @@ void dpdk_nic_xstats_get(struct gazelle_stack_dfx_data *dfx, uint16_t port_id)
if (strcmp(dev_info.driver_name, "net_bonding") == 0) {
uint16_t slaves[RTE_MAX_ETHPORTS];
int slave_count;
+#if RTE_VERSION >= RTE_VERSION_NUM(23, 11, 0, 0)
+ slave_count = rte_eth_bond_members_get(port_id, slaves, RTE_MAX_ETHPORTS);
+#else
slave_count = rte_eth_bond_slaves_get(port_id, slaves, RTE_MAX_ETHPORTS);
+#endif
if (slave_count <= 0) {
LSTACK_LOG(ERR, LSTACK, "rte_eth_bond_slaves_get failed.\n");
return;
diff --git a/src/lstack/core/lstack_init.c b/src/lstack/core/lstack_init.c
index fef2942..31fd91d 100644
--- a/src/lstack/core/lstack_init.c
+++ b/src/lstack/core/lstack_init.c
@@ -116,7 +116,9 @@ void gazelle_exit(void)
stack_group_exit();
}
if (!use_ltran()) {
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
dpdk_kni_release();
+#endif
}
}
diff --git a/src/lstack/core/lstack_protocol_stack.c b/src/lstack/core/lstack_protocol_stack.c
index 1fa7373..a24fc4c 100644
--- a/src/lstack/core/lstack_protocol_stack.c
+++ b/src/lstack/core/lstack_protocol_stack.c
@@ -13,8 +13,6 @@
#include <pthread.h>
#include <stdatomic.h>
-#include <rte_kni.h>
-
#include <lwip/sockets.h>
#include <lwip/tcpip.h>
#include <lwip/tcp.h>
@@ -38,6 +36,10 @@
#include "lstack_stack_stat.h"
#include "lstack_protocol_stack.h"
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
+#include <rte_kni.h>
+#endif
+
#define KERNEL_EVENT_10us 10
static PER_THREAD struct protocol_stack *g_stack_p = NULL;
@@ -453,7 +455,9 @@ int stack_polling(uint32_t wakeup_tick)
int force_quit;
struct cfg_params *cfg = get_global_cfg_params();
uint8_t use_ltran_flag = cfg->use_ltran;
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
bool kni_switch = cfg->kni_switch;
+#endif
bool use_sockmap = cfg->use_sockmap;
bool stack_mode_rtc = cfg->stack_mode_rtc;
uint32_t rpc_number = cfg->rpc_number;
@@ -486,6 +490,7 @@ int stack_polling(uint32_t wakeup_tick)
}
}
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
/* run to completion mode currently does not support kni */
/* KNI requests are generally low-rate I/Os,
* so processing KNI requests only in the thread with queue_id No.0 is sufficient. */
@@ -495,6 +500,7 @@ int stack_polling(uint32_t wakeup_tick)
kni_handle_rx(stack->port_id);
}
}
+#endif
return force_quit;
}
@@ -950,7 +956,9 @@ void stack_broadcast_arp(struct rte_mbuf *mbuf, struct protocol_stack *cur_stack
return;
}
copy_mbuf(mbuf_copy, mbuf);
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
kni_handle_tx(mbuf_copy);
+#endif
return;
}
diff --git a/src/lstack/include/lstack_ethdev.h b/src/lstack/include/lstack_ethdev.h
index 326bd1b..3252906 100644
--- a/src/lstack/include/lstack_ethdev.h
+++ b/src/lstack/include/lstack_ethdev.h
@@ -13,6 +13,9 @@
#ifndef __GAZELLE_ETHDEV_H__
#define __GAZELLE_ETHDEV_H__
+#include <rte_eal.h>
+#include <rte_version.h>
+
#define INVAILD_PROCESS_IDX 255
enum port_type {
@@ -46,7 +49,12 @@ 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);
+
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
void kni_handle_rx(uint16_t port_id);
+void kni_handle_tx(struct rte_mbuf *mbuf);
+#endif
+
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);
void delete_flow_director(uint32_t dst_ip, uint16_t src_port, uint16_t dst_port);
diff --git a/src/lstack/include/lstack_protocol_stack.h b/src/lstack/include/lstack_protocol_stack.h
index 8e2e807..c681547 100644
--- a/src/lstack/include/lstack_protocol_stack.h
+++ b/src/lstack/include/lstack_protocol_stack.h
@@ -181,5 +181,4 @@ void stack_recvlist_count(struct rpc_msg *msg);
void stack_exit_by_rpc(struct rpc_msg *msg);
int stack_polling(uint32_t wakeup_tick);
-void kni_handle_tx(struct rte_mbuf *mbuf);
#endif
diff --git a/src/lstack/netif/lstack_ethdev.c b/src/lstack/netif/lstack_ethdev.c
index 2e11670..5b0f83e 100644
--- a/src/lstack/netif/lstack_ethdev.c
+++ b/src/lstack/netif/lstack_ethdev.c
@@ -13,7 +13,11 @@
#include <sys/socket.h>
#include <sys/un.h>
+#include <rte_eal.h>
+#include <rte_version.h>
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
#include <rte_kni.h>
+#endif
#include <rte_ethdev.h>
#include <rte_malloc.h>
#include <rte_ether.h>
@@ -755,6 +759,7 @@ int distribute_pakages(struct rte_mbuf *mbuf)
return TRANSFER_KERNEL;
}
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
void kni_handle_rx(uint16_t port_id)
{
struct rte_mbuf *pkts_burst[PACKET_READ_SIZE];
@@ -793,6 +798,7 @@ void kni_handle_tx(struct rte_mbuf *mbuf)
rte_pktmbuf_free(mbuf);
}
}
+#endif
/* optimized eth_dev_poll() in lstack */
int32_t gazelle_eth_dev_poll(struct protocol_stack *stack, uint8_t use_ltran_flag, uint32_t nic_read_number)
@@ -835,7 +841,9 @@ int32_t gazelle_eth_dev_poll(struct protocol_stack *stack, uint8_t use_ltran_fla
if (likely(transfer_type == TRANSFER_CURRENT_THREAD)) {
eth_dev_recv(stack->pkts[i], stack);
} else if (transfer_type == TRANSFER_KERNEL) {
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
kni_handle_tx(stack->pkts[i]);
+#endif
} else {
/* transfer to other thread */
}
diff --git a/src/lstack/netif/lstack_vdev.c b/src/lstack/netif/lstack_vdev.c
index c845f7a..fe17f59 100644
--- a/src/lstack/netif/lstack_vdev.c
+++ b/src/lstack/netif/lstack_vdev.c
@@ -22,6 +22,8 @@
#include <rte_net.h>
#include <netif/ethernet.h>
+#include <lwip/dpdk_version.h>
+
#include "lstack_cfg.h"
#include "lstack_dpdk.h"
#include "lstack_ethdev.h"
@@ -85,7 +87,7 @@ static uint32_t vdev_rx_poll(struct protocol_stack *stack, struct rte_mbuf **pkt
/* skip gro when tcp/ip cksum offloads disable */
if (get_protocol_stack_group()->rx_offload == 0 || (get_global_cfg_params()->nic.vlan_mode >= 0
- && !(get_protocol_stack_group()->rx_offload & DEV_RX_OFFLOAD_VLAN_STRIP))) {
+ && !(get_protocol_stack_group()->rx_offload & RTE_ETH_RX_OFFLOAD_VLAN_STRIP))) {
return pkt_num;
}
diff --git a/src/ltran/CMakeLists.txt b/src/ltran/CMakeLists.txt
index e098a77..f739ceb 100644
--- a/src/ltran/CMakeLists.txt
+++ b/src/ltran/CMakeLists.txt
@@ -27,22 +27,38 @@ if($ENV{GAZELLE_COVERAGE_ENABLE})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ftest-coverage -fprofile-arcs")
endif($ENV{GAZELLE_COVERAGE_ENABLE})
-if($ENV{DPDK_VERSION_1911})
+execute_process(
+ COMMAND rpm -qa dpdk
+ OUTPUT_VARIABLE DPDK_VERSION_FULL
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+string(REGEX MATCH "[0-9]+\\.[0-9]+" DPDK_VERSION ${DPDK_VERSION_FULL})
+
+if (DPDK_VERSION STREQUAL "21.11")
+ set(DPDK_DIR /usr/local/include/)
+else()
set(DPDK_DIR /usr/include/dpdk)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDPDK_VERSION_1911=1")
+endif()
+
+if (DPDK_VERSION STREQUAL "19.11")
set(DPDK_LINK_FLAGS "-Wl,-lrte_pmd_bond -Wl,-lrte_pmd_hinic -Wl,-lrte_pmd_ixgbe \
-Wl,-lrte_pmd_pcap -Wl,-lrte_pmd_virtio")
if(NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "loongarch64")
set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,-lrte_pmd_i40e")
endif()
else()
- set(DPDK_DIR /usr/local/include/)
set(DPDK_LINK_FLAGS "-Wl,-lrte_net_bond -Wl,-lrte_net_hinic -Wl,-lrte_net_ixgbe \
-Wl,-lpcap -Wl,-lrte_net_pcap -Wl,-lrte_net_virtio -Wl,-lrte_pcapng -Wl,-lrte_telemetry")
if(NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "loongarch64")
set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,-lrte_net_i40e")
endif()
-endif($ENV{DPDK_VERSION_1911})
+endif()
+
+if (DPDK_VERSION GREATER_EQUAL 23.11)
+ set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -lrte_log -larchive -Wl,-lrte_eal")
+else()
+ set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -lrte_kni -Wl,-Bstatic -lrte_eal -Wl,-Bdynamic")
+endif()
add_executable(ltran main.c ltran_param.c ltran_config.c ltran_ethdev.c ltran_stat.c ltran_errno.c
ltran_monitor.c ltran_instance.c ltran_stack.c ltran_tcp_conn.c ltran_tcp_sock.c
@@ -55,16 +71,19 @@ target_compile_options(ltran PRIVATE -fno-strict-aliasing -D__ARM_FEATURE_CRC32=
-DRTE_MACHINE_CPUFLAG_SHA1 -DRTE_MACHINE_CPUFLAG_SHA2 -include rte_config.h
-D_GNU_SOURCE -W -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wold-style-definition
-Wpointer-arith -Wcast-qual -Wnested-externs -Wformat-nonliteral -Wformat-security -Wundef
- -Wdeprecated -Wwrite-strings -Wno-implicit-fallthrough -D_FORTIFY_SOURCE=2)
-if(NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "sw_64")
+ -Wdeprecated -Wwrite-strings -Wno-implicit-fallthrough -D_FORTIFY_SOURCE=2 -Wno-error=deprecated-declarations)
+
+# gcc coredump in openEuler-20.03-LTS-XX aarch64 when add -march=native
+if(NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "sw_64|aarch64" )
target_compile_options(ltran PRIVATE -march=native -Wcast-align)
endif()
target_link_libraries(ltran PRIVATE config boundscheck rte_pdump -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wtrampolines)
+
set_target_properties(ltran PROPERTIES LINK_FLAGS "-L$ENV{DPDK_LIB_PATH} -Wl,--no-whole-archive \
-Wl,-lrte_meter -Wl,--whole-archive -Wl,-lrte_gro -Wl,-lrte_hash -Wl,-lrte_kvargs -Wl,-lrte_mbuf -Wl,-lrte_ethdev \
-Wl,-lrte_net -Wl,-lrte_timer -Wl,-lrte_mempool -Wl,-lrte_mempool_ring -Wl,-lrte_ring -Wl,-lrte_pci \
- -Wl,-Bstatic -lrte_eal -Wl,-Bdynamic -Wl,-lrte_cmdline -Wl,-lrte_kni -Wl,-lrte_bus_pci \
+ -Wl,-lrte_cmdline -Wl,-lrte_bus_pci\
-Wl,-lrte_bus_vdev ${DPDK_LINK_FLAGS} \
-Wl,--no-whole-archive -Wl,-lm -Wl,-lrt -Wl,-lnuma -Wl,-ldl -Wl,-export-dynamic -Wl,-export-dynamic \
-Wl,--as-needed -Wl,-export-dynamic -Wl,-Map=ltran.map -Wl,--cref")
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
index 0d7ea7b..4b246a1 100644
--- a/src/ltran/ltran_dfx.c
+++ b/src/ltran/ltran_dfx.c
@@ -26,6 +26,8 @@
#include <rte_log.h>
#include <rte_ethdev.h>
+#include <lwip/dpdk_version.h>
+
#include "ltran_stat.h"
#include "ltran_base.h"
#include "gazelle_dfx_msg.h"
@@ -168,16 +170,16 @@ static void gazelle_print_lstack_nic_features(void *buf, const struct gazelle_st
struct nic_eth_features *f = &(((struct gazelle_stack_dfx_data *)buf)->data.nic_features);
printf("###### NIC offload and other features for port %-2d #########\n", f->port_id);
- printf("tx-ipv4-checksum: %s\n", (f->tx_offload & DEV_TX_OFFLOAD_IPV4_CKSUM) ? "on" : "off");
- printf("tx-tcp-checksum: %s\n", (f->tx_offload & DEV_TX_OFFLOAD_TCP_CKSUM) ? "on" : "off");
- printf("tx-tcp-tso: %s\n", (f->tx_offload & DEV_TX_OFFLOAD_TCP_TSO) ? "on" : "off");
- printf("tx-udp-checksum: %s\n", (f->tx_offload & DEV_TX_OFFLOAD_UDP_CKSUM) ? "on" : "off");
- printf("tx-vlan-insert: %s\n", (f->tx_offload & DEV_TX_OFFLOAD_VLAN_INSERT) ? "on" : "off");
+ printf("tx-ipv4-checksum: %s\n", (f->tx_offload & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM) ? "on" : "off");
+ printf("tx-tcp-checksum: %s\n", (f->tx_offload & RTE_ETH_TX_OFFLOAD_TCP_CKSUM) ? "on" : "off");
+ printf("tx-tcp-tso: %s\n", (f->tx_offload & RTE_ETH_TX_OFFLOAD_TCP_TSO) ? "on" : "off");
+ printf("tx-udp-checksum: %s\n", (f->tx_offload & RTE_ETH_TX_OFFLOAD_UDP_CKSUM) ? "on" : "off");
+ printf("tx-vlan-insert: %s\n", (f->tx_offload & RTE_ETH_TX_OFFLOAD_VLAN_INSERT) ? "on" : "off");
- printf("rx-ipv4-checksum: %s\n", (f->rx_offload & DEV_RX_OFFLOAD_IPV4_CKSUM) ? "on" : "off");
- printf("rx-tcp-checksum: %s\n", (f->rx_offload & DEV_RX_OFFLOAD_TCP_CKSUM) ? "on" : "off");
- printf("rx-udp-checksum: %s\n", (f->rx_offload & DEV_RX_OFFLOAD_UDP_CKSUM) ? "on" : "off");
- printf("rx-vlan-strip: %s\n", (f->rx_offload & DEV_RX_OFFLOAD_VLAN_STRIP) ? "on" : "off");
+ printf("rx-ipv4-checksum: %s\n", (f->rx_offload & RTE_ETH_RX_OFFLOAD_IPV4_CKSUM) ? "on" : "off");
+ printf("rx-tcp-checksum: %s\n", (f->rx_offload & RTE_ETH_RX_OFFLOAD_TCP_CKSUM) ? "on" : "off");
+ printf("rx-udp-checksum: %s\n", (f->rx_offload & RTE_ETH_RX_OFFLOAD_UDP_CKSUM) ? "on" : "off");
+ printf("rx-vlan-strip: %s\n", (f->rx_offload & RTE_ETH_RX_OFFLOAD_VLAN_STRIP) ? "on" : "off");
}
static void gazelle_print_ltran_conn(void *buf, const struct gazelle_stat_msg_request *req_msg)
diff --git a/src/ltran/ltran_ethdev.c b/src/ltran/ltran_ethdev.c
index e2eb4a8..2fb7fab 100644
--- a/src/ltran/ltran_ethdev.c
+++ b/src/ltran/ltran_ethdev.c
@@ -21,10 +21,15 @@
#include <rte_eth_bond.h>
#include <rte_ethdev.h>
#include <rte_errno.h>
+#include <rte_version.h>
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
#include <rte_kni.h>
+#endif
#include <syslog.h>
#include <securec.h>
+#include <lwip/dpdk_version.h>
+
#include "dpdk_common.h"
#include "ltran_param.h"
#include "ltran_log.h"
@@ -85,7 +90,11 @@ static int32_t ltran_mbuf_pool_init(void);
static int32_t ltran_single_slave_port_init(uint16_t port_num, struct rte_mempool *pktmbuf_rxpool);
static int32_t ltran_single_bond_port_init(uint16_t port_num, struct rte_mempool *pktmbuf_rxpool);
static int32_t ltran_slave_port_init(void);
+
+
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
static int32_t ltran_kni_init(void);
+#endif
static int32_t ltran_bond_port_init(void);
static int32_t ltran_eal_init(void)
@@ -248,10 +257,10 @@ static int32_t ltran_single_slave_port_init(uint16_t port_num, struct rte_mempoo
}
struct rte_eth_conf port_conf = {0};
- port_conf.txmode.mq_mode = ETH_MQ_TX_NONE;
- port_conf.link_speeds = ETH_LINK_SPEED_AUTONEG;
+ port_conf.txmode.mq_mode = RTE_ETH_MQ_TX_NONE;
+ port_conf.link_speeds = RTE_ETH_LINK_SPEED_AUTONEG;
eth_params_checksum(&port_conf, &dev_info);
- port_conf.rxmode.mq_mode = ETH_MQ_RX_NONE;
+ port_conf.rxmode.mq_mode = RTE_ETH_MQ_RX_NONE;
struct ltran_config *ltran_config = get_ltran_config();
ltran_config->dpdk.rx_offload = port_conf.rxmode.offloads;
@@ -311,7 +320,11 @@ static int32_t ltran_slave_port_init(void)
static int32_t ltran_eth_bond_slave(const struct port_info *port_info, uint16_t port_num, uint16_t bond_port_id)
{
for (uint32_t i = 0; i < port_info[port_num].num_ports; i++) {
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
int32_t ret = rte_eth_bond_slave_add(bond_port_id, port_info[port_num].id[i]);
+#else
+ int32_t ret = rte_eth_bond_member_add(bond_port_id, port_info[port_num].id[i]);
+#endif
if (ret < 0) {
return ret;
}
@@ -370,9 +383,9 @@ static int32_t ltran_bond_port_attr_set(uint16_t port_num, uint16_t bond_port_id
}
struct rte_eth_conf port_conf = {0};
- port_conf.rxmode.mq_mode = ETH_MQ_RX_NONE;
- port_conf.txmode.mq_mode = ETH_MQ_TX_NONE;
- port_conf.link_speeds = ETH_LINK_SPEED_AUTONEG;
+ port_conf.rxmode.mq_mode = RTE_ETH_MQ_RX_NONE;
+ port_conf.txmode.mq_mode = RTE_ETH_MQ_TX_NONE;
+ port_conf.link_speeds = RTE_ETH_LINK_SPEED_AUTONEG;
eth_params_checksum(&port_conf, &dev_info);
ret = rte_eth_dev_configure(bond_port_id, rx_queue_num, tx_queue_num, &port_conf);
@@ -469,6 +482,7 @@ static int32_t ltran_bond_port_init(void)
return GAZELLE_OK;
}
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
static int32_t ltran_kni_init(void)
{
// if not use kni. skip kni init and return
@@ -481,6 +495,7 @@ static int32_t ltran_kni_init(void)
return dpdk_kni_init(bond_port[0], txpool[0]);
}
+#endif
typedef int32_t (*ethdev_init_func)(void);
@@ -492,7 +507,9 @@ static ethdev_init_func g_ltran_ethdev_init_tbl[] = {
ltran_mbuf_pool_init,
ltran_slave_port_init,
ltran_bond_port_init,
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
ltran_kni_init,
+#endif
};
int32_t ltran_ethdev_init(void)
diff --git a/src/ltran/ltran_forward.c b/src/ltran/ltran_forward.c
index ee379b5..a5756d7 100644
--- a/src/ltran/ltran_forward.c
+++ b/src/ltran/ltran_forward.c
@@ -13,7 +13,12 @@
#include <rte_arp.h>
#include <rte_eal.h>
#include <rte_common.h>
+#include <rte_version.h>
+
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
#include <rte_kni.h>
+#endif
+
#include <rte_malloc.h>
#include <rte_ethdev.h>
#include <rte_mempool.h>
@@ -195,6 +200,7 @@ static __rte_always_inline uint32_t pkt_bufs_enque_rx_ring(struct gazelle_stack
static __rte_always_inline void flush_rx_ring(struct gazelle_stack *stack)
{
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
if (unlikely(stack == get_kni_stack())) {
// if fail, free mbuf inside
kni_process_tx(stack->pkt_buf, stack->pkt_cnt);
@@ -202,6 +208,7 @@ static __rte_always_inline void flush_rx_ring(struct gazelle_stack *stack)
stack->pkt_cnt = 0;
return;
}
+#endif
/* first flush backup mbuf pointer avoid packet disorder */
if (unlikely(stack->backup_pkt_cnt > 0)) {
@@ -414,9 +421,12 @@ static __rte_always_inline void upstream_forward_one(struct rte_mbuf *m)
}
forward_to_kni:
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
if (get_ltran_config()->dpdk.kni_switch == GAZELLE_ON) {
enqueue_rx_packet(get_kni_stack(), m);
}
+#endif
+ return;
}
static __rte_always_inline void msg_to_quintuple(struct gazelle_quintuple *transfer_qtuple,
@@ -653,10 +663,12 @@ void upstream_forward(const uint16_t *port)
upstream_forward_loop(port_id, queue_id);
}
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
if (get_ltran_config()->dpdk.kni_switch == GAZELLE_ON) {
flush_rx_ring(get_kni_stack());
rte_kni_handle_request(get_gazelle_kni());
}
+#endif
now_time = get_current_time();
if (now_time - aging_conn_last_time > GAZELLE_CONN_INTERVAL) {
@@ -755,11 +767,13 @@ int32_t downstream_forward(uint16_t *port)
uint32_t queue_num = get_ltran_config()->bond.tx_queue_num;
while (get_ltran_stop_flag() != GAZELLE_TRUE) {
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
/* kni rx means read from kni and send to nic */
if (get_ltran_config()->dpdk.kni_switch == GAZELLE_ON &&
get_kni_started()) {
kni_process_rx(g_port_index);
}
+#endif
for (uint32_t queue_id = 0; queue_id < queue_num; queue_id++) {
downstream_forward_loop(port_id, queue_id);
diff --git a/src/ltran/ltran_stack.c b/src/ltran/ltran_stack.c
index d4e935e..2aed6c9 100644
--- a/src/ltran/ltran_stack.c
+++ b/src/ltran/ltran_stack.c
@@ -10,6 +10,7 @@
* See the Mulan PSL v2 for more details.
*/
+#include <malloc.h>
#include <rte_mbuf.h>
#include "ltran_instance.h"
diff --git a/src/ltran/ltran_timer.c b/src/ltran/ltran_timer.c
index 96c622e..0832c5f 100644
--- a/src/ltran/ltran_timer.c
+++ b/src/ltran/ltran_timer.c
@@ -10,6 +10,7 @@
* See the Mulan PSL v2 for more details.
*/
+#include <malloc.h>
#include <sys/time.h>
#include <pthread.h>
diff --git a/src/ltran/main.c b/src/ltran/main.c
index c2598a7..6cc8bc9 100644
--- a/src/ltran/main.c
+++ b/src/ltran/main.c
@@ -17,6 +17,8 @@
#include <syslog.h>
#include <sys/types.h>
#include <rte_malloc.h>
+#include <rte_eal.h>
+#include <rte_version.h>
#include "dpdk_common.h"
#include "ltran_log.h"
@@ -57,7 +59,9 @@ static void sig_default_handler(int32_t sig)
{
LTRAN_ERR("ltran dumped, caught signal: %d.\n", sig);
print_stack();
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
dpdk_kni_release();
+#endif
int ret = 0;
ret = unlink(get_ltran_config()->unix_socket_filename);
if (ret) {
@@ -143,7 +147,9 @@ static void ltran_core_destroy(void)
gazelle_stack_htable_destroy();
gazelle_tcp_conn_htable_destroy();
gazelle_tcp_sock_htable_destroy();
+#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
dpdk_kni_release();
+#endif
}
static void wait_thread_finish(pthread_t ctrl_thread, uint32_t next_core)
--
2.33.0

View File

@ -2,7 +2,7 @@
Name: gazelle
Version: 1.0.2
Release: 24
Release: 25
Summary: gazelle is a high performance user-mode stack
License: MulanPSL-2.0
URL: https://gitee.com/openeuler/gazelle
@ -125,6 +125,14 @@ Patch9108: 0108-replace-with-gz_addr_t.patch
Patch9109: 0109-match_host_addr-func-support-ipv6.patch
Patch9110: 0110-add-example-keep-alive-interval-para.patch
Patch9111: 0111-update-src-common-dpdk_common.c.patch
Patch9112: 0112-listen_shadow-support-ipv6.patch
Patch9113: 0113-lstack_dpdk-limit-mbuf-max-num.patch
Patch9114: 0114-gazellectl-add-tcp_input-empty-ack-cnt.patch
Patch9115: 0115-add-socket-accept-fail-cnt.patch
Patch9116: 0116-diff-lstack-and-ltran-dfx-sock.patch
Patch9117: 0117-fix-host_addr6-can-be-assigned-a-multicast-address.patch
Patch9118: 0118-udp-do-not-merge-data-into-last-pbuf.patch
Patch9119: 0119-adpat-dpdk-23.11.patch
%description
%{name} is a high performance user-mode stack.
@ -166,6 +174,16 @@ install -Dpm 0640 %{_builddir}/%{name}-%{version}/src/ltran/ltran.conf %{b
%config(noreplace) %{conf_path}/ltran.conf
%changelog
* Sat Jan 20 CST yinbin6 <yinbin8@huawei.com> - 1.0.2-25
- adpat dpdk 23.11
- udp: do not merge data into last pbuf
- fix host_addr6 can be assigned a multicast address
- diff lstack and ltran dfx sock
- add socket accept fail cnt
- gazellectl: add tcp_input empty ack cnt
- lstack_dpdk: limit mbuf max num
- listen_shadow support ipv6
* Sat Jan 06 2024 yinbin6 <yinbin8@huawei.com> - 1.0.2-24
- replace with gz_addr_t
- update src/common/dpdk_common.c