代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 776ff89196c1fb5bc0193ea746119e40f80fed46 Mon Sep 17 00:00:00 2001
From: compile_success <980965867@qq.com>
Date: Fri, 22 Mar 2024 08:31:28 +0000
Subject: [PATCH] add udp poll
---
src/lstack/core/lstack_lwip.c | 8 ++++++++
src/lstack/core/lstack_protocol_stack.c | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
index a604a62..c5161b4 100644
--- a/src/lstack/core/lstack_lwip.c
+++ b/src/lstack/core/lstack_lwip.c
@@ -1307,6 +1307,14 @@ void netif_poll(struct netif *netif)
/* processes on same node handshake packet use this function */
err_t netif_loop_output(struct netif *netif, struct pbuf *p)
{
+ if (p != NULL) {
+ const struct ip_hdr *iphdr;
+ iphdr = (const struct ip_hdr *)p->payload;
+ if (IPH_PROTO(iphdr) == IP_PROTO_UDP) {
+ return udp_netif_loop_output(netif, p);
+ }
+ }
+
struct tcp_pcb *pcb = p->pcb;
struct pbuf *head = NULL;
diff --git a/src/lstack/core/lstack_protocol_stack.c b/src/lstack/core/lstack_protocol_stack.c
index 7c4af64..138ac2b 100644
--- a/src/lstack/core/lstack_protocol_stack.c
+++ b/src/lstack/core/lstack_protocol_stack.c
@@ -491,6 +491,10 @@ int stack_polling(uint32_t wakeup_tick)
}
}
+ if (cfg->udp_enable) {
+ udp_netif_poll(&stack->netif);
+ }
+
#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,
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。