diff --git a/0001-remove-unused-dpdk-dynamic-libraries.patch b/0001-remove-unused-dpdk-dynamic-libraries.patch new file mode 100644 index 0000000..ec98466 --- /dev/null +++ b/0001-remove-unused-dpdk-dynamic-libraries.patch @@ -0,0 +1,93 @@ +From dac81b016b6eccfc9f4061c22c1e78d36ca17f88 Mon Sep 17 00:00:00 2001 +From: jiangheng +Date: Wed, 28 Jun 2023 10:30:48 +0800 +Subject: [PATCH] remove unused dpdk dynamic libraries + +--- + src/lstack/Makefile | 6 +----- + src/ltran/CMakeLists.txt | 42 +++++++++------------------------------- + 2 files changed, 10 insertions(+), 38 deletions(-) + +diff --git a/src/lstack/Makefile b/src/lstack/Makefile +index d9c8396..3550244 100644 +--- a/src/lstack/Makefile ++++ b/src/lstack/Makefile +@@ -98,12 +98,8 @@ else + $(LIB_PATH)/librte_net_i40e.so \ + $(LIB_PATH)/librte_net_ixgbe.so \ + $(LIB_PATH)/librte_net_virtio.so \ +- $(LIB_PATH)/librte_pcapng.so \ +- $(LIB_PATH)/librte_rcu.so \ + $(LIB_PATH)/librte_telemetry.so \ +- $(LIB_PATH)/librte_bpf.so \ +- $(LIB_PATH)/librte_security.so \ +- $(LIB_PATH)/librte_cryptodev.so ++ $(LIB_PATH)/librte_pcapng.so + endif + + DEP_LIBS = $(LWIP_LIB) $(LIBRTE_LIB) +diff --git a/src/ltran/CMakeLists.txt b/src/ltran/CMakeLists.txt +index 1370dc8..b8d92b7 100644 +--- a/src/ltran/CMakeLists.txt ++++ b/src/ltran/CMakeLists.txt +@@ -30,29 +30,12 @@ endif($ENV{GAZELLE_COVERAGE_ENABLE}) + if($ENV{DPDK_VERSION_1911}) + set(DPDK_DIR /usr/include/dpdk) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDPDK_VERSION_1911=1") +- set(DPDK_LINK_FLAGS "-Wl,-lrte_pmd_af_packet -Wl,-lrte_pmd_ark -Wl,-lrte_pmd_atlantic -Wl,-lrte_pmd_axgbe \ +- -Wl,-lrte_pmd_bnxt -Wl,-lrte_pmd_bond -Wl,-lrte_pmd_cxgbe -Wl,-lrte_pmd_dpaa -Wl,-lrte_pmd_dpaa2 \ +- -Wl,-lrte_pmd_e1000 -Wl,-lrte_pmd_ena -Wl,-lrte_pmd_enetc -Wl,-lrte_pmd_enic -Wl,-lrte_pmd_failsafe \ +- -Wl,-lrte_pmd_i40e -Wl,-lrte_pmd_hinic -Wl,-lrte_pmd_ixgbe -Wl,-lrte_pmd_kni \ +- -Wl,-lrte_pmd_nfp -Wl,-lrte_pmd_null -Wl,-lpcap -Wl,-lrte_pmd_qede -Wl,-lrte_pmd_ring -Wl,-lrte_pmd_softnic \ +- -Wl,-lrte_pmd_pcap -Wl,-lrte_pmd_tap -Wl,-lrte_pmd_vdev_netvsc -Wl,-lrte_pmd_virtio -Wl,-lrte_pmd_vhost \ +- -Wl,-lrte_mempool_octeontx -Wl,-lrte_pmd_octeontx -Wl,-lrte_bus_vmbus -Wl,-lrte_pmd_netvsc \ +- -Wl,-lrte_pmd_vmxnet3_uio -Wl,-lrte_pmd_bbdev_null \ +- -Wl,-lrte_pmd_null_crypto -Wl,-lrte_pmd_octeontx_crypto -Wl,-lrte_pmd_crypto_scheduler \ +- -Wl,-lrte_pmd_dpaa2_sec -Wl,-lrte_pmd_dpaa_sec -Wl,-lrte_pmd_caam_jr -Wl,-lrte_pmd_virtio_crypto \ +- -Wl,-lrte_pmd_octeontx_zip -Wl,-lrte_pmd_qat -Wl,-lrte_pmd_skeleton_event -Wl,-lrte_pmd_sw_event \ +- -Wl,-lrte_pmd_dsw_event -Wl,-lrte_pmd_octeontx_ssovf -Wl,-lrte_pmd_dpaa_event -Wl,-lrte_pmd_dpaa2_event \ +- -Wl,-lrte_pmd_opdl_event -Wl,-lrte_pmd_lio -Wl,-lrte_pmd_thunderx_nicvf -Wl,-lrte_pmd_ifc") ++ set(DPDK_LINK_FLAGS "-Wl,-lrte_pmd_bond -Wl,-lrte_pmd_i40e -Wl,-lrte_pmd_hinic -Wl,-lrte_pmd_ixgbe \ ++ -Wl,-lrte_pmd_pcap -Wl,-lrte_pmd_virtio") + else() + set(DPDK_DIR /usr/local/include/) +- set(DPDK_LINK_FLAGS "-Wl,-lrte_net_af_packet -Wl,-lrte_net_ark -Wl,-lrte_net_atlantic -Wl,-lrte_net_axgbe \ +- -Wl,-lrte_net_bnxt -Wl,-lrte_net_bond -Wl,-lrte_net_cxgbe -Wl,-lrte_net_dpaa -Wl,-lrte_net_dpaa2 \ +- -Wl,-lrte_net_e1000 -Wl,-lrte_net_ena -Wl,-lrte_net_enetc -Wl,-lrte_net_enic -Wl,-lrte_net_failsafe \ +- -Wl,-lrte_net_i40e -Wl,-lrte_net_hinic -Wl,-lrte_net_ixgbe -Wl,-lrte_net_kni \ +- -Wl,-lrte_net_nfp -Wl,-lrte_net_null -Wl,-lpcap -Wl,-lrte_net_qede -Wl,-lrte_net_ring -Wl,-lrte_net_softnic \ +- -Wl,-lrte_net_pcap -Wl,-lrte_net_tap -Wl,-lrte_net_vdev_netvsc -Wl,-lrte_net_virtio -Wl,-lrte_net_vhost \ +- -Wl,-lrte_mempool_octeontx -Wl,-lrte_net_octeontx -Wl,-lrte_bus_vmbus -Wl,-lrte_net_netvsc \ +- -Wl,-lrte_telemetry") ++ set(DPDK_LINK_FLAGS "-Wl,-lrte_net_bond -Wl,-lrte_net_i40e -Wl,-lrte_net_hinic -Wl,-lrte_net_ixgbe \ ++ -Wl,-lpcap -Wl,-lrte_net_pcap -Wl,-lrte_net_virtio -Wl,-lrte_pcapng -Wl,-lrte_telemetry") + endif($ENV{DPDK_VERSION_1911}) + + add_executable(ltran main.c ltran_param.c ltran_config.c ltran_ethdev.c ltran_stat.c ltran_errno.c +@@ -69,18 +52,11 @@ target_compile_options(ltran PRIVATE -march=native -fno-strict-aliasing -D__ARM_ + -Wdeprecated -Wwrite-strings -Wno-implicit-fallthrough -D_FORTIFY_SOURCE=2) + + target_link_libraries(ltran PRIVATE config boundscheck rte_pdump -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wtrampolines) +-set_target_properties(ltran PROPERTIES LINK_FLAGS "-L$ENV{DPDK_LIB_PATH} -Wl,--whole-archive -Wl,-lrte_pipeline \ +- -Wl,--no-whole-archive -Wl,-lrte_table -Wl,--whole-archive -Wl,--no-whole-archive -Wl,--whole-archive -Wl,-lrte_port -Wl,--no-whole-archive \ +- -Wl,-lrte_distributor -Wl,-lrte_meter -Wl,-lrte_ip_frag -Wl,-lrte_lpm -Wl,--whole-archive -Wl,-lrte_acl -Wl,--no-whole-archive \ +- -Wl,-lrte_jobstats -Wl,-lrte_bitratestats -Wl,-lrte_metrics -Wl,-lrte_latencystats -Wl,-lrte_power -Wl,-lrte_efd -Wl,-lrte_bpf \ +- -Wl,--whole-archive -Wl,-lrte_gro -Wl,-lrte_cfgfile -Wl,-lrte_gso -Wl,-lrte_hash -Wl,-lrte_member -Wl,-lrte_vhost -Wl,-lrte_kvargs \ +- -Wl,-lrte_mbuf -Wl,-lrte_ethdev -Wl,-lrte_net -Wl,-lrte_bbdev -Wl,-lrte_cryptodev -Wl,-lrte_security -Wl,-lrte_compressdev -Wl,-lrte_eventdev \ +- -Wl,-lrte_rawdev -Wl,-lrte_timer -Wl,-lrte_mempool -Wl,-lrte_mempool_ring -Wl,-lrte_ring -Wl,-lrte_pci \ +- -Wl,-Bstatic -lrte_eal -Wl,-Bdynamic -Wl,-lrte_cmdline \ +- -Wl,-lrte_sched -Wl,-lrte_reorder -Wl,-lrte_kni -Wl,-lrte_common_cpt -Wl,-lrte_common_octeontx -Wl,-lrte_common_dpaax -Wl,-lrte_bus_pci \ +- -Wl,-lrte_bus_dpaa -Wl,-lrte_bus_vdev -Wl,-lrte_bus_fslmc -Wl,-lrte_mempool_bucket -Wl,-lrte_mempool_stack -Wl,-lrte_mempool_dpaa \ +- -Wl,-lrte_mempool_dpaa2 -Wl,-lrte_bus_ifpga -Wl,-lrte_stack \ +- ${DPDK_LINK_FLAGS} \ ++set_target_properties(ltran PROPERTIES LINK_FLAGS "-L$ENV{DPDK_LIB_PATH} -Wl,--no-whole-archive \ ++ -Wl,-lrte_meter -Wl,--whole-archive -Wl,-lrte_gro -Wl,-lrte_hash -Wl,-lrte_kvargs -Wl,-lrte_mbuf -Wl,-lrte_ethdev \ ++ -Wl,-lrte_net -Wl,-lrte_timer -Wl,-lrte_mempool -Wl,-lrte_mempool_ring -Wl,-lrte_ring -Wl,-lrte_pci \ ++ -Wl,-Bstatic -lrte_eal -Wl,-Bdynamic -Wl,-lrte_cmdline -Wl,-lrte_kni -Wl,-lrte_bus_pci \ ++ -Wl,-lrte_bus_vdev ${DPDK_LINK_FLAGS} \ + -Wl,--no-whole-archive -Wl,-lm -Wl,-lrt -Wl,-lnuma -Wl,-ldl -Wl,-export-dynamic -Wl,-export-dynamic \ + -Wl,--as-needed -Wl,-export-dynamic -Wl,-Map=ltran.map -Wl,--cref") + +-- +2.23.0 + diff --git a/0002-gazelle_stat_pkts-gazelle_stat_low_power_info.patch b/0002-gazelle_stat_pkts-gazelle_stat_low_power_info.patch new file mode 100644 index 0000000..113b9b1 --- /dev/null +++ b/0002-gazelle_stat_pkts-gazelle_stat_low_power_info.patch @@ -0,0 +1,49 @@ +From 8f477abc2530a4defc37d2e443eca19271c1b6b8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=E5=AD=99=E8=8B=8F=E7=9A=96?= +Date: Tue, 4 Apr 2023 09:19:48 +0000 +Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9gazelle=5Fstat=5Fpkts?= + =?UTF-8?q?=EF=BC=8Cgazelle=5Fstat=5Flow=5Fpower=5Finfo=E7=BB=93=E6=9E=84?= + =?UTF-8?q?=E4=BD=93=E6=88=90=E5=91=98=E9=A1=BA=E5=BA=8F=EF=BC=8C=E6=9D=A5?= + =?UTF-8?q?=E4=BD=BF=E7=BB=93=E6=9E=84=E4=BD=93=E5=A4=A7=E5=B0=8F=E5=8F=98?= + =?UTF-8?q?=E5=B0=8F?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: 孙苏皖 +--- + src/common/gazelle_dfx_msg.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/common/gazelle_dfx_msg.h b/src/common/gazelle_dfx_msg.h +index e4da687..7ce8874 100644 +--- a/src/common/gazelle_dfx_msg.h ++++ b/src/common/gazelle_dfx_msg.h +@@ -79,11 +79,11 @@ struct gazelle_wakeup_stat { + }; + + struct gazelle_stat_pkts { +- uint64_t call_msg_cnt; + uint16_t conn_num; ++ uint32_t mempool_freecnt; ++ uint64_t call_msg_cnt; + uint64_t recv_list_cnt; + uint64_t call_alloc_fail; +- uint32_t mempool_freecnt; + struct gazelle_stack_stat stack_stat; + struct gazelle_wakeup_stat wakeup_stat; + }; +@@ -194,9 +194,9 @@ struct gazelle_stack_latency { + + struct gazelle_stat_low_power_info { + uint16_t low_power_mod; ++ uint16_t lpm_rx_pkts; + uint32_t lpm_pkts_in_detect; + uint32_t lpm_detect_ms; +- uint16_t lpm_rx_pkts; + }; + + #define RTE_ETH_XSTATS_NAME_SIZE 64 +-- +2.23.0 + diff --git a/gazelle.spec b/gazelle.spec index 2bcba71..4e2b7b8 100644 --- a/gazelle.spec +++ b/gazelle.spec @@ -2,7 +2,7 @@ Name: gazelle Version: 1.0.2 -Release: 1 +Release: 2 Summary: gazelle is a high performance user-mode stack License: MulanPSL-2.0 URL: https://gitee.com/openeuler/gazelle @@ -16,6 +16,9 @@ BuildRequires: numactl-devel libpcap-devel libconfig-devel libboundscheck uthash Requires: dpdk >= 21.11-5 Requires: numactl libpcap libconfig libboundscheck +Patch9001: 0001-remove-unused-dpdk-dynamic-libraries.patch +Patch9002: 0002-gazelle_stat_pkts-gazelle_stat_low_power_info.patch + %description %{name} is a high performance user-mode stack. @@ -56,6 +59,9 @@ install -Dpm 0640 %{_builddir}/%{name}-%{version}/src/ltran/ltran.conf %{b %config(noreplace) %{conf_path}/ltran.conf %changelog +* Sat Jul 8 2023 jiangheng12 - 1.0.2-2 +- sync remove unused dpdk dynamic libraries + * Tue Jul 4 2023 jiangheng12 - 1.0.2-1 - update version to 1.0.2