Commit 9dd76582 authored by Franck Messaoudi's avatar Franck Messaoudi

Merge branch 'develop' into feature-export-ebpf-map-sizes

Merging develop into feature-export-ebpf-map-sizes
parents 29a001bd 31e362c5
## Related Issue(s) / Merge Request(s)
<!-- Link to the related issue(s) using GitLab references, e.g., Closes #123, or link to related merge requests. -->
## Description
<!-- Provide a clear and concise summary of the changes introduced in this MR. -->
## Tested Environment (e.g., radios, interfaces, CN)
<!-- Describe the testing environment and steps to validate the changes. -->
## Configuration Updates (e.g., files, parameters)
<!-- List any changes to configuration files, parameters, etc. -->
## Known Issues / Limitations
<!-- Mention any known issues or limitations related to this MR. -->
## Checklist
* [ ] Code follows project coding standards.
* [ ] Relevant tests have been added or updated.
* [ ] Documentation has been updated where necessary.
* [ ] Configuration changes have been validated in the target environment(s).
## Log files or packet captures (PCAPs)
<!-- Attach or reference any relevant log files or packet captures (PCAPs). -->
## Additional Notes
<!-- Provide any additional information or context that may be helpful for the reviewer. -->
...@@ -143,6 +143,11 @@ function main() ...@@ -143,6 +143,11 @@ function main()
verbose=1 verbose=1
shift; shift;
;; ;;
--bpf-debug)
echo "BPF debug logs enabled"
cmake_args="$cmake_args -DBPF_DEBUG=ON"
shift;
;;
-V | --Verbose) -V | --Verbose)
echo "CMake build process verbose" echo "CMake build process verbose"
verbose=1 verbose=1
......
...@@ -595,7 +595,9 @@ pipeline { ...@@ -595,7 +595,9 @@ pipeline {
for (htmlFile in htmlFiles) { for (htmlFile in htmlFiles) {
if ("MERGE".equals(env.gitlabActionType)) { if ("MERGE".equals(env.gitlabActionType)) {
sh "sed -i -e 's#TEMPLATE_MERGE_REQUEST_LINK#${gitlabMergeRequestLink}#g' ${htmlFile}" sh "sed -i -e 's#TEMPLATE_MERGE_REQUEST_LINK#${gitlabMergeRequestLink}#g' ${htmlFile}"
sh "sed -i -e 's#TEMPLATE_MERGE_REQUEST_TEMPLATE#${env.gitlabMergeRequestTitle}#' ${htmlFile}" def unsafePattern = /[^a-zA-Z0-9",\.\?\-_ %\+\[\]\(\)~]/
def sanitizedTitle = env.gitlabMergeRequestTitle.replaceAll(unsafePattern, '-')
sh "sed -i -e 's#TEMPLATE_MERGE_REQUEST_TEMPLATE#${sanitizedTitle}#' ${htmlFile}"
} }
sh "sed -i -e 's#TEMPLATE_TIME#${JOB_TIMESTAMP}#' ${htmlFile}" sh "sed -i -e 's#TEMPLATE_TIME#${JOB_TIMESTAMP}#' ${htmlFile}"
archiveArtifacts artifacts: htmlFile archiveArtifacts artifacts: htmlFile
......
...@@ -36,9 +36,11 @@ ENV DEBIAN_FRONTEND=noninteractive ...@@ -36,9 +36,11 @@ ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris ENV TZ=Europe/Paris
ENV IS_DOCKERFILE=1 ENV IS_DOCKERFILE=1
ARG ENABLE_LTTNG=false ARG ENABLE_LTTNG=false
ARG BPF_DEBUG=false
RUN apt-get update && \ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \ DEBIAN_FRONTEND=noninteractive apt-get install --yes \
cmake \
psmisc \ psmisc \
git \ git \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
...@@ -66,6 +68,7 @@ FROM oai-upf-base AS oai-upf-builder ...@@ -66,6 +68,7 @@ FROM oai-upf-base AS oai-upf-builder
COPY . /openair-upf COPY . /openair-upf
# Building UPF # Building UPF
WORKDIR /openair-upf/build/scripts WORKDIR /openair-upf/build/scripts
ARG BUILD_ARGS=""
RUN if [ "$ENABLE_LTTNG" = "true" ]; then apt-get update && \ RUN if [ "$ENABLE_LTTNG" = "true" ]; then apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \ DEBIAN_FRONTEND=noninteractive apt-get install --yes \
libstdc++-12-dev \ libstdc++-12-dev \
...@@ -73,11 +76,12 @@ RUN if [ "$ENABLE_LTTNG" = "true" ]; then apt-get update && \ ...@@ -73,11 +76,12 @@ RUN if [ "$ENABLE_LTTNG" = "true" ]; then apt-get update && \
liblttng-ust-dev \ liblttng-ust-dev \
lttng-tools && \ lttng-tools && \
ldconfig && \ ldconfig && \
./build_upf --clean --Verbose --build-type Release --jobs --lttng; \ BUILD_ARGS="--lttng"; \
else \ else \
ldconfig && \ ldconfig; \
./build_upf --clean --Verbose --build-type Release --jobs --jobs; \
fi && \ fi && \
if [ "$BPF_DEBUG" = "true" ]; then BUILD_ARGS="$BUILD_ARGS --bpf-debug"; fi && \
./build_upf --clean --Verbose --build-type Release --jobs ${BUILD_ARGS}; \
ldd /openair-upf/build/upf/build/upf && \ ldd /openair-upf/build/upf/build/upf && \
mv /openair-upf/build/upf/build/upf /openair-upf/build/upf/build/oai_upf && \ mv /openair-upf/build/upf/build/upf /openair-upf/build/upf/build/oai_upf && \
echo "end of UPF build" echo "end of UPF build"
......
...@@ -11,6 +11,11 @@ include_directories(${SRC_TOP_DIR}/${MOUNTED_COMMON}/utils) ...@@ -11,6 +11,11 @@ include_directories(${SRC_TOP_DIR}/${MOUNTED_COMMON}/utils)
add_definitions(-DKERNEL_SPACE) add_definitions(-DKERNEL_SPACE)
if(DEFINED BPF_DEBUG)
if(BPF_DEBUG)
add_definitions(-DBPF_DEBUG)
endif()
endif()
add_custom_target(upf_xdp_all DEPENDS pfcp_session_lookup_xdp) add_custom_target(upf_xdp_all DEPENDS pfcp_session_lookup_xdp)
# add_custom_target(upf_tc_all DEPENDS qer_tc) # add_custom_target(upf_tc_all DEPENDS qer_tc)
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
#include <bpf_helpers.h> #include <bpf_helpers.h>
#define DEBUG 1 // #define DEBUG 0
#ifdef DEBUG #ifdef BPF_DEBUG
/* Only use this for debug output. Notice output from bpf_trace_printk() /* Only use this for debug output. Notice output from bpf_trace_printk()
* end-up in /sys/kernel/debug/tracing/trace_pipe * end-up in /sys/kernel/debug/tracing/trace_pipe
*/ */
...@@ -17,15 +17,7 @@ ...@@ -17,15 +17,7 @@
bpf_trace_printk(____fmt, sizeof(____fmt), ##__VA_ARGS__); \ bpf_trace_printk(____fmt, sizeof(____fmt), ##__VA_ARGS__); \
}) })
#else #else
#define bpf_debug(fmt, ...) \ #define bpf_debug(fmt, ...)
{} \
while (0)
#endif #endif
#define bpf_debug2(fmt, ...) \
({ \
char ____fmt[] = fmt; \
bpf_trace_printk(____fmt, sizeof(____fmt), ##__VA_ARGS__); \
})
#else
#endif // __LOGGER_H__ #endif // __LOGGER_H__
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment