[Components][lwip]Add lwip-2.2.1 support - #11797
Tim-Wang38 wants to merge 4 commits into
Conversation
Verbatim upstream lwIP 2.2.1 official release (STABLE-2.2.1), complete with apps/, test/ and Filelists.
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
📌 Code Review Assignment🏷️ Tag: componentsReviewers: @Maihuanyi Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2026-09-23 15:57 CST)
📝 Review Instructions
|
|
3d388ec to
04a4e19
Compare
….1.2 - Kconfig: RT_USING_LWIP221 choice, RT_USING_LWIP_VER_NUM=0x20201 - SConscript for lwip-2.2.1 (acd.c, mdns split files, tftp.c) - replay RTT patch set from lwip-2.1.2 onto 2.2.1 - import RTT ping.c and tftp_port.c (adapted to 2.2.x TFTP API) - SAL: version-gated netconn socket accessor (callback_arg union >= 2.2.0) - lwipopts: DHCP ACD (RFC 5227) and MEMP_NUM_SYS_TIMEOUT version gates
04a4e19 to
639c28a
Compare
|
components/net/lwip/lwip-2.2.1/doc/doxygen/output/html |
|
已经删除html目录下冗余文件 |
| * | ||
| * @note This function will block until all data can be sent. | ||
| */ | ||
| u32_t sio_write(sio_fd_t fd, const u8_t *data, u32_t len); |
There was a problem hiding this comment.
rt-thread/components/net/lwip/port/sys_arch.c
Lines 603 to 607 in 005d291
这一块应该要对2.2.1版本做个兼容
| * Keep RT's &name[1] offset; upstream 2.2.1 added an atoi-failure check | ||
| * which is adapted here for the 2-char naming convention. */ | ||
| num = (u8_t)atoi(&name[1]); | ||
| if (!num && (name[1] != '0')) { |
There was a problem hiding this comment.
https://github.com/lwip-tcpip/lwip/blob/d08f4773edd0182b7910fc8f046eed82ffcd67c9/src/core/netif.c#L1769-L1772
这个内容跟最新的lwip对齐一下,不然ppp新增网卡会失败
There was a problem hiding this comment.
如果使用最新的lwip的代码的话这里普通两字符名称的网卡比如‘e0’会返回null,这里添加一段代码做检查是否可行?
const char *num_str = name;
while (*num_str != '\0' && !lwip_isdigit((unsigned char)*num_str)) {
num_str++;
}
num = (u8_t)atoi(num_str);
if (!num && (num_str != '0')) {
/ this means atoi has failed */
return NULL;
}
There was a problem hiding this comment.
如果使用最新的lwip的代码的话这里普通两字符名称的网卡比如‘e0’会返回null,这里添加一段代码做检查是否可行? const char *num_str = name; while (*num_str != '\0' && !lwip_isdigit((unsigned char)*num_str)) { num_str++; } num = (u8_t)atoi(num_str); if (!num && (num_str != '0')) { / this means atoi has failed */ return NULL; }
也许可以先不管这个ppp相关的,因为我看前几个版本应该也会有类似的问题,这个看看后续有什么方案在改进。可以先把lwip2.2.1这个先合并到主仓
|
在STM32H7上面验证lwip2.2.1没有问题 |
拉取/合并请求描述:(PR description) Fixed #11588
[
为什么提交这份PR (why to submit this PR)
Add the latest lwip support
请提供验证的bsp和config (provide the config and bsp)
BSP: bsp/nxp/imx/imxrt/imxrt1180-nxp-evk/m7
.config:
BSP_USING_ETH
RT_USING_SAL
RT_USING_NETDEV
RT_USING_LWIP
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up