Compare commits

..

No commits in common. "18858f43837b5ed08fd351517325b39839f8ffa4" and "baccccfcb4e88db134556e09b4e9e7abf4a79139" have entirely different histories.

6 changed files with 1 additions and 219 deletions

View File

@ -1,22 +0,0 @@
diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c
index abc6465..905f7cf 100644
--- a/src/core/tcp_in.c
+++ b/src/core/tcp_in.c
@@ -2029,7 +2029,7 @@ tcp_receive(struct tcp_pcb *pcb)
#endif /* TCP_OOSEQ_BYTES_LIMIT || TCP_OOSEQ_PBUFS_LIMIT */
#endif /* TCP_QUEUE_OOSEQ */
-#if GAZELLE_TCP_PINGONG_MODE
+#if GAZELLE_TCP_PINGPONG_MODE
tcp_exit_pingpong(pcb); /* ooseq */
#endif
/* We send the ACK packet after we've (potentially) dealt with SACKs,
@@ -2038,7 +2038,7 @@ tcp_receive(struct tcp_pcb *pcb)
tcp_send_empty_ack(pcb);
}
} else {
-#if GAZELLE_TCP_PINGONG_MODE
+#if GAZELLE_TCP_PINGPONG_MODE
tcp_exit_pingpong(pcb); /* out of window */
#endif
/* The incoming segment is not within the window. */

View File

@ -1,24 +0,0 @@
From 20289719d3d489151ae3fd632a81e90886861ae9 Mon Sep 17 00:00:00 2001
From: jiangheng <jiangheng14@huawei.com>
Date: Tue, 10 Dec 2024 16:29:59 +0800
Subject: [PATCH] add recv_block in lwip_sock
---
src/include/lwipgz_sock.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/include/lwipgz_sock.h b/src/include/lwipgz_sock.h
index 4f8e17b..95c26df 100644
--- a/src/include/lwipgz_sock.h
+++ b/src/include/lwipgz_sock.h
@@ -182,6 +182,7 @@ struct lwip_sock {
struct lwip_sock *listen_next; /* listenfd list */
struct protocol_stack *stack;
struct wakeup_poll *wakeup;
+ struct wakeup_poll *recv_block;
epoll_data_t ep_data;
struct rte_ring *recv_ring;
struct rte_ring *send_ring;
--
2.33.0

View File

@ -1,34 +0,0 @@
From af04d2037d5813f2bcbbc26ea3dea389556b2bea Mon Sep 17 00:00:00 2001
From: yangchen <yangchen145@huawei.com>
Date: Mon, 13 Jan 2025 10:41:10 +0800
Subject: [PATCH] fix pcb.tcp null pointer error when netperf recv RST
---
src/api/sockets.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/api/sockets.c b/src/api/sockets.c
index 69c3086..9fafca3 100644
--- a/src/api/sockets.c
+++ b/src/api/sockets.c
@@ -3147,7 +3147,7 @@ lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *opt
#endif /* LWIP_SO_RCVTIMEO */
#if GAZELLE_SO_SNDBUF
case SO_SNDBUF:
- LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, tcpwnd_size_t);
+ LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, tcpwnd_size_t);
if (netconn_type(sock->conn) == NETCONN_TCP) {
*(tcpwnd_size_t *)optval = netconn_get_sndbufsize(sock->conn);
}
@@ -3556,7 +3556,7 @@ lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_
#endif /* LWIP_SO_RCVTIMEO */
#if GAZELLE_SO_SNDBUF
case SO_SNDBUF:
- LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, tcpwnd_size_t);
+ LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, tcpwnd_size_t);
if (netconn_type(sock->conn) == NETCONN_TCP) {
netconn_set_sndbufsize(sock->conn, *(const tcpwnd_size_t *)optval);
}
--
2.33.0

View File

@ -1,91 +0,0 @@
From 5d09d36ddf74da9c5fa87a6dd5bc104fe99bdce6 Mon Sep 17 00:00:00 2001
From: jiangheng <jiangheng14@huawei.com>
Date: Sat, 18 Jan 2025 20:55:43 +0800
Subject: [PATCH] tso: max frags is configurable
---
src/core/netif.c | 10 ++++++++++
src/core/tcp_out.c | 4 ++--
src/include/lwip/netif.h | 6 +++++-
src/include/lwipopts.h | 5 -----
4 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/src/core/netif.c b/src/core/netif.c
index eba9a0b..b79ab57 100644
--- a/src/core/netif.c
+++ b/src/core/netif.c
@@ -1117,6 +1117,16 @@ netif_set_txol_flags(struct netif *netif, u64_t flags)
{
netif->txol_flags |= flags;
}
+
+void netif_set_max_pbuf_frags(struct netif *netif, u8_t max_frags)
+{
+ netif->max_pbuf_frags = max_frags;
+}
+
+void netif_set_min_tso_seglen(struct netif *netif, u16_t min_tso_seglen)
+{
+ netif->min_tso_seglen = min_tso_seglen;
+}
#endif
#if LWIP_NETIF_LINK_CALLBACK
diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c
index 93ef958..cf93482 100644
--- a/src/core/tcp_out.c
+++ b/src/core/tcp_out.c
@@ -1578,8 +1578,8 @@ tcp_output(struct tcp_pcb *pcb)
struct tcp_seg *last_seg = NULL;
u16_t last_seg_len = 0;
u8_t pbuf_chain_len = 0;
- while (seg != NULL && seg_seqno - pcb->lastack + seg->len <= wnd && pbuf_chain_len < GAZELLE_TCP_MAX_PBUF_CHAIN_LEN) {
- if (last_seg_len != 0 && (last_seg_len + seg->len < 1460) && seg->len < GAZELLE_TCP_MIN_TSO_SEG_LEN) {
+ while (seg != NULL && seg_seqno - pcb->lastack + seg->len <= wnd && pbuf_chain_len < netif->max_pbuf_frags) {
+ if (last_seg_len != 0 && (last_seg_len + seg->len < 1460) && seg->len < netif->min_tso_seglen) {
break;
}
diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h
index 3deefb0..75157de 100644
--- a/src/include/lwip/netif.h
+++ b/src/include/lwip/netif.h
@@ -372,6 +372,9 @@ struct netif {
/** vlan id is an attribute of NIC. The variable 'netif_hints' is not used because it is assigned by pcb,
* while non transport layers without pcb cannot be enabled */
u16_t vlan_tci;
+
+ u8_t max_pbuf_frags;
+ u16_t min_tso_seglen;
#endif
/** descriptive abbreviation */
char name[2];
@@ -508,7 +511,8 @@ void netif_set_vlan_tci(struct netif *netif, u16_t vlan_tci);
void netif_set_rtc_mode(struct netif *netif);
void netif_set_rxol_flags(struct netif *netif, u64_t flags);
void netif_set_txol_flags(struct netif *netif, u64_t flags);
-
+void netif_set_min_tso_seglen(struct netif *netif, u16_t min_tso_seglen);
+void netif_set_max_pbuf_frags(struct netif *netif, u8_t max_frags);
#endif
#if LWIP_NETIF_STATUS_CALLBACK
diff --git a/src/include/lwipopts.h b/src/include/lwipopts.h
index 572d550..2ac48f5 100644
--- a/src/include/lwipopts.h
+++ b/src/include/lwipopts.h
@@ -55,11 +55,6 @@
#define GAZELLE_TCP_NEW_PORT 1
-#define GAZELLE_TCP_MAX_PBUF_CHAIN_LEN 40
-
-#define GAZELLE_TCP_MIN_TSO_SEG_LEN 256
-
-
#define GAZELLE_UDP_ENABLE 1
#define GAZELLE_UDP_NEW_PORT 1
--
2.33.0

View File

@ -1,26 +0,0 @@
From adaac65b8b854b42de4012ff8c93363008a6d90c Mon Sep 17 00:00:00 2001
From: yinbin <yinbin8@huawei.com>
Date: Thu, 13 Feb 2025 14:18:22 +0800
Subject: [PATCH] TCP_IN: fix infinite loopping in func min_cnts_lpcb_get
---
src/core/tcp_in.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c
index 905f7cf..75a2a48 100644
--- a/src/core/tcp_in.c
+++ b/src/core/tcp_in.c
@@ -137,8 +137,8 @@ struct tcp_pcb_listen *min_cnts_lpcb_get(struct tcp_pcb_listen *lpcb)
min_cnts_lpcb = tmp_lpcb;
min_conn_num = tmp_lpcb->connect_num;
}
- tmp_lpcb = tmp_lpcb->next_same_port_pcb;
}
+ tmp_lpcb = tmp_lpcb->next_same_port_pcb;
}
return min_cnts_lpcb;
}
--
2.34.1

View File

@ -4,7 +4,7 @@
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
Name: lwip
Version: 2.2.0
Release: 70
Release: 65
License: BSD
URL: http://savannah.nongnu.org/projects/lwip/
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
@ -190,12 +190,6 @@ Patch9174: 0175-fix-IFNAMSIZ-definition-conflict-between-lwip-and-ke.patch
Patch9175: 0176-fix-no-ack-response-when-lcoal-only-receive-but-not-.patch
Patch9176: 0001-bug-free-sock-when-func-goto-out.patch
Patch9177: 0177-pingpong-fix-spelling-error.patch
Patch9178: 0178-add-recv_block-in-lwip_sock.patch
Patch9179: 0179-fix-pcb.tcp-null-pointer-error-when-netperf-recv-RST.patch
Patch9180: 0180-tso-max-frags-is-configurable.patch
Patch9181: 0181-TCP_IN-fix-infinite-loopping-in-func-min_cnts_lpcb_g.patch
BuildRequires: gcc-c++ dos2unix dpdk-devel
@ -225,21 +219,6 @@ cd %{_builddir}/%{name}-%{version}/src
%{_libdir}/liblwip.a
%changelog
* Thu Feb 13 2025 yinbin <yinbin8@huawei.com> - 2.2.0-70
- TCP_IN: fix infinite loopping in func min_cnts_lpcb_get
* Sat Jan 18 2025 jiangheng <jiangheng14@huawei.com> - 2.2.0-69
- tso: max frags is configurable
* Tue Jan 14 2025 yangchen <yangchen145@huawei.com> - 2.2.0-68
- fix pcb.tcp null pointer error when netperf recv RST
* Tue Dec 10 2024 jiangheng <jiangheng14@huawei.com> - 2.2.0-67
- add recv_block in lwip_sock
* Fri Dec 6 2024 suchangzhi <suchangzhi_yewu@cmss.chinamobile.com> - 2.2.0-66
- fix pingpong mode spelling error
* Thu Nov 28 2024 hankangkang <hankangkang5@huawei.com> - 2.2.0-65
- bug: free sock when exit