!707 [sync] PR-702: sync adapt lwip 2.2.0
From: @openeuler-sync-bot Reviewed-by: @jiangheng12 Signed-off-by: @jiangheng12
This commit is contained in:
commit
28ba70b0ae
131
0131-adapt-lwip-2.2.0.patch
Normal file
131
0131-adapt-lwip-2.2.0.patch
Normal file
@ -0,0 +1,131 @@
|
||||
From feaa11fb77f6134639885c378d87903fc2301331 Mon Sep 17 00:00:00 2001
|
||||
From: jiangheng <jiangheng14@huawei.com>
|
||||
Date: Tue, 6 Feb 2024 09:55:23 +0800
|
||||
Subject: [PATCH] adapt lwip-2.2.0
|
||||
|
||||
---
|
||||
src/lstack/api/lstack_rtw_api.c | 2 +-
|
||||
src/lstack/core/lstack_lwip.c | 16 ++++++++--------
|
||||
src/lstack/core/lstack_protocol_stack.c | 8 ++++----
|
||||
3 files changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/src/lstack/api/lstack_rtw_api.c b/src/lstack/api/lstack_rtw_api.c
|
||||
index 839d320..10bc613 100644
|
||||
--- a/src/lstack/api/lstack_rtw_api.c
|
||||
+++ b/src/lstack/api/lstack_rtw_api.c
|
||||
@@ -168,7 +168,7 @@ static ssize_t rtw_udp_recvfrom(int sockfd, void *buf, size_t len, int flags,
|
||||
}
|
||||
sock = sock->listen_next;
|
||||
if (sock != NULL && sock->conn != NULL) {
|
||||
- sockfd = sock->conn->socket;
|
||||
+ sockfd = sock->conn->callback_arg.socket;
|
||||
} else {
|
||||
if (sock == NULL) {
|
||||
errno = EAGAIN;
|
||||
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
|
||||
index 22605dd..2ba18e2 100644
|
||||
--- a/src/lstack/core/lstack_lwip.c
|
||||
+++ b/src/lstack/core/lstack_lwip.c
|
||||
@@ -973,9 +973,9 @@ void do_lwip_read_recvlist(struct protocol_stack *stack, uint32_t max_num)
|
||||
|
||||
ssize_t len = 0;
|
||||
if (NETCONN_IS_UDP(sock)) {
|
||||
- len = lwip_recv(sock->conn->socket, NULL, SSIZE_MAX, 0);
|
||||
+ len = lwip_recv(sock->conn->callback_arg.socket, NULL, SSIZE_MAX, 0);
|
||||
} else {
|
||||
- len = lwip_recv(sock->conn->socket, NULL, 0, 0);
|
||||
+ len = lwip_recv(sock->conn->callback_arg.socket, NULL, 0, 0);
|
||||
}
|
||||
if (len < 0 && errno != EAGAIN) {
|
||||
sock->errevent = 1;
|
||||
@@ -993,7 +993,7 @@ void do_lwip_connected_callback(struct netconn *conn)
|
||||
return;
|
||||
}
|
||||
|
||||
- int32_t fd = conn->socket;
|
||||
+ int32_t fd = conn->callback_arg.socket;
|
||||
struct lwip_sock *sock = get_socket_by_fd(fd);
|
||||
if (sock == NULL || sock->conn == NULL) {
|
||||
return;
|
||||
@@ -1033,9 +1033,9 @@ static void copy_pcb_to_conn(struct gazelle_stat_lstack_conn_info *conn, const s
|
||||
conn->keep_cnt = pcb->keep_cnt;
|
||||
|
||||
if (netconn != NULL) {
|
||||
- conn->fd = netconn->socket;
|
||||
+ conn->fd = netconn->callback_arg.socket;
|
||||
conn->recv_cnt = (netconn->recvmbox == NULL) ? 0 : rte_ring_count(netconn->recvmbox->ring);
|
||||
- struct lwip_sock *sock = get_socket(netconn->socket);
|
||||
+ struct lwip_sock *sock = get_socket(netconn->callback_arg.socket);
|
||||
if (sock != NULL) {
|
||||
conn->recv_ring_cnt = (sock->recv_ring == NULL) ? 0 : gazelle_ring_readable_count(sock->recv_ring);
|
||||
conn->recv_ring_cnt += (sock->recv_lastdata) ? 1 : 0;
|
||||
@@ -1121,7 +1121,7 @@ uint32_t do_lwip_get_conntable(struct gazelle_stat_lstack_conn_info *conn,
|
||||
conn[conn_num].l_port = pcbl->local_port;
|
||||
conn[conn_num].tcp_sub_state = pcbl->state;
|
||||
struct netconn *netconn = (struct netconn *)pcbl->callback_arg;
|
||||
- conn[conn_num].fd = netconn != NULL ? netconn->socket : -1;
|
||||
+ conn[conn_num].fd = netconn != NULL ? netconn->callback_arg.socket : -1;
|
||||
if (netconn != NULL && netconn->acceptmbox != NULL) {
|
||||
conn[conn_num].recv_cnt = rte_ring_count(netconn->acceptmbox->ring);
|
||||
}
|
||||
@@ -1319,7 +1319,7 @@ err_t same_node_ring_create(struct rte_ring **ring, int size, int port, char *na
|
||||
static void init_same_node_ring(struct tcp_pcb *pcb)
|
||||
{
|
||||
struct netconn *netconn = (struct netconn *)pcb->callback_arg;
|
||||
- struct lwip_sock *sock = get_socket(netconn->socket);
|
||||
+ struct lwip_sock *sock = get_socket(netconn->callback_arg.socket);
|
||||
|
||||
pcb->client_rx_ring = NULL;
|
||||
pcb->client_tx_ring = NULL;
|
||||
@@ -1334,7 +1334,7 @@ static void init_same_node_ring(struct tcp_pcb *pcb)
|
||||
err_t create_same_node_ring(struct tcp_pcb *pcb)
|
||||
{
|
||||
struct netconn *netconn = (struct netconn *)pcb->callback_arg;
|
||||
- struct lwip_sock *sock = get_socket(netconn->socket);
|
||||
+ struct lwip_sock *sock = get_socket(netconn->callback_arg.socket);
|
||||
|
||||
if (same_node_ring_create(&pcb->client_rx_ring, CLIENT_RING_SIZE, pcb->local_port, "client", "rx") != 0) {
|
||||
goto END;
|
||||
diff --git a/src/lstack/core/lstack_protocol_stack.c b/src/lstack/core/lstack_protocol_stack.c
|
||||
index 9e2197c..8b99e82 100644
|
||||
--- a/src/lstack/core/lstack_protocol_stack.c
|
||||
+++ b/src/lstack/core/lstack_protocol_stack.c
|
||||
@@ -903,7 +903,7 @@ void stack_send(struct rpc_msg *msg)
|
||||
return;
|
||||
}
|
||||
|
||||
- replenish_again = do_lwip_send(stack, sock->conn->socket, sock, len, 0);
|
||||
+ replenish_again = do_lwip_send(stack, sock->conn->callback_arg.socket, sock, len, 0);
|
||||
if (replenish_again < 0) {
|
||||
__sync_fetch_and_sub(&sock->call_num, 1);
|
||||
return;
|
||||
@@ -1102,7 +1102,7 @@ int32_t stack_broadcast_close(int32_t fd)
|
||||
if (sock == NULL || sock->conn == NULL) {
|
||||
break;
|
||||
}
|
||||
- fd = sock->conn->socket;
|
||||
+ fd = sock->conn->callback_arg.socket;
|
||||
} while (sock);
|
||||
|
||||
return ret;
|
||||
@@ -1125,7 +1125,7 @@ int stack_broadcast_shutdown(int fd, int how)
|
||||
if (sock == NULL || sock->conn == NULL) {
|
||||
break;
|
||||
}
|
||||
- fd = sock->conn->socket;
|
||||
+ fd = sock->conn->callback_arg.socket;
|
||||
} while (sock);
|
||||
|
||||
return ret;
|
||||
@@ -1290,7 +1290,7 @@ int32_t stack_broadcast_accept4(int32_t fd, struct sockaddr *addr, socklen_t *ad
|
||||
}
|
||||
|
||||
if (min_sock && min_sock->conn) {
|
||||
- ret = rpc_call_accept(min_sock->conn->socket, addr, addrlen, flags);
|
||||
+ ret = rpc_call_accept(min_sock->conn->callback_arg.socket, addr, addrlen, flags);
|
||||
}
|
||||
|
||||
if (min_sock && min_sock->wakeup && min_sock->wakeup->type == WAKEUP_EPOLL) {
|
||||
--
|
||||
2.33.0
|
||||
|
||||
10
gazelle.spec
10
gazelle.spec
@ -2,7 +2,7 @@
|
||||
|
||||
Name: gazelle
|
||||
Version: 1.0.2
|
||||
Release: 26
|
||||
Release: 27
|
||||
Summary: gazelle is a high performance user-mode stack
|
||||
License: MulanPSL-2.0
|
||||
URL: https://gitee.com/openeuler/gazelle
|
||||
@ -144,6 +144,7 @@ Patch9127: 0127-add-bond1-support.patch
|
||||
Patch9128: 0128-fix-t_params-double-free.patch
|
||||
Patch9129: 0129-fix-receive-fin-packet-process-error.patch
|
||||
Patch9130: 0130-support-netperf-UDP_STREAM-and-UDP_RR.patch
|
||||
Patch9131: 0131-adapt-lwip-2.2.0.patch
|
||||
|
||||
%description
|
||||
%{name} is a high performance user-mode stack.
|
||||
@ -185,7 +186,10 @@ install -Dpm 0640 %{_builddir}/%{name}-%{version}/src/ltran/ltran.conf %{b
|
||||
%config(noreplace) %{conf_path}/ltran.conf
|
||||
|
||||
%changelog
|
||||
* Sun Feb 4 CST yinbin6 <yinbin8@huawei.com> - 1.0.2-26
|
||||
* Wed Feb 07 2024 yibin6 <yinbin8@huawei.com> - 1.0.2-27
|
||||
- support netperf UDP_STREAM and UDP_RR
|
||||
|
||||
* Sun Feb 4 2024 yinbin6 <yinbin8@huawei.com> - 1.0.2-26
|
||||
- support netperf UDP_STREAM and UDP_RR
|
||||
- fix receive fin packet process error
|
||||
- fix t_params double free
|
||||
@ -198,7 +202,7 @@ install -Dpm 0640 %{_builddir}/%{name}-%{version}/src/ltran/ltran.conf %{b
|
||||
- remove unused variables in pbuf and reduce mbuf size
|
||||
- modify conf vlan default vlaue
|
||||
|
||||
* Sat Jan 20 CST yinbin6 <yinbin8@huawei.com> - 1.0.2-25
|
||||
* Sat Jan 20 2024 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user