!416 [sync] PR-415: sync code same as 2203LTS
From: @openeuler-sync-bot Reviewed-by: @jiangheng12 Signed-off-by: @jiangheng12
This commit is contained in:
commit
55bf0c8009
@ -1,274 +0,0 @@
|
||||
From fd7a843ec8afcd44233488cca0f1fd3bb6fe6112 Mon Sep 17 00:00:00 2001
|
||||
From: root <root@localhost.localdomain>
|
||||
Date: Mon, 18 Apr 2022 20:08:14 +0800
|
||||
Subject: [PATCH] adpter 20.03
|
||||
|
||||
---
|
||||
build/build.sh | 0
|
||||
src/common/dpdk_common.c | 3 +-
|
||||
src/lstack/Makefile | 54 +++++++++++-----------
|
||||
src/lstack/api/lstack_wrap.c | 7 ++-
|
||||
src/lstack/core/lstack_dpdk.c | 38 +++++++++++++--
|
||||
src/lstack/include/lstack_ethdev.h | 2 +-
|
||||
src/lstack/include/lstack_protocol_stack.h | 2 +-
|
||||
src/lstack/include/lstack_vdev.h | 4 +-
|
||||
src/lstack/netif/lstack_vdev.c | 6 +--
|
||||
src/ltran/CMakeLists.txt | 47 ++++++++++---------
|
||||
tool/gazelle_common.sh | 0
|
||||
tool/gazelle_crontab.sh | 0
|
||||
tool/gazelle_exit.sh | 0
|
||||
tool/gazelle_setup.sh | 0
|
||||
14 files changed, 101 insertions(+), 62 deletions(-)
|
||||
mode change 100755 => 100644 build/build.sh
|
||||
mode change 100755 => 100644 tool/gazelle_common.sh
|
||||
mode change 100755 => 100644 tool/gazelle_crontab.sh
|
||||
mode change 100755 => 100644 tool/gazelle_exit.sh
|
||||
mode change 100755 => 100644 tool/gazelle_setup.sh
|
||||
|
||||
diff --git a/build/build.sh b/build/build.sh
|
||||
old mode 100755
|
||||
new mode 100644
|
||||
diff --git a/src/common/dpdk_common.c b/src/common/dpdk_common.c
|
||||
index 63dcfc1..af03f2c 100644
|
||||
--- a/src/common/dpdk_common.c
|
||||
+++ b/src/common/dpdk_common.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <rte_bus_pci.h>
|
||||
#include <rte_mbuf.h>
|
||||
#include <securec.h>
|
||||
+#include <stdbool.h>
|
||||
|
||||
#include "dpdk_common.h"
|
||||
|
||||
@@ -167,4 +168,4 @@ void kni_process_rx(uint16_t port)
|
||||
pkts_burst[i] = NULL;
|
||||
}
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/src/lstack/Makefile b/src/lstack/Makefile
|
||||
index 8fc2435..0abed9e 100644
|
||||
--- a/src/lstack/Makefile
|
||||
+++ b/src/lstack/Makefile
|
||||
@@ -14,18 +14,22 @@ ROOT_DIR := $(dir $(abspath $(LSTACK_DIR)))
|
||||
LWIP_INCLUDE_FILE ?= /usr/include/lwip
|
||||
LIB_PATH ?= /usr/lib64
|
||||
|
||||
+DPDK_INCLUDE_FILE ?= /usr/include/dpdk
|
||||
+DPDK_LIB_PATH ?= /usr/lib64
|
||||
+
|
||||
AR = ar
|
||||
ARFLAGS = crDP
|
||||
CC = gcc
|
||||
OPTIMIZATION = -O2 -g
|
||||
RM = rm -f
|
||||
-LDFLAGS = -shared -ldl -lm -lpthread -lrt -lnuma -lconfig -lboundscheck
|
||||
+LDFLAGS = -shared -ldl -lm -lpthread -lrt -lnuma -lconfig -lsecurec
|
||||
|
||||
SEC_FLAGS = -fstack-protector-strong -Werror -Wall -Wl,-z,relro,-z,now -Wl,-z,noexecstack -Wtrampolines -fPIC
|
||||
|
||||
INC = -I$(LSTACK_DIR)/include \
|
||||
-I$(LSTACK_DIR)/../common \
|
||||
- -I$(LWIP_INCLUDE_FILE)
|
||||
+ -I$(LWIP_INCLUDE_FILE) \
|
||||
+ -I$(DPDK_INCLUDE_FILE)
|
||||
|
||||
CFLAGS = $(OPTIMIZATION) -fno-strict-aliasing $(INC)
|
||||
|
||||
@@ -53,32 +57,26 @@ include $(patsubst %, %/dir.mk, $(DIRS))
|
||||
OBJS = $(subst .c,.o,$(SRCS))
|
||||
|
||||
LWIP_LIB = $(LIB_PATH)/liblwip.a
|
||||
-LIBRTE_LIB = $(LIB_PATH)/librte_bus_pci.a \
|
||||
- $(LIB_PATH)/librte_pci.a \
|
||||
- $(LIB_PATH)/librte_cmdline.a \
|
||||
- $(LIB_PATH)/librte_hash.a \
|
||||
- $(LIB_PATH)/librte_mempool.a \
|
||||
- $(LIB_PATH)/librte_mempool_ring.a \
|
||||
- $(LIB_PATH)/librte_timer.a \
|
||||
- $(LIB_PATH)/librte_eal.a \
|
||||
- $(LIB_PATH)/librte_ring.a \
|
||||
- $(LIB_PATH)/librte_mbuf.a \
|
||||
- $(LIB_PATH)/librte_telemetry.a \
|
||||
- $(LIB_PATH)/librte_kni.a \
|
||||
- $(LIB_PATH)/librte_net_ixgbe.a \
|
||||
- $(LIB_PATH)/librte_kvargs.a \
|
||||
- $(LIB_PATH)/librte_net_hinic.a \
|
||||
- $(LIB_PATH)/librte_net_i40e.a \
|
||||
- $(LIB_PATH)/librte_net_virtio.a \
|
||||
- $(LIB_PATH)/librte_bus_vdev.a \
|
||||
- $(LIB_PATH)/librte_net.a \
|
||||
- $(LIB_PATH)/librte_rcu.a \
|
||||
- $(LIB_PATH)/librte_ethdev.a \
|
||||
- $(LIB_PATH)/librte_pdump.a \
|
||||
- $(LIB_PATH)/librte_bpf.a \
|
||||
- $(LIB_PATH)/librte_pcapng.a \
|
||||
- $(LIB_PATH)/librte_security.a \
|
||||
- $(LIB_PATH)/librte_cryptodev.a
|
||||
+LIBRTE_LIB = $(DPDK_LIB_PATH)/librte_pci.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_bus_pci.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_cmdline.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_hash.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_mempool.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_mempool_ring.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_timer.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_eal.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_ring.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_mbuf.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_kni.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_pmd_ixgbe.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_kvargs.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_pmd_hinic.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_pmd_i40e.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_pmd_virtio.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_bus_vdev.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_net.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_ethdev.a \
|
||||
+ $(DPDK_LIB_PATH)/librte_pdump.a
|
||||
|
||||
|
||||
DEP_LIBS = $(LWIP_LIB) $(LIBRTE_LIB)
|
||||
diff --git a/src/lstack/include/lstack_ethdev.h b/src/lstack/include/lstack_ethdev.h
|
||||
index 573a413..e76f72d 100644
|
||||
--- a/src/lstack/include/lstack_ethdev.h
|
||||
+++ b/src/lstack/include/lstack_ethdev.h
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#define DPDK_PKT_BURST_SIZE 512
|
||||
|
||||
-struct eth_dev_ops {
|
||||
+struct lstack_eth_dev_ops {
|
||||
uint32_t (*rx_poll)(struct protocol_stack *stack, struct rte_mbuf **pkts, uint32_t max_mbuf);
|
||||
uint32_t (*tx_xmit)(struct protocol_stack *stack, struct rte_mbuf **pkts, uint32_t nr_pkts);
|
||||
};
|
||||
diff --git a/src/lstack/include/lstack_protocol_stack.h b/src/lstack/include/lstack_protocol_stack.h
|
||||
index 9753385..5a1e0a0 100644
|
||||
--- a/src/lstack/include/lstack_protocol_stack.h
|
||||
+++ b/src/lstack/include/lstack_protocol_stack.h
|
||||
@@ -44,7 +44,7 @@ struct protocol_stack {
|
||||
struct netif netif;
|
||||
uint32_t rx_ring_used;
|
||||
uint32_t tx_ring_used;
|
||||
- struct eth_dev_ops *dev_ops;
|
||||
+ struct lstack_eth_dev_ops *dev_ops;
|
||||
|
||||
struct list_node recv_list;
|
||||
struct list_node listen_list;
|
||||
diff --git a/src/lstack/include/lstack_vdev.h b/src/lstack/include/lstack_vdev.h
|
||||
index 31a997d..4a6253e 100644
|
||||
--- a/src/lstack/include/lstack_vdev.h
|
||||
+++ b/src/lstack/include/lstack_vdev.h
|
||||
@@ -29,8 +29,8 @@
|
||||
#define VDEV_TX_QUEUE_SZ (DEFAULT_RING_SIZE)
|
||||
#define FREE_RX_QUEUE_SZ (DPDK_PKT_BURST_SIZE)
|
||||
|
||||
-struct eth_dev_ops;
|
||||
-void vdev_dev_ops_init(struct eth_dev_ops **dev_ops);
|
||||
+struct lstack_eth_dev_ops;
|
||||
+void vdev_dev_ops_init(struct lstack_eth_dev_ops **dev_ops);
|
||||
int vdev_reg_xmit(enum reg_ring_type type, struct gazelle_quintuple *qtuple);
|
||||
|
||||
#endif /* _GAZELLE_VDEV_H_ */
|
||||
diff --git a/src/lstack/netif/lstack_vdev.c b/src/lstack/netif/lstack_vdev.c
|
||||
index 5a4e86a..cb0e6e9 100644
|
||||
--- a/src/lstack/netif/lstack_vdev.c
|
||||
+++ b/src/lstack/netif/lstack_vdev.c
|
||||
@@ -153,17 +153,17 @@ int32_t vdev_reg_xmit(enum reg_ring_type type, struct gazelle_quintuple *qtuple)
|
||||
return (int32_t)sent_pkts;
|
||||
}
|
||||
|
||||
-static struct eth_dev_ops g_eth_dev_ops = {
|
||||
+static struct lstack_eth_dev_ops g_eth_dev_ops = {
|
||||
.rx_poll = vdev_rx_poll,
|
||||
.tx_xmit = vdev_tx_xmit,
|
||||
};
|
||||
|
||||
-static struct eth_dev_ops g_ltran_eth_dev_ops = {
|
||||
+static struct lstack_eth_dev_ops g_ltran_eth_dev_ops = {
|
||||
.rx_poll = ltran_rx_poll,
|
||||
.tx_xmit = ltran_tx_xmit,
|
||||
};
|
||||
|
||||
-void vdev_dev_ops_init(struct eth_dev_ops **dev_ops)
|
||||
+void vdev_dev_ops_init(struct lstack_eth_dev_ops **dev_ops)
|
||||
{
|
||||
if (use_ltran()) {
|
||||
*dev_ops = &g_ltran_eth_dev_ops;
|
||||
diff --git a/src/ltran/CMakeLists.txt b/src/ltran/CMakeLists.txt
|
||||
index c21d88a..37ec14a 100644
|
||||
--- a/src/ltran/CMakeLists.txt
|
||||
+++ b/src/ltran/CMakeLists.txt
|
||||
@@ -12,6 +12,7 @@ cmake_minimum_required(VERSION 3.12.1)
|
||||
project(ltran)
|
||||
|
||||
set(COMMON_DIR ${PROJECT_SOURCE_DIR}/../common)
|
||||
+set(DPDK_DIR /usr/include/dpdk)
|
||||
|
||||
set(CMAKE_C_FLAGS "-O2 -g -fstack-protector-strong -Wall -Werror -fPIE -pie -pthread")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D LTRAN_COMPILE")
|
||||
@@ -26,7 +27,7 @@ add_executable(ltran main.c ltran_param.c ltran_config.c ltran_ethdev.c ltran_st
|
||||
ltran_forward.c ltran_timer.c ${COMMON_DIR}/gazelle_dfx_msg.c ${COMMON_DIR}/dpdk_common.c
|
||||
${COMMON_DIR}/gazelle_parse_config.c)
|
||||
|
||||
-target_include_directories(ltran PRIVATE ${COMMON_DIR} ${PROJECT_SOURCE_DIR})
|
||||
+ target_include_directories(ltran PRIVATE ${DPDK_DIR} ${COMMON_DIR} ${PROJECT_SOURCE_DIR})
|
||||
target_compile_options(ltran PRIVATE -march=native -fno-strict-aliasing -D__ARM_FEATURE_CRC32=1 -DRTE_MACHINE_CPUFLAG_NEON
|
||||
-DRTE_MACHINE_CPUFLAG_CRC32 -DRTE_MACHINE_CPUFLAG_PMULL -DRTE_MACHINE_CPUFLAG_AES
|
||||
-DRTE_MACHINE_CPUFLAG_SHA1 -DRTE_MACHINE_CPUFLAG_SHA2 -include rte_config.h
|
||||
@@ -34,27 +35,31 @@ target_compile_options(ltran PRIVATE -march=native -fno-strict-aliasing -D__ARM_
|
||||
-Wpointer-arith -Wcast-align -Wcast-qual -Wnested-externs -Wformat-nonliteral -Wformat-security -Wundef
|
||||
-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)
|
||||
+target_link_libraries(ltran PRIVATE config securec 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,--no-whole-archive -Wl,--whole-archive -Wl,-lrte_table -Wl,--no-whole-archive -Wl,--whole-archive -Wl,-lrte_port -Wl,--no-whole-archive \
|
||||
+ -Wl,-lrte_distributor -Wl,-lrte_ip_frag -Wl,-lrte_meter -Wl,-lrte_lpm -Wl,--whole-archive -Wl,-lrte_acl -Wl,--no-whole-archive \
|
||||
+ -Wl,-lrte_jobstats -Wl,-lrte_metrics -Wl,-lrte_bitratestats -Wl,-lrte_latencystats -Wl,-lrte_power -Wl,-lrte_efd -Wl,-lrte_bpf \
|
||||
+ -Wl,--whole-archive -Wl,-lrte_cfgfile -Wl,-lrte_gro -Wl,-lrte_gso -Wl,-lrte_hash -Wl,-lrte_member -Wl,-lrte_vhost -Wl,-lrte_kvargs \
|
||||
+ -Wl,-lrte_mbuf -Wl,-lrte_net -Wl,-lrte_ethdev -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_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_tap -Wl,-lrte_net_vdev_netvsc -Wl,-lrte_net_virtio -Wl,-lrte_net_vhost \
|
||||
- -Wl,-lrte_bus_vmbus -Wl,-lrte_net_netvsc -Wl,-lrte_mempool_octeontx -Wl,-lrte_net_octeontx \
|
||||
- -Wl,-lrte_bus_ifpga -Wl,-lrte_stack -Wl,-lrte_telemetry\
|
||||
- -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")
|
||||
+ -Wl,-Bstatic -lrte_eal -Wl,-Bdynamic \
|
||||
+ -Wl,-lrte_cmdline \
|
||||
+ -Wl,-lrte_reorder -Wl,-lrte_sched -Wl,-lrte_kni -Wl,-lrte_common_cpt -Wl,-lrte_common_octeontx -Wl,-lrte_common_dpaax -Wl,-lrte_bus_pci \
|
||||
+ -Wl,-lrte_bus_vdev -Wl,-lrte_bus_dpaa -Wl,-lrte_bus_fslmc -Wl,-lrte_mempool_bucket -Wl,-lrte_mempool_stack -Wl,-lrte_mempool_dpaa \
|
||||
+ -Wl,-lrte_mempool_dpaa2 -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_lio -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_tap -Wl,-lrte_pmd_thunderx_nicvf -Wl,-lrte_pmd_vdev_netvsc -Wl,-lrte_pmd_virtio -Wl,-lrte_pmd_vhost -Wl,-lrte_pmd_ifc \
|
||||
+ -Wl,-lrte_pmd_vmxnet3_uio -Wl,-lrte_bus_vmbus -Wl,-lrte_pmd_netvsc -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_mempool_octeontx -Wl,-lrte_pmd_octeontx \
|
||||
+ -Wl,-lrte_pmd_opdl_event -Wl,-lrte_bus_ifpga -Wl,-lrte_stack \
|
||||
+ -Wl,--no-whole-archive -Wl,-lrt -Wl,-lm -Wl,-lnuma -Wl,-ldl -Wl,-export-dynamic -Wl,-export-dynamic \
|
||||
+ -Wl,-export-dynamic -Wl,--as-needed -Wl,-Map=ltran.map -Wl,--cref")
|
||||
|
||||
add_executable(gazellectl ltran_dfx.c ${COMMON_DIR}/gazelle_dfx_msg.c)
|
||||
-target_include_directories(gazellectl PRIVATE $ENV{DPDK_INCLUDE_FILE} ${COMMON_DIR})
|
||||
-target_link_libraries(gazellectl PRIVATE boundscheck)
|
||||
+target_include_directories(gazellectl PRIVATE $ENV{DPDK_INCLUDE_FILE} ${DPDK_DIR} ${COMMON_DIR})
|
||||
+target_link_libraries(gazellectl PRIVATE securec)
|
||||
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
From feb53c7996a677577d9d60664697a1f5bd2afe21 Mon Sep 17 00:00:00 2001
|
||||
From: xiusailong <xiusailong@huawei.com>
|
||||
Date: Tue, 14 Jun 2022 17:36:52 +0800
|
||||
Subject: [PATCH] modify securec to boundscheck
|
||||
|
||||
---
|
||||
src/lstack/Makefile | 2 +-
|
||||
src/ltran/CMakeLists.txt | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/lstack/Makefile b/src/lstack/Makefile
|
||||
index 0abed9e..1aaed16 100644
|
||||
--- a/src/lstack/Makefile
|
||||
+++ b/src/lstack/Makefile
|
||||
@@ -22,7 +22,7 @@ ARFLAGS = crDP
|
||||
CC = gcc
|
||||
OPTIMIZATION = -O2 -g
|
||||
RM = rm -f
|
||||
-LDFLAGS = -shared -ldl -lm -lpthread -lrt -lnuma -lconfig -lsecurec
|
||||
+LDFLAGS = -shared -ldl -lm -lpthread -lrt -lnuma -lconfig -lboundscheck
|
||||
|
||||
SEC_FLAGS = -fstack-protector-strong -Werror -Wall -Wl,-z,relro,-z,now -Wl,-z,noexecstack -Wtrampolines -fPIC
|
||||
|
||||
diff --git a/src/ltran/CMakeLists.txt b/src/ltran/CMakeLists.txt
|
||||
index 37ec14a..5279d24 100644
|
||||
--- a/src/ltran/CMakeLists.txt
|
||||
+++ b/src/ltran/CMakeLists.txt
|
||||
@@ -35,7 +35,7 @@ target_compile_options(ltran PRIVATE -march=native -fno-strict-aliasing -D__ARM_
|
||||
-Wpointer-arith -Wcast-align -Wcast-qual -Wnested-externs -Wformat-nonliteral -Wformat-security -Wundef
|
||||
-Wdeprecated -Wwrite-strings -Wno-implicit-fallthrough -D_FORTIFY_SOURCE=2)
|
||||
|
||||
-target_link_libraries(ltran PRIVATE config securec rte_pdump -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wtrampolines)
|
||||
+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,--whole-archive -Wl,-lrte_table -Wl,--no-whole-archive -Wl,--whole-archive -Wl,-lrte_port -Wl,--no-whole-archive \
|
||||
-Wl,-lrte_distributor -Wl,-lrte_ip_frag -Wl,-lrte_meter -Wl,-lrte_lpm -Wl,--whole-archive -Wl,-lrte_acl -Wl,--no-whole-archive \
|
||||
@@ -62,4 +62,4 @@ set_target_properties(ltran PROPERTIES LINK_FLAGS "-L$ENV{DPDK_LIB_PATH} -Wl,--w
|
||||
|
||||
add_executable(gazellectl ltran_dfx.c ${COMMON_DIR}/gazelle_dfx_msg.c)
|
||||
target_include_directories(gazellectl PRIVATE $ENV{DPDK_INCLUDE_FILE} ${DPDK_DIR} ${COMMON_DIR})
|
||||
-target_link_libraries(gazellectl PRIVATE securec)
|
||||
+target_link_libraries(gazellectl PRIVATE boundscheck)
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -71,7 +71,7 @@ index 595e85f..4a7bd37 100644
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ ENQUEUE_PTRS(r, &r[1], prod, obj_table, n, void *);
|
||||
+ __rte_ring_enqueue_elems(r, prod, obj_table, sizeof(void *), n);
|
||||
+
|
||||
+ __atomic_store_n(&r->prod.tail, prod + n, __ATOMIC_RELEASE);
|
||||
+
|
||||
@ -92,7 +92,7 @@ index 595e85f..4a7bd37 100644
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ DEQUEUE_PTRS(r, &r[1], cons, obj_table, n, void *);
|
||||
+ __rte_ring_dequeue_elems(r, cons, obj_table, sizeof(void *), n);
|
||||
+
|
||||
+ __atomic_store_n(&r->cons.tail, cons + n, __ATOMIC_RELEASE);
|
||||
+
|
||||
@ -121,7 +121,7 @@ index 595e85f..4a7bd37 100644
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ ENQUEUE_PTRS(r, &r[1], head, obj_table, n, void *);
|
||||
+ __rte_ring_enqueue_elems(r, head, obj_table, sizeof(void *), n);
|
||||
+
|
||||
+ __atomic_store_n(&r->cons.head, head + n, __ATOMIC_RELEASE);
|
||||
+
|
||||
@ -142,7 +142,7 @@ index 595e85f..4a7bd37 100644
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ DEQUEUE_PTRS(r, &r[1], cons, obj_table, n, void *);
|
||||
+ __rte_ring_dequeue_elems(r, cons, obj_table, sizeof(void *), n);
|
||||
+
|
||||
+ __atomic_store_n(&r->cons.tail, cons + n, __ATOMIC_RELEASE);
|
||||
+
|
||||
@ -162,7 +162,7 @@ index 595e85f..4a7bd37 100644
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ DEQUEUE_PTRS(r, &r[1], prod, obj_table, n, void *);
|
||||
+ __rte_ring_dequeue_elems(r, prod, obj_table, sizeof(void *), n);
|
||||
+
|
||||
+ r->prod.head = prod + n;
|
||||
+
|
||||
@ -2718,7 +2718,7 @@ index c73e3a7..ba57541 100644
|
||||
void get_lwip_connnum(struct rpc_msg *msg);
|
||||
void stack_recvlist_count(struct rpc_msg *msg);
|
||||
diff --git a/src/lstack/include/lstack_protocol_stack.h b/src/lstack/include/lstack_protocol_stack.h
|
||||
index c1d1d35..8a6aa9d 100644
|
||||
index bc4e4bd..8a6aa9d 100644
|
||||
--- a/src/lstack/include/lstack_protocol_stack.h
|
||||
+++ b/src/lstack/include/lstack_protocol_stack.h
|
||||
@@ -14,48 +14,52 @@
|
||||
@ -2765,10 +2765,10 @@ index c1d1d35..8a6aa9d 100644
|
||||
+ char pad __rte_cache_aligned;
|
||||
+
|
||||
struct netif netif;
|
||||
+ struct lstack_eth_dev_ops *dev_ops;
|
||||
+ struct eth_dev_ops *dev_ops;
|
||||
uint32_t rx_ring_used;
|
||||
uint32_t tx_ring_used;
|
||||
- struct lstack_eth_dev_ops *dev_ops;
|
||||
- struct eth_dev_ops *dev_ops;
|
||||
|
||||
struct list_node recv_list;
|
||||
- struct list_node listen_list;
|
||||
@ -2792,21 +2792,21 @@ index c1d1d35..8a6aa9d 100644
|
||||
+ pthread_spinlock_t wakeup_list_lock;
|
||||
+ struct wakeup_poll *wakeup_list __rte_cache_aligned;
|
||||
};
|
||||
|
||||
|
||||
long get_stack_tid(void);
|
||||
struct protocol_stack *get_protocol_stack(void);
|
||||
struct protocol_stack *get_protocol_stack_by_fd(int32_t fd);
|
||||
-struct protocol_stack *get_minconn_protocol_stack(void);
|
||||
+struct protocol_stack *get_bind_protocol_stack(void);
|
||||
struct protocol_stack_group *get_protocol_stack_group(void);
|
||||
|
||||
|
||||
int32_t init_protocol_stack(void);
|
||||
@@ -96,6 +102,7 @@ int32_t stack_broadcast_close(int32_t fd);
|
||||
|
||||
|
||||
/* listen sync to all protocol stack thread, so that any protocol stack thread can build connect */
|
||||
int32_t stack_broadcast_listen(int32_t fd, int backlog);
|
||||
+int32_t stack_single_listen(int32_t fd, int32_t backlog);
|
||||
|
||||
|
||||
/* ergodic the protocol stack thread to find the connection, because all threads are listening */
|
||||
int32_t stack_broadcast_accept(int32_t fd, struct sockaddr *addr, socklen_t *addrlen);
|
||||
diff --git a/src/lstack/include/lstack_stack_stat.h b/src/lstack/include/lstack_stack_stat.h
|
||||
@ -4,7 +4,7 @@ Date: Thu, 7 Jul 2022 22:21:34 +0800
|
||||
Subject: [PATCH 01/19] ltran support checksum
|
||||
|
||||
---
|
||||
src/common/dpdk_common.c | 43 ++++++++++++++
|
||||
src/common/dpdk_common.c | 44 ++++++++++++++
|
||||
src/common/dpdk_common.h | 4 ++
|
||||
src/common/gazelle_reg_msg.h | 2 +
|
||||
src/lstack/core/lstack_control_plane.c | 4 ++
|
||||
@ -18,8 +18,15 @@ Subject: [PATCH 01/19] ltran support checksum
|
||||
diff --git a/src/common/dpdk_common.c b/src/common/dpdk_common.c
|
||||
index 63dcfc1..939d135 100644
|
||||
--- a/src/common/dpdk_common.c
|
||||
+++ b/src/common/dpdk_common.c
|
||||
|
||||
+++ b/src/common/dpdk_common.c
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <rte_ethdev.h>
|
||||
#include <rte_bus_pci.h>
|
||||
#include <rte_mbuf.h>
|
||||
+#include <rte_ethdev.h>
|
||||
#include <securec.h>
|
||||
|
||||
#include "dpdk_common.h"
|
||||
@@ -87,6 +88,49 @@ static int32_t kni_config_network_interface(uint16_t port_id, uint8_t if_up)
|
||||
return ret;
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
From 573692bf610966f88bbc86468a9b55b9ef5be3e4 Mon Sep 17 00:00:00 2001
|
||||
From 2e36e8a3885563d12eac0e5cbed56ddaf1d28e27 Mon Sep 17 00:00:00 2001
|
||||
From: jiangheng <jiangheng14@huawei.com>
|
||||
Date: Thu, 14 Jul 2022 22:05:57 +0800
|
||||
Subject: [PATCH] enable-secure-compile-and-open-compile-log
|
||||
Subject: [PATCH 09/19] enable-secure-compile-and-open-compile-log
|
||||
|
||||
---
|
||||
src/lstack/Makefile | 2 +-
|
||||
@ -9,10 +9,10 @@ Subject: [PATCH] enable-secure-compile-and-open-compile-log
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/lstack/Makefile b/src/lstack/Makefile
|
||||
index 1aaed16..df58f89 100644
|
||||
index 8fc2435..98289d8 100644
|
||||
--- a/src/lstack/Makefile
|
||||
+++ b/src/lstack/Makefile
|
||||
@@ -24,7 +24,7 @@ OPTIMIZATION = -O2 -g
|
||||
@@ -21,7 +21,7 @@ OPTIMIZATION = -O2 -g
|
||||
RM = rm -f
|
||||
LDFLAGS = -shared -ldl -lm -lpthread -lrt -lnuma -lconfig -lboundscheck
|
||||
|
||||
@ -22,12 +22,12 @@ index 1aaed16..df58f89 100644
|
||||
INC = -I$(LSTACK_DIR)/include \
|
||||
-I$(LSTACK_DIR)/../common \
|
||||
diff --git a/src/ltran/CMakeLists.txt b/src/ltran/CMakeLists.txt
|
||||
index 5279d24..b565b4c 100644
|
||||
index c21d88a..970bc1b 100644
|
||||
--- a/src/ltran/CMakeLists.txt
|
||||
+++ b/src/ltran/CMakeLists.txt
|
||||
@@ -14,7 +14,8 @@ project(ltran)
|
||||
@@ -13,7 +13,8 @@ project(ltran)
|
||||
|
||||
set(COMMON_DIR ${PROJECT_SOURCE_DIR}/../common)
|
||||
set(DPDK_DIR /usr/include/dpdk)
|
||||
|
||||
-set(CMAKE_C_FLAGS "-O2 -g -fstack-protector-strong -Wall -Werror -fPIE -pie -pthread")
|
||||
+set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
@ -35,12 +35,12 @@ index 5279d24..b565b4c 100644
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D LTRAN_COMPILE")
|
||||
|
||||
if($ENV{GAZELLE_COVERAGE_ENABLE})
|
||||
@@ -62,4 +63,4 @@ set_target_properties(ltran PROPERTIES LINK_FLAGS "-L$ENV{DPDK_LIB_PATH} -Wl,--w
|
||||
@@ -57,4 +58,4 @@ set_target_properties(ltran PROPERTIES LINK_FLAGS "-L$ENV{DPDK_LIB_PATH} -Wl,--w
|
||||
|
||||
add_executable(gazellectl ltran_dfx.c ${COMMON_DIR}/gazelle_dfx_msg.c)
|
||||
target_include_directories(gazellectl PRIVATE $ENV{DPDK_INCLUDE_FILE} ${DPDK_DIR} ${COMMON_DIR})
|
||||
target_include_directories(gazellectl PRIVATE $ENV{DPDK_INCLUDE_FILE} ${COMMON_DIR})
|
||||
-target_link_libraries(gazellectl PRIVATE boundscheck)
|
||||
+target_link_libraries(gazellectl PRIVATE boundscheck -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack)
|
||||
--
|
||||
2.27.0
|
||||
2.23.0
|
||||
|
||||
@ -4,7 +4,7 @@ Date: Thu, 14 Jul 2022 22:25:44 +0800
|
||||
Subject: [PATCH 13/19] release-kni-device
|
||||
|
||||
---
|
||||
src/common/dpdk_common.c | 9 +++++++++
|
||||
src/common/dpdk_common.c | 11 ++++++++++-
|
||||
src/common/dpdk_common.h | 1 +
|
||||
src/lstack/api/lstack_signal.c | 7 ++++++-
|
||||
src/lstack/core/lstack_init.c | 2 ++
|
||||
@ -31,6 +31,13 @@ index 939d135..8d056f9 100644
|
||||
int32_t kni_process_tx(struct rte_mbuf **pkts_burst, uint32_t count)
|
||||
{
|
||||
uint32_t i = rte_kni_tx_burst(g_pkni, pkts_burst, count);
|
||||
@@ -211,4 +220,4 @@ void kni_process_rx(uint16_t port)
|
||||
pkts_burst[i] = NULL;
|
||||
}
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/src/common/dpdk_common.h b/src/common/dpdk_common.h
|
||||
index 6a6a030..2066159 100644
|
||||
--- a/src/common/dpdk_common.h
|
||||
@ -2504,7 +2504,7 @@ index 0e8400f..91f5f13 100644
|
||||
-
|
||||
+struct protocol_stack;
|
||||
+struct rte_mbuf;
|
||||
struct lstack_eth_dev_ops {
|
||||
struct eth_dev_ops {
|
||||
uint32_t (*rx_poll)(struct protocol_stack *stack, struct rte_mbuf **pkts, uint32_t max_mbuf);
|
||||
uint32_t (*tx_xmit)(struct protocol_stack *stack, struct rte_mbuf **pkts, uint32_t nr_pkts);
|
||||
diff --git a/src/lstack/include/lstack_lwip.h b/src/lstack/include/lstack_lwip.h
|
||||
@ -2687,10 +2687,10 @@ index 31a997d..5836257 100644
|
||||
-#define VDEV_TX_QUEUE_SZ (DEFAULT_RING_SIZE)
|
||||
-#define FREE_RX_QUEUE_SZ (DPDK_PKT_BURST_SIZE)
|
||||
-
|
||||
struct lstack_eth_dev_ops;
|
||||
struct eth_dev_ops;
|
||||
+struct gazelle_quintuple;
|
||||
+enum reg_ring_type;
|
||||
void vdev_dev_ops_init(struct lstack_eth_dev_ops **dev_ops);
|
||||
void vdev_dev_ops_init(struct eth_dev_ops **dev_ops);
|
||||
int vdev_reg_xmit(enum reg_ring_type type, struct gazelle_quintuple *qtuple);
|
||||
|
||||
diff --git a/src/lstack/include/posix/lstack_epoll.h b/src/lstack/include/posix/lstack_epoll.h
|
||||
@ -125,8 +125,8 @@ index 970bc1b..9c6751c 100644
|
||||
--- a/src/ltran/CMakeLists.txt
|
||||
+++ b/src/ltran/CMakeLists.txt
|
||||
@@ -14,7 +14,11 @@ project(ltran)
|
||||
set(DPDK_DIR /usr/include/dpdk)
|
||||
|
||||
set(COMMON_DIR ${PROJECT_SOURCE_DIR}/../common)
|
||||
|
||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
-set(CMAKE_C_FLAGS "-g -fstack-protector-strong -Wall -Werror -fPIE -pie -pthread -D_FORTIFY_SOURCE=2 -O2 -fPIC")
|
||||
+if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
76
0071-Allow-dynamic-load-PMDs.patch
Normal file
76
0071-Allow-dynamic-load-PMDs.patch
Normal file
@ -0,0 +1,76 @@
|
||||
From 15dbe826aef71330043818c9a6c187819823768a Mon Sep 17 00:00:00 2001
|
||||
From: Honggang LI <honggangli@163.com>
|
||||
Date: Mon, 18 Jul 2022 10:57:34 +0800
|
||||
Subject: [PATCH 18/19] Allow dynamic load PMDs
|
||||
|
||||
Signed-off-by: Honggang LI <honggangli@163.com>
|
||||
---
|
||||
src/lstack/Makefile | 52 +++++++++----------
|
||||
1 files changed, 26 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/src/lstack/Makefile b/src/lstack/Makefile
|
||||
index 0fb4405..7ce35d4 100644
|
||||
--- a/src/lstack/Makefile
|
||||
+++ b/src/lstack/Makefile
|
||||
@@ -57,32 +57,32 @@ include $(patsubst %, %/dir.mk, $(DIRS))
|
||||
OBJS = $(subst .c,.o,$(SRCS))
|
||||
|
||||
LWIP_LIB = $(LIB_PATH)/liblwip.a
|
||||
-LIBRTE_LIB = $(LIB_PATH)/librte_bus_pci.a \
|
||||
- $(LIB_PATH)/librte_pci.a \
|
||||
- $(LIB_PATH)/librte_cmdline.a \
|
||||
- $(LIB_PATH)/librte_hash.a \
|
||||
- $(LIB_PATH)/librte_mempool.a \
|
||||
- $(LIB_PATH)/librte_mempool_ring.a \
|
||||
- $(LIB_PATH)/librte_timer.a \
|
||||
- $(LIB_PATH)/librte_eal.a \
|
||||
- $(LIB_PATH)/librte_ring.a \
|
||||
- $(LIB_PATH)/librte_mbuf.a \
|
||||
- $(LIB_PATH)/librte_telemetry.a \
|
||||
- $(LIB_PATH)/librte_kni.a \
|
||||
- $(LIB_PATH)/librte_net_ixgbe.a \
|
||||
- $(LIB_PATH)/librte_kvargs.a \
|
||||
- $(LIB_PATH)/librte_net_hinic.a \
|
||||
- $(LIB_PATH)/librte_net_i40e.a \
|
||||
- $(LIB_PATH)/librte_net_virtio.a \
|
||||
- $(LIB_PATH)/librte_bus_vdev.a \
|
||||
- $(LIB_PATH)/librte_net.a \
|
||||
- $(LIB_PATH)/librte_rcu.a \
|
||||
- $(LIB_PATH)/librte_ethdev.a \
|
||||
- $(LIB_PATH)/librte_pdump.a \
|
||||
- $(LIB_PATH)/librte_bpf.a \
|
||||
- $(LIB_PATH)/librte_pcapng.a \
|
||||
- $(LIB_PATH)/librte_security.a \
|
||||
- $(LIB_PATH)/librte_cryptodev.a
|
||||
+LIBRTE_LIB = $(LIB_PATH)/librte_bus_pci.so \
|
||||
+ $(LIB_PATH)/librte_pci.so \
|
||||
+ $(LIB_PATH)/librte_cmdline.so \
|
||||
+ $(LIB_PATH)/librte_hash.so \
|
||||
+ $(LIB_PATH)/librte_mempool.so \
|
||||
+ $(LIB_PATH)/librte_mempool_ring.so \
|
||||
+ $(LIB_PATH)/librte_timer.so \
|
||||
+ $(LIB_PATH)/librte_eal.so \
|
||||
+ $(LIB_PATH)/librte_ring.so \
|
||||
+ $(LIB_PATH)/librte_mbuf.so \
|
||||
+ $(LIB_PATH)/librte_telemetry.so \
|
||||
+ $(LIB_PATH)/librte_kni.so \
|
||||
+ $(LIB_PATH)/librte_net_ixgbe.so \
|
||||
+ $(LIB_PATH)/librte_kvargs.so \
|
||||
+ $(LIB_PATH)/librte_net_hinic.so \
|
||||
+ $(LIB_PATH)/librte_net_i40e.so \
|
||||
+ $(LIB_PATH)/librte_net_virtio.so \
|
||||
+ $(LIB_PATH)/librte_bus_vdev.so \
|
||||
+ $(LIB_PATH)/librte_net.so \
|
||||
+ $(LIB_PATH)/librte_rcu.so \
|
||||
+ $(LIB_PATH)/librte_ethdev.so \
|
||||
+ $(LIB_PATH)/librte_pdump.so \
|
||||
+ $(LIB_PATH)/librte_bpf.so \
|
||||
+ $(LIB_PATH)/librte_pcapng.so \
|
||||
+ $(LIB_PATH)/librte_security.so \
|
||||
+ $(LIB_PATH)/librte_cryptodev.so
|
||||
|
||||
|
||||
DEP_LIBS = $(LWIP_LIB) $(LIBRTE_LIB)
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -1,63 +0,0 @@
|
||||
From 9976a38f96d46ffe11c9fe4542e70509de2fad1b Mon Sep 17 00:00:00 2001
|
||||
From: xiusailong <xiusailong@huawei.com>
|
||||
Date: Fri, 22 Jul 2022 15:31:29 +0800
|
||||
Subject: [PATCH] Allow-dynamic-load-PMDs
|
||||
|
||||
---
|
||||
src/lstack/Makefile | 40 ++++++++++++++++++++--------------------
|
||||
1 file changed, 20 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/src/lstack/Makefile b/src/lstack/Makefile
|
||||
index 1debc79..799e7be 100644
|
||||
--- a/src/lstack/Makefile
|
||||
+++ b/src/lstack/Makefile
|
||||
@@ -61,26 +61,26 @@ include $(patsubst %, %/dir.mk, $(DIRS))
|
||||
OBJS = $(subst .c,.o,$(SRCS))
|
||||
|
||||
LWIP_LIB = $(LIB_PATH)/liblwip.a
|
||||
-LIBRTE_LIB = $(DPDK_LIB_PATH)/librte_pci.a \
|
||||
- $(DPDK_LIB_PATH)/librte_bus_pci.a \
|
||||
- $(DPDK_LIB_PATH)/librte_cmdline.a \
|
||||
- $(DPDK_LIB_PATH)/librte_hash.a \
|
||||
- $(DPDK_LIB_PATH)/librte_mempool.a \
|
||||
- $(DPDK_LIB_PATH)/librte_mempool_ring.a \
|
||||
- $(DPDK_LIB_PATH)/librte_timer.a \
|
||||
- $(DPDK_LIB_PATH)/librte_eal.a \
|
||||
- $(DPDK_LIB_PATH)/librte_ring.a \
|
||||
- $(DPDK_LIB_PATH)/librte_mbuf.a \
|
||||
- $(DPDK_LIB_PATH)/librte_kni.a \
|
||||
- $(DPDK_LIB_PATH)/librte_pmd_ixgbe.a \
|
||||
- $(DPDK_LIB_PATH)/librte_kvargs.a \
|
||||
- $(DPDK_LIB_PATH)/librte_pmd_hinic.a \
|
||||
- $(DPDK_LIB_PATH)/librte_pmd_i40e.a \
|
||||
- $(DPDK_LIB_PATH)/librte_pmd_virtio.a \
|
||||
- $(DPDK_LIB_PATH)/librte_bus_vdev.a \
|
||||
- $(DPDK_LIB_PATH)/librte_net.a \
|
||||
- $(DPDK_LIB_PATH)/librte_ethdev.a \
|
||||
- $(DPDK_LIB_PATH)/librte_pdump.a
|
||||
+LIBRTE_LIB = $(DPDK_LIB_PATH)/librte_pci.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_bus_pci.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_cmdline.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_hash.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_mempool.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_mempool_ring.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_timer.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_eal.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_ring.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_mbuf.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_kni.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_pmd_ixgbe.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_kvargs.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_pmd_hinic.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_pmd_i40e.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_pmd_virtio.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_bus_vdev.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_net.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_ethdev.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_pdump.so
|
||||
|
||||
|
||||
DEP_LIBS = $(LWIP_LIB) $(LIBRTE_LIB)
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
From 5208fe70d61a7ee9e7bf4e99500e7417bb93df66 Mon Sep 17 00:00:00 2001
|
||||
From 1981869b950e5eaaebfa55bb938336e57e682d7c Mon Sep 17 00:00:00 2001
|
||||
From: wu-changsheng <wuchangsheng2@huawei.com>
|
||||
Date: Tue, 2 Aug 2022 10:38:43 +0800
|
||||
Subject: [PATCH 1/5] clean code space before operator
|
||||
Date: Tue, 26 Jul 2022 21:45:48 +0800
|
||||
Subject: [PATCH 04/20] modify readme and clean code
|
||||
|
||||
---
|
||||
src/lstack/api/lstack_epoll.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/lstack/api/lstack_epoll.c b/src/lstack/api/lstack_epoll.c
|
||||
index 963a696..9c44f87 100644
|
||||
@ -1,7 +1,7 @@
|
||||
From aea2e454eb573edaad09eb3aed245a014050b8ad Mon Sep 17 00:00:00 2001
|
||||
From 99c1b74a5dfe8ace8963e8015d581bd6cd6e092d Mon Sep 17 00:00:00 2001
|
||||
From: wu-changsheng <wuchangsheng2@huawei.com>
|
||||
Date: Tue, 2 Aug 2022 10:39:30 +0800
|
||||
Subject: [PATCH 2/5] ltran-support-muti-proc-with-same-ip
|
||||
Date: Mon, 1 Aug 2022 15:32:49 +0800
|
||||
Subject: [PATCH 06/20] ltran support muti proc with same ip
|
||||
|
||||
---
|
||||
src/common/dpdk_common.h | 2 -
|
||||
@ -24,7 +24,7 @@ Subject: [PATCH 2/5] ltran-support-muti-proc-with-same-ip
|
||||
17 files changed, 82 insertions(+), 189 deletions(-)
|
||||
|
||||
diff --git a/src/common/dpdk_common.h b/src/common/dpdk_common.h
|
||||
index b3d67c1..d06bcb7 100644
|
||||
index 01c941d..987fbdd 100644
|
||||
--- a/src/common/dpdk_common.h
|
||||
+++ b/src/common/dpdk_common.h
|
||||
@@ -62,8 +62,6 @@ static __rte_always_inline void copy_mbuf(struct rte_mbuf *dst, struct rte_mbuf
|
||||
@ -149,10 +149,10 @@ index ca7ce52..09aa04c 100644
|
||||
|
||||
dfx->data.pkts.call_alloc_fail = stack_group->call_alloc_fail;
|
||||
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
|
||||
index d52f2f0..8bd141b 100644
|
||||
index 9da6b7f..3d977b5 100644
|
||||
--- a/src/ltran/ltran_dfx.c
|
||||
+++ b/src/ltran/ltran_dfx.c
|
||||
@@ -861,7 +861,7 @@ static void gazelle_print_lstack_stat_conn(void *buf, const struct gazelle_stat_
|
||||
@@ -860,7 +860,7 @@ static void gazelle_print_lstack_stat_conn(void *buf, const struct gazelle_stat_
|
||||
do {
|
||||
printf("\n------ stack tid: %6u ------\n", stat->tid);
|
||||
printf("No. Proto recv_cnt recv_ring in_send send_ring sem_cnt fd Local Address "
|
||||
@ -161,7 +161,7 @@ index d52f2f0..8bd141b 100644
|
||||
uint32_t unread_pkts = 0;
|
||||
uint32_t unsend_pkts = 0;
|
||||
for (i = 0; i < conn->conn_num && i < GAZELLE_LSTACK_MAX_CONN; i++) {
|
||||
@@ -870,13 +870,13 @@ static void gazelle_print_lstack_stat_conn(void *buf, const struct gazelle_stat_
|
||||
@@ -869,13 +869,13 @@ static void gazelle_print_lstack_stat_conn(void *buf, const struct gazelle_stat_
|
||||
rip.s_addr = conn_info->rip;
|
||||
lip.s_addr = conn_info->lip;
|
||||
if ((conn_info->state == GAZELLE_ACTIVE_LIST) || (conn_info->state == GAZELLE_TIME_WAIT_LIST)) {
|
||||
@ -178,7 +178,7 @@ index d52f2f0..8bd141b 100644
|
||||
inet_ntop(AF_INET, &lip, str_ip, sizeof(str_ip)), conn_info->l_port);
|
||||
} else {
|
||||
printf("Got unknow tcp conn::%s:%5hu, state:%u\n",
|
||||
@@ -1125,14 +1125,24 @@ static int32_t parse_dfx_lstack_args(int32_t argc, char *argv[], struct gazelle_
|
||||
@@ -1124,14 +1124,24 @@ static int32_t parse_dfx_lstack_args(int32_t argc, char *argv[], struct gazelle_
|
||||
{
|
||||
int32_t num_cmd = 0;
|
||||
struct in_addr ip;
|
||||
@ -205,7 +205,7 @@ index d52f2f0..8bd141b 100644
|
||||
}
|
||||
|
||||
param = argv[GAZELLE_COMMAND_ARG_IDX];
|
||||
@@ -1146,6 +1156,7 @@ static int32_t parse_dfx_lstack_args(int32_t argc, char *argv[], struct gazelle_
|
||||
@@ -1145,6 +1155,7 @@ static int32_t parse_dfx_lstack_args(int32_t argc, char *argv[], struct gazelle_
|
||||
|
||||
for (int32_t i = 0; i < num_cmd; i++) {
|
||||
req_msg[i].ip.s_addr = ip.s_addr;
|
||||
@ -610,10 +610,10 @@ index 0562ce1..dfda93f 100644
|
||||
|
||||
static void gazelle_ctl_loop(void)
|
||||
diff --git a/src/ltran/ltran_param.c b/src/ltran/ltran_param.c
|
||||
index 9273ee2..b8e9732 100644
|
||||
index 40ee8d3..75cc2f9 100644
|
||||
--- a/src/ltran/ltran_param.c
|
||||
+++ b/src/ltran/ltran_param.c
|
||||
@@ -60,7 +60,7 @@ static int32_t parse_str2mac(char *mac_str, uint8_t *ether_addr)
|
||||
@@ -59,7 +59,7 @@ static int32_t parse_str2mac(char *mac_str, uint8_t *ether_addr)
|
||||
char *tmp = NULL;
|
||||
int32_t i = 0;
|
||||
token = strtok_s(mac_str, delim, &tmp);
|
||||
@ -622,7 +622,7 @@ index 9273ee2..b8e9732 100644
|
||||
one_bit_mac = strtoul(token, &end, HEX_BASE);
|
||||
if ((end == NULL) || (*end != '\0')) {
|
||||
gazelle_set_errno(GAZELLE_EMAC);
|
||||
@@ -420,7 +420,6 @@ static void macs_cache_free(char **bond_mac_cache, int32_t cnt, int32_t max_cnt)
|
||||
@@ -419,7 +419,6 @@ static void macs_cache_free(char **bond_mac_cache, int32_t cnt, int32_t max_cnt)
|
||||
for (int32_t i = 0; i < cnt; i++) {
|
||||
GAZELLE_FREE(bond_mac_cache[i]);
|
||||
}
|
||||
@ -630,7 +630,7 @@ index 9273ee2..b8e9732 100644
|
||||
}
|
||||
|
||||
static void parse_bond_macs_separate(const char *bond_macs_str, char **bond_mac_cache, int32_t cache_cnt,
|
||||
@@ -452,7 +451,6 @@ static void parse_bond_macs_separate(const char *bond_macs_str, char **bond_mac_
|
||||
@@ -451,7 +450,6 @@ static void parse_bond_macs_separate(const char *bond_macs_str, char **bond_mac_
|
||||
}
|
||||
|
||||
free(bond_macs);
|
||||
@ -1,64 +0,0 @@
|
||||
From abe38628e7254ffbfd82445204b5d248f67ae648 Mon Sep 17 00:00:00 2001
|
||||
From: xiusailong <xiusailong@huawei.com>
|
||||
Date: Fri, 22 Jul 2022 16:49:45 +0800
|
||||
Subject: [PATCH] adapt-to-20.03
|
||||
|
||||
---
|
||||
src/ltran/ltran_dfx.c | 1 +
|
||||
src/ltran/ltran_param.c | 1 +
|
||||
src/ltran/ltran_param.h | 1 +
|
||||
src/ltran/main.c | 2 +-
|
||||
4 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
|
||||
index 9da6b7f..d52f2f0 100644
|
||||
--- a/src/ltran/ltran_dfx.c
|
||||
+++ b/src/ltran/ltran_dfx.c
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
+#include <stdbool.h>
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <getopt.h>
|
||||
diff --git a/src/ltran/ltran_param.c b/src/ltran/ltran_param.c
|
||||
index 40ee8d3..9273ee2 100644
|
||||
--- a/src/ltran/ltran_param.c
|
||||
+++ b/src/ltran/ltran_param.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <syslog.h>
|
||||
#include <stdlib.h>
|
||||
#include <securec.h>
|
||||
+#include <stdbool.h>
|
||||
|
||||
#include "ltran_param.h"
|
||||
#include "ltran_errno.h"
|
||||
diff --git a/src/ltran/ltran_param.h b/src/ltran/ltran_param.h
|
||||
index 3ec6451..48efb83 100644
|
||||
--- a/src/ltran/ltran_param.h
|
||||
+++ b/src/ltran/ltran_param.h
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <rte_ether.h>
|
||||
+#include <stdbool.h>
|
||||
|
||||
#include "gazelle_opt.h"
|
||||
|
||||
diff --git a/src/ltran/main.c b/src/ltran/main.c
|
||||
index 691595e..d1e4030 100644
|
||||
--- a/src/ltran/main.c
|
||||
+++ b/src/ltran/main.c
|
||||
@@ -58,7 +58,7 @@ static void sig_default_handler(int32_t sig)
|
||||
LTRAN_ERR("ltran dumped,caught signal:%d.\n", sig);
|
||||
print_stack();
|
||||
dpdk_kni_release();
|
||||
- kill(getpid(), sig);
|
||||
+ kill(getpt(), sig);
|
||||
}
|
||||
|
||||
static void signal_init(void)
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 0affec12f7b888b996992105c9042a60efcd5029 Mon Sep 17 00:00:00 2001
|
||||
From 9404570889caba130960d55fdba39b8bffc61274 Mon Sep 17 00:00:00 2001
|
||||
From: wu-changsheng <wuchangsheng2@huawei.com>
|
||||
Date: Tue, 2 Aug 2022 10:39:54 +0800
|
||||
Subject: [PATCH 3/5] fix-rpc-msg-out-of-bound
|
||||
Date: Mon, 1 Aug 2022 17:27:49 +0800
|
||||
Subject: [PATCH 07/20] fix rpc msg out of bound
|
||||
|
||||
---
|
||||
src/lstack/core/lstack_thread_rpc.c | 5 +++--
|
||||
@ -1,7 +1,7 @@
|
||||
From fef672fb6a817d96c220e13f416d57cca65dc1ea Mon Sep 17 00:00:00 2001
|
||||
From 44d9d6ed74efef409cd05dbd7d99aeaa70ffb359 Mon Sep 17 00:00:00 2001
|
||||
From: wu-changsheng <wuchangsheng2@huawei.com>
|
||||
Date: Tue, 2 Aug 2022 10:40:16 +0800
|
||||
Subject: [PATCH 4/5] fix-traversal-array-use-NULL-pointer
|
||||
Date: Mon, 1 Aug 2022 19:25:28 +0800
|
||||
Subject: [PATCH 08/20] fix traversal array use NULL pointer
|
||||
|
||||
---
|
||||
src/ltran/ltran_instance.c | 4 ++++
|
||||
@ -1,7 +1,7 @@
|
||||
From dc0d9d84da1f3552dd9014a9de43188ccbf42519 Mon Sep 17 00:00:00 2001
|
||||
From 9c3fe074be66abe142f19709bf7d1fe9793e104f Mon Sep 17 00:00:00 2001
|
||||
From: wu-changsheng <wuchangsheng2@huawei.com>
|
||||
Date: Tue, 2 Aug 2022 10:40:42 +0800
|
||||
Subject: [PATCH 5/5] same-stack-thread-don-t-repeate-send-msg
|
||||
Date: Mon, 1 Aug 2022 22:34:13 +0800
|
||||
Subject: [PATCH 09/20] same stack thread don't repeate send msg
|
||||
|
||||
---
|
||||
src/lstack/core/lstack_lwip.c | 13 +++++++------
|
||||
@ -109,7 +109,7 @@ index 358ce54..d0f5257 100644
|
||||
}
|
||||
|
||||
diff --git a/src/lstack/include/lstack_protocol_stack.h b/src/lstack/include/lstack_protocol_stack.h
|
||||
index d3071f3..2dff980 100644
|
||||
index 39d29d7..2a6aec7 100644
|
||||
--- a/src/lstack/include/lstack_protocol_stack.h
|
||||
+++ b/src/lstack/include/lstack_protocol_stack.h
|
||||
@@ -50,7 +50,7 @@ struct protocol_stack {
|
||||
@ -32,7 +32,7 @@ index 987fbdd..1c3e7e8 100644
|
||||
if (n > entries) {
|
||||
@@ -172,7 +172,7 @@ static __rte_always_inline uint32_t gazelle_ring_sc_dequeue(struct rte_ring *r,
|
||||
|
||||
DEQUEUE_PTRS(r, &r[1], cons, obj_table, n, void *);
|
||||
__rte_ring_dequeue_elems(r, cons, obj_table, sizeof(void *), n);
|
||||
|
||||
- __atomic_store_n(&r->cons.tail, cons + n, __ATOMIC_RELEASE);
|
||||
+ r->cons.tail = cons + n;
|
||||
@ -1,33 +0,0 @@
|
||||
From 21ae5e6b6bc7baa02dbe934b28677ad9e0646447 Mon Sep 17 00:00:00 2001
|
||||
From: wu-changsheng <wuchangsheng2@huawei.com>
|
||||
Date: Tue, 6 Sep 2022 10:41:59 +0800
|
||||
Subject: [PATCH] fix ltran sig handler get pid
|
||||
|
||||
---
|
||||
src/ltran/main.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/ltran/main.c b/src/ltran/main.c
|
||||
index d1e4030..2e3af82 100644
|
||||
--- a/src/ltran/main.c
|
||||
+++ b/src/ltran/main.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <syslog.h>
|
||||
#include <sys/types.h>
|
||||
#include <rte_malloc.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
#include "dpdk_common.h"
|
||||
#include "ltran_log.h"
|
||||
@@ -58,7 +59,7 @@ static void sig_default_handler(int32_t sig)
|
||||
LTRAN_ERR("ltran dumped,caught signal:%d.\n", sig);
|
||||
print_stack();
|
||||
dpdk_kni_release();
|
||||
- kill(getpt(), sig);
|
||||
+ kill(getpid(), sig);
|
||||
}
|
||||
|
||||
static void signal_init(void)
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -32,7 +32,7 @@ index 1c3e7e8..c2cbda7 100644
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ DEQUEUE_PTRS(r, &r[1], cons, obj_table, n, void *);
|
||||
+ __rte_ring_dequeue_elems(r, cons, obj_table, sizeof(void *), n);
|
||||
+
|
||||
+ return n;
|
||||
+}
|
||||
@ -1,7 +1,7 @@
|
||||
From 17325698f15226cfd92760f6413edbbdc66362a1 Mon Sep 17 00:00:00 2001
|
||||
From b41e22d7d8af5c990edc04130d885c9bd675461e Mon Sep 17 00:00:00 2001
|
||||
From: chengyechun <chengyechun1@huawei.com>
|
||||
Date: Thu, 20 Oct 2022 14:37:54 +0800
|
||||
Subject: [PATCH] refactor kernel event notice
|
||||
Date: Thu, 20 Oct 2022 11:29:16 +0800
|
||||
Subject: [PATCH 2/2] refactor event notice
|
||||
|
||||
---
|
||||
src/common/gazelle_opt.h | 1 +
|
||||
@ -1068,7 +1068,7 @@ index bc77909..46cbbe7 100644
|
||||
}
|
||||
-
|
||||
diff --git a/src/lstack/include/lstack_protocol_stack.h b/src/lstack/include/lstack_protocol_stack.h
|
||||
index 082430a..75e3254 100644
|
||||
index 0eda45d..cc2cfb9 100644
|
||||
--- a/src/lstack/include/lstack_protocol_stack.h
|
||||
+++ b/src/lstack/include/lstack_protocol_stack.h
|
||||
@@ -14,6 +14,7 @@
|
||||
@ -1094,7 +1094,7 @@ index 082430a..75e3254 100644
|
||||
+ char pad1 __rte_cache_aligned;
|
||||
+
|
||||
struct netif netif;
|
||||
struct lstack_eth_dev_ops *dev_ops;
|
||||
struct eth_dev_ops *dev_ops;
|
||||
uint32_t rx_ring_used;
|
||||
@@ -62,7 +66,7 @@ struct protocol_stack {
|
||||
|
||||
@ -1211,7 +1211,7 @@ index 3c8fd1b..d6c81a7 100644
|
||||
int32_t lstack_epoll_create1(int32_t flags);
|
||||
int32_t lstack_epoll_ctl(int32_t epfd, int32_t op, int32_t fd, struct epoll_event *event);
|
||||
diff --git a/src/lstack/netif/lstack_ethdev.c b/src/lstack/netif/lstack_ethdev.c
|
||||
index 151d0f7..a20895b 100644
|
||||
index 28bf32d..4757d72 100644
|
||||
--- a/src/lstack/netif/lstack_ethdev.c
|
||||
+++ b/src/lstack/netif/lstack_ethdev.c
|
||||
@@ -79,7 +79,7 @@ void eth_dev_recv(struct rte_mbuf *mbuf)
|
||||
@ -1224,10 +1224,10 @@ index 151d0f7..a20895b 100644
|
||||
{
|
||||
uint32_t nr_pkts;
|
||||
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
|
||||
index 8bd141b..c1109f4 100644
|
||||
index 3d977b5..de97a48 100644
|
||||
--- a/src/ltran/ltran_dfx.c
|
||||
+++ b/src/ltran/ltran_dfx.c
|
||||
@@ -876,8 +876,8 @@ static void gazelle_print_lstack_stat_conn(void *buf, const struct gazelle_stat_
|
||||
@@ -875,8 +875,8 @@ static void gazelle_print_lstack_stat_conn(void *buf, const struct gazelle_stat_
|
||||
inet_ntop(AF_INET, &rip, str_rip, sizeof(str_rip)), conn_info->r_port,
|
||||
tcp_state_to_str(conn_info->tcp_sub_state));
|
||||
} else if (conn_info->state == GAZELLE_LISTEN_LIST) {
|
||||
@ -1,7 +1,7 @@
|
||||
From 6c36a958fc9b9889bf4bb42dfbdcf0c88cf3a566 Mon Sep 17 00:00:00 2001
|
||||
From b485a70ba6a68f10e4958843648400d3caaa4837 Mon Sep 17 00:00:00 2001
|
||||
From: wu-changsheng <wuchangsheng2@huawei.com>
|
||||
Date: Wed, 2 Nov 2022 11:20:56 +0800
|
||||
Subject: [PATCH] add-gro
|
||||
Date: Tue, 1 Nov 2022 10:51:13 +0800
|
||||
Subject: [PATCH 6/7] add gro
|
||||
|
||||
---
|
||||
src/lstack/Makefile | 1 +
|
||||
@ -11,17 +11,17 @@ Subject: [PATCH] add-gro
|
||||
4 files changed, 33 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/lstack/Makefile b/src/lstack/Makefile
|
||||
index 799e7be..1560d0c 100644
|
||||
index 7ce35d4..cb7be16 100644
|
||||
--- a/src/lstack/Makefile
|
||||
+++ b/src/lstack/Makefile
|
||||
@@ -69,6 +69,7 @@ LIBRTE_LIB = $(DPDK_LIB_PATH)/librte_pci.so \
|
||||
$(DPDK_LIB_PATH)/librte_mempool_ring.so \
|
||||
$(DPDK_LIB_PATH)/librte_timer.so \
|
||||
$(DPDK_LIB_PATH)/librte_eal.so \
|
||||
+ $(DPDK_LIB_PATH)/librte_gro.so \
|
||||
$(DPDK_LIB_PATH)/librte_ring.so \
|
||||
$(DPDK_LIB_PATH)/librte_mbuf.so \
|
||||
$(DPDK_LIB_PATH)/librte_kni.so \
|
||||
@@ -65,6 +65,7 @@ LIBRTE_LIB = $(LIB_PATH)/librte_bus_pci.so \
|
||||
$(LIB_PATH)/librte_mempool_ring.so \
|
||||
$(LIB_PATH)/librte_timer.so \
|
||||
$(LIB_PATH)/librte_eal.so \
|
||||
+ $(LIB_PATH)/librte_gro.so \
|
||||
$(LIB_PATH)/librte_ring.so \
|
||||
$(LIB_PATH)/librte_mbuf.so \
|
||||
$(LIB_PATH)/librte_telemetry.so \
|
||||
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
|
||||
index f924ee7..52b4624 100644
|
||||
--- a/src/lstack/core/lstack_lwip.c
|
||||
@ -65,7 +65,7 @@ index f924ee7..52b4624 100644
|
||||
} else {
|
||||
if (sock->wakeup) {
|
||||
diff --git a/src/lstack/netif/lstack_ethdev.c b/src/lstack/netif/lstack_ethdev.c
|
||||
index 30e7204..cf783f4 100644
|
||||
index 3abed5e..1c35919 100644
|
||||
--- a/src/lstack/netif/lstack_ethdev.c
|
||||
+++ b/src/lstack/netif/lstack_ethdev.c
|
||||
@@ -41,6 +41,7 @@ void eth_dev_recv(struct rte_mbuf *mbuf, struct protocol_stack *stack)
|
||||
@ -88,7 +88,7 @@ index 30e7204..cf783f4 100644
|
||||
|
||||
if (head != NULL) {
|
||||
diff --git a/src/lstack/netif/lstack_vdev.c b/src/lstack/netif/lstack_vdev.c
|
||||
index 4f2960b..68b6a0c 100644
|
||||
index 1c148e1..8df0c5e 100644
|
||||
--- a/src/lstack/netif/lstack_vdev.c
|
||||
+++ b/src/lstack/netif/lstack_vdev.c
|
||||
@@ -18,6 +18,8 @@
|
||||
@ -1,6 +1,6 @@
|
||||
From 5b51e86ec445f7411f2fb8669397d84761766e3e Mon Sep 17 00:00:00 2001
|
||||
From af42b7871afc5ad80b5b2db5341a852218de0e1e Mon Sep 17 00:00:00 2001
|
||||
From: wu-changsheng <wuchangsheng2@huawei.com>
|
||||
Date: Mon, 7 Nov 2022 15:37:14 +0800
|
||||
Date: Mon, 7 Nov 2022 15:15:52 +0800
|
||||
Subject: [PATCH] resolve the conflict between the eth_dev_ops variable and the
|
||||
dpdk-19.11
|
||||
|
||||
@ -15,7 +15,7 @@ Subject: [PATCH] resolve the conflict between the eth_dev_ops variable and the
|
||||
7 files changed, 18 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/src/common/dpdk_common.h b/src/common/dpdk_common.h
|
||||
index bff4913..315707f 100644
|
||||
index c2cbda7..753c168 100644
|
||||
--- a/src/common/dpdk_common.h
|
||||
+++ b/src/common/dpdk_common.h
|
||||
@@ -135,7 +135,7 @@ static __rte_always_inline uint32_t gazelle_light_ring_dequeue_burst(struct rte_
|
||||
@ -49,20 +49,20 @@ index 52b4624..0437187 100644
|
||||
}
|
||||
gazelle_ring_read_over(sock->recv_ring);
|
||||
diff --git a/src/lstack/include/lstack_ethdev.h b/src/lstack/include/lstack_ethdev.h
|
||||
index 95f5161..c64b4a0 100644
|
||||
index a174978..c64b4a0 100644
|
||||
--- a/src/lstack/include/lstack_ethdev.h
|
||||
+++ b/src/lstack/include/lstack_ethdev.h
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
struct protocol_stack;
|
||||
struct rte_mbuf;
|
||||
-struct lstack_eth_dev_ops {
|
||||
-struct eth_dev_ops {
|
||||
+struct lstack_dev_ops {
|
||||
uint32_t (*rx_poll)(struct protocol_stack *stack, struct rte_mbuf **pkts, uint32_t max_mbuf);
|
||||
uint32_t (*tx_xmit)(struct protocol_stack *stack, struct rte_mbuf **pkts, uint32_t nr_pkts);
|
||||
};
|
||||
diff --git a/src/lstack/include/lstack_protocol_stack.h b/src/lstack/include/lstack_protocol_stack.h
|
||||
index c836b77..2d9053a 100644
|
||||
index fed1882..2d9053a 100644
|
||||
--- a/src/lstack/include/lstack_protocol_stack.h
|
||||
+++ b/src/lstack/include/lstack_protocol_stack.h
|
||||
@@ -21,6 +21,7 @@
|
||||
@ -77,32 +77,32 @@ index c836b77..2d9053a 100644
|
||||
char pad1 __rte_cache_aligned;
|
||||
|
||||
struct netif netif;
|
||||
- struct lstack_eth_dev_ops *dev_ops;
|
||||
- struct eth_dev_ops *dev_ops;
|
||||
+ struct lstack_dev_ops dev_ops;
|
||||
uint32_t rx_ring_used;
|
||||
uint32_t tx_ring_used;
|
||||
|
||||
diff --git a/src/lstack/include/lstack_vdev.h b/src/lstack/include/lstack_vdev.h
|
||||
index b84d280..0693c4d 100644
|
||||
index 5836257..0693c4d 100644
|
||||
--- a/src/lstack/include/lstack_vdev.h
|
||||
+++ b/src/lstack/include/lstack_vdev.h
|
||||
@@ -13,10 +13,12 @@
|
||||
#ifndef _GAZELLE_VDEV_H_
|
||||
#define _GAZELLE_VDEV_H_
|
||||
|
||||
-struct lstack_eth_dev_ops;
|
||||
-struct eth_dev_ops;
|
||||
+#include <stdbool.h>
|
||||
+
|
||||
+struct lstack_dev_ops;
|
||||
struct gazelle_quintuple;
|
||||
enum reg_ring_type;
|
||||
-void vdev_dev_ops_init(struct lstack_eth_dev_ops **dev_ops);
|
||||
-void vdev_dev_ops_init(struct eth_dev_ops **dev_ops);
|
||||
+void vdev_dev_ops_init(struct lstack_dev_ops *dev_ops);
|
||||
int vdev_reg_xmit(enum reg_ring_type type, struct gazelle_quintuple *qtuple);
|
||||
|
||||
#endif /* _GAZELLE_VDEV_H_ */
|
||||
diff --git a/src/lstack/netif/lstack_ethdev.c b/src/lstack/netif/lstack_ethdev.c
|
||||
index cf783f4..dbe7203 100644
|
||||
index 1c35919..d410a5c 100644
|
||||
--- a/src/lstack/netif/lstack_ethdev.c
|
||||
+++ b/src/lstack/netif/lstack_ethdev.c
|
||||
@@ -88,7 +88,7 @@ int32_t eth_dev_poll(void)
|
||||
@ -139,24 +139,24 @@ index cf783f4..dbe7203 100644
|
||||
if (sent_pkts < 1) {
|
||||
stack->stats.tx_drop++;
|
||||
diff --git a/src/lstack/netif/lstack_vdev.c b/src/lstack/netif/lstack_vdev.c
|
||||
index 68b6a0c..e2671b4 100644
|
||||
index 8df0c5e..e2671b4 100644
|
||||
--- a/src/lstack/netif/lstack_vdev.c
|
||||
+++ b/src/lstack/netif/lstack_vdev.c
|
||||
@@ -168,21 +168,13 @@ int32_t vdev_reg_xmit(enum reg_ring_type type, struct gazelle_quintuple *qtuple)
|
||||
return (int32_t)sent_pkts;
|
||||
}
|
||||
|
||||
-static struct lstack_eth_dev_ops g_eth_dev_ops = {
|
||||
-static struct eth_dev_ops g_eth_dev_ops = {
|
||||
- .rx_poll = vdev_rx_poll,
|
||||
- .tx_xmit = vdev_tx_xmit,
|
||||
-};
|
||||
-
|
||||
-static struct lstack_eth_dev_ops g_ltran_eth_dev_ops = {
|
||||
-static struct eth_dev_ops g_ltran_eth_dev_ops = {
|
||||
- .rx_poll = ltran_rx_poll,
|
||||
- .tx_xmit = ltran_tx_xmit,
|
||||
-};
|
||||
-
|
||||
-void vdev_dev_ops_init(struct lstack_eth_dev_ops **dev_ops)
|
||||
-void vdev_dev_ops_init(struct eth_dev_ops **dev_ops)
|
||||
+void vdev_dev_ops_init(struct lstack_dev_ops *dev_ops)
|
||||
{
|
||||
if (use_ltran()) {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user