Skip to content

Commit

Permalink
bpf-map-pinning: cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Maryam Tahhan <[email protected]>
  • Loading branch information
maryamtahhan committed Mar 27, 2023
1 parent 502703e commit 4fd2fdf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
1 change: 0 additions & 1 deletion containerization/docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ RUN apt-get update && apt-get install -y \

# Copy artifacts from the build container
COPY --from=build /cndp/usr/local/bin/cndpfwd /usr/bin/
COPY --from=build /cndp/usr/local/bin/cnet-graph /usr/bin/
COPY --from=build /cndp/usr/local/bin/fwd /usr/bin
COPY --from=build /cndp/usr/local/lib/x86_64-linux-gnu/*.so /usr/lib/
COPY --from=build /cndp/lang/go/stats/prometheus/prometheus /usr/bin/
Expand Down
30 changes: 15 additions & 15 deletions tools/jsonc_gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ while getopts "kp" flag; do
done

if [ ${KIND} = false ] ; then
LIST_OF_QIDS=${LIST_OF_QIDS:-4}
LIST_OF_QIDS=${LIST_OF_QIDS:-4}
else
LIST_OF_QIDS=${LIST_OF_QIDS:-0} # For kind using veth use queue 0
LIST_OF_QIDS=${LIST_OF_QIDS:-0} # For kind using veth use queue 0
fi

if [ ${PINNED_BPF_MAP} = false ] ; then
UDS_OR_MAP_PATH="uds_path"
UDS_OR_MAP="/tmp/afxdp.sock"
UDS_OR_MAP_PATH="uds_path"
UDS_OR_MAP="/tmp/afxdp.sock"
else
UDS_OR_MAP_PATH="xsk-pin-path"
UDS_OR_MAP="/tmp/xsks_map"
UDS_OR_MAP_PATH="xsk-pin-path"
UDS_OR_MAP="/tmp/xsks_map"
fi

num_of_interfaces=0
Expand Down Expand Up @@ -90,16 +90,16 @@ if [ $KIND = false ] ; then
IFS=$':\n';
for each_output in $output
do
if [ $((l%2)) -eq 0 ]
then
((num_of_numa_nodes++))
else
# split the comma separated value of cores into an array
IFS=', ' read -ra list_of_numa_lcores <<< "$each_output"
if [ $((l%2)) -eq 0 ]
then
((num_of_numa_nodes++))
else
# split the comma separated value of cores into an array
IFS=', ' read -ra list_of_numa_lcores <<< "$each_output"

num_of_cores_in_each_numa_node[numa_node++]=${#list_of_numa_lcores[@]}
LCORE=("${LCORE[@]}" "${list_of_numa_lcores[@]}")
fi
num_of_cores_in_each_numa_node[numa_node++]=${#list_of_numa_lcores[@]}
LCORE=("${LCORE[@]}" "${list_of_numa_lcores[@]}")
fi
((l++))
done
unset IFS
Expand Down

0 comments on commit 4fd2fdf

Please sign in to comment.