From 33aaebe34efb796663aff09c00420d2f41287f35 Mon Sep 17 00:00:00 2001 From: yinyongkang Date: Tue, 11 Jun 2024 11:35:15 +0800 Subject: [PATCH] Sync patchs from master --- ...-change-STAT_COUNTER-from-u16-to-u64.patch | 28 +++++++++++++++++++ 0136-fix-vlan-filter-bug.patch | 25 +++++++++++++++++ lwip.spec | 10 ++++++- 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 0135-change-STAT_COUNTER-from-u16-to-u64.patch create mode 100644 0136-fix-vlan-filter-bug.patch diff --git a/0135-change-STAT_COUNTER-from-u16-to-u64.patch b/0135-change-STAT_COUNTER-from-u16-to-u64.patch new file mode 100644 index 0000000..8b4143e --- /dev/null +++ b/0135-change-STAT_COUNTER-from-u16-to-u64.patch @@ -0,0 +1,28 @@ +From 2d03a11cfbbe8885339fda776f45ad3d26829d9f Mon Sep 17 00:00:00 2001 +From: ningjin +Date: Mon, 20 May 2024 17:33:12 +0800 +Subject: [PATCH] change STAT_COUNTER from u16 to u64 + +--- + src/include/lwip/stats.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/include/lwip/stats.h b/src/include/lwip/stats.h +index f99f6e5..6798f48 100644 +--- a/src/include/lwip/stats.h ++++ b/src/include/lwip/stats.h +@@ -52,7 +52,10 @@ extern "C" { + #define LWIP_STATS_LARGE 0 + #endif + +-#if LWIP_STATS_LARGE ++#if GAZELLE_ENABLE ++#define STAT_COUNTER u64_t ++#define STAT_COUNTER_F U64_F ++#elif LWIP_STATS_LARGE + #define STAT_COUNTER u32_t + #define STAT_COUNTER_F U32_F + #else +-- +2.27.0 + diff --git a/0136-fix-vlan-filter-bug.patch b/0136-fix-vlan-filter-bug.patch new file mode 100644 index 0000000..6904930 --- /dev/null +++ b/0136-fix-vlan-filter-bug.patch @@ -0,0 +1,25 @@ +diff --git a/src/netif/ethernet.c b/src/netif/ethernet.c +index d0d68b3..5ba6d95 100644 +--- a/src/netif/ethernet.c ++++ b/src/netif/ethernet.c +@@ -123,7 +123,9 @@ ethernet_input(struct pbuf *p, struct netif *netif) + goto free_and_return; + } + #if GAZELLE_ENABLE +- if (netif->vlan_enable && !(netif->txol_flags & RTE_ETH_RX_OFFLOAD_VLAN_FILTER) && VLAN_ID(vlan) != netif->vlan_tci) { ++ /* 1.if vlan mode is not enable, ignore VLAN packets. ++ 2.if vlan mode is enable, ignore packets not for our VLAN */ ++ if (netif->vlan_enable == false || (netif->vlan_enable && VLAN_ID(vlan) != netif->vlan_tci)) { + goto free_and_return; + } + #endif +@@ -141,6 +143,9 @@ ethernet_input(struct pbuf *p, struct netif *netif) + } + #endif /* defined(LWIP_HOOK_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK_FN) */ + type = vlan->tpid; ++ } else if (netif->vlan_enable && !(netif->txol_flags & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)) { ++ /* if vlan mode is enable but vlan strip offload is off, ignore packets without vlan info. */ ++ goto free_and_return; + } + #endif /* ETHARP_SUPPORT_VLAN */ + diff --git a/lwip.spec b/lwip.spec index 7d96ffd..b95159c 100644 --- a/lwip.spec +++ b/lwip.spec @@ -4,7 +4,7 @@ Summary: lwip is a small independent implementation of the TCP/IP protocol suite Name: lwip Version: 2.2.0 -Release: 27 +Release: 29 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip @@ -146,6 +146,8 @@ Patch9130: 0131-add-MCAST_BLOCK_SOURCE-to-setsockopt-for-igmpv3.patch Patch9131: 0132-mod-udp-loop-mem-leak.patch Patch9132: 0133-allow-membership-to-register-multiple-times.patch Patch9133: 0134-mod-checksum-of-ip_hdr-and-udp_hdr.patch +Patch9134: 0135-change-STAT_COUNTER-from-u16-to-u64.patch +Patch9135: 0136-fix-vlan-filter-bug.patch BuildRequires: gcc-c++ dos2unix dpdk-devel @@ -175,6 +177,12 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Fri May 24 2024 zhengjiebing - 2.2.0-29 +- fix vlan filter bug + +* Tue May 21 2024 ningjin - 2.2.0-28 +- change change STAT_COUNTER from u16 to u64 + * Thu May 09 2024 hankangkang - 2.2.0-27 - mod checksum of ip_hdr and udp_hdr -- Gitee