!960 [sync] PR-907: add vlan filter
From: @openeuler-sync-bot Reviewed-by: @jiangheng12 Signed-off-by: @jiangheng12
This commit is contained in:
commit
d41b476628
28
0121-add-vlan-filter.patch
Normal file
28
0121-add-vlan-filter.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
diff --git a/src/include/dpdk_version.h b/src/include/dpdk_version.h
|
||||||
|
index df3adb5..bf03d98 100644
|
||||||
|
--- a/src/include/dpdk_version.h
|
||||||
|
+++ b/src/include/dpdk_version.h
|
||||||
|
@@ -56,6 +56,7 @@
|
||||||
|
#define RTE_ETH_RX_OFFLOAD_UDP_CKSUM DEV_RX_OFFLOAD_UDP_CKSUM
|
||||||
|
#define RTE_ETH_RX_OFFLOAD_IPV4_CKSUM DEV_RX_OFFLOAD_IPV4_CKSUM
|
||||||
|
#define RTE_ETH_RX_OFFLOAD_VLAN_STRIP DEV_RX_OFFLOAD_VLAN_STRIP
|
||||||
|
+#define RTE_ETH_RX_OFFLOAD_VLAN_FILTER DEV_RX_OFFLOAD_VLAN_FILTER
|
||||||
|
|
||||||
|
#define RTE_ETH_TX_OFFLOAD_IPV4_CKSUM DEV_TX_OFFLOAD_IPV4_CKSUM
|
||||||
|
#define RTE_ETH_TX_OFFLOAD_VLAN_INSERT DEV_TX_OFFLOAD_VLAN_INSERT
|
||||||
|
diff --git a/src/netif/ethernet.c b/src/netif/ethernet.c
|
||||||
|
index 0d8652b..d0d68b3 100644
|
||||||
|
--- a/src/netif/ethernet.c
|
||||||
|
+++ b/src/netif/ethernet.c
|
||||||
|
@@ -122,6 +122,11 @@ ethernet_input(struct pbuf *p, struct netif *netif)
|
||||||
|
MIB2_STATS_NETIF_INC(netif, ifinerrors);
|
||||||
|
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) {
|
||||||
|
+ goto free_and_return;
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
#if defined(LWIP_HOOK_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK_FN) /* if not, allow all VLANs */
|
||||||
|
#ifdef LWIP_HOOK_VLAN_CHECK
|
||||||
|
if (!LWIP_HOOK_VLAN_CHECK(netif, ethhdr, vlan)) {
|
||||||
@ -4,7 +4,7 @@
|
|||||||
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
|
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
|
||||||
Name: lwip
|
Name: lwip
|
||||||
Version: 2.2.0
|
Version: 2.2.0
|
||||||
Release: 13
|
Release: 14
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://savannah.nongnu.org/projects/lwip/
|
URL: http://savannah.nongnu.org/projects/lwip/
|
||||||
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
|
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
|
||||||
@ -132,6 +132,7 @@ Patch9116: 0117-udp-muticast-loop.patch
|
|||||||
Patch9117: 0118-support-querying-udp-multicast-addresses.patch
|
Patch9117: 0118-support-querying-udp-multicast-addresses.patch
|
||||||
Patch9118: 0119-support-igmpv3.patch
|
Patch9118: 0119-support-igmpv3.patch
|
||||||
Patch9119: 0120-enable-SO_REUSE_RXTOALL.patch
|
Patch9119: 0120-enable-SO_REUSE_RXTOALL.patch
|
||||||
|
Patch9120: 0121-add-vlan-filter.patch
|
||||||
|
|
||||||
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
||||||
|
|
||||||
@ -161,6 +162,9 @@ cd %{_builddir}/%{name}-%{version}/src
|
|||||||
%{_libdir}/liblwip.a
|
%{_libdir}/liblwip.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 08 2024 zhengjiebing <zhengjiebing@cmss.chinamobile.com> - 2.2.0-14
|
||||||
|
- add vlan filter
|
||||||
|
|
||||||
* Fri Mar 29 2024 liyunqing <liyunqing@kylinos.cn> - 2.2.0-13
|
* Fri Mar 29 2024 liyunqing <liyunqing@kylinos.cn> - 2.2.0-13
|
||||||
- enable SO_REUSE_RXTOALL
|
- enable SO_REUSE_RXTOALL
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user