Skip to content

Commit

Permalink
super-linter: fix issues
Browse files Browse the repository at this point in the history
Signed-off-by: Maryam Tahhan <[email protected]>
  • Loading branch information
maryamtahhan committed Nov 30, 2023
1 parent 3b49e0d commit bf4977e
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions tools/jsonc_gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,28 @@ fi

for device in "${!AFXDP_DEVICES_@}";
do
AFXDP_DEVICES[$num_of_devs]="${!device}"
AFXDP_DEVICES[num_of_devs]="${!device}"
if [ ${PINNED_BPF_MAP} = false ] ; then
MAP_OR_UDS[$num_of_devs]="\"uds_path\""
MAP_OR_UDS_PATH[$num_of_devs]="\"/tmp/afxdp_dp/${!device}/afxdp.sock\""
MAP_OR_UDS[num_of_devs]="\"uds_path\""
MAP_OR_UDS_PATH[num_of_devs]="\"/tmp/afxdp_dp/${!device}/afxdp.sock\""
else
MAP_OR_UDS[$num_of_devs]="\"xsk_pin_path\""
MAP_OR_UDS_PATH[$num_of_devs]="\"/tmp/afxdp_dp/${!device}/xsks_map\""
MAP_OR_UDS[num_of_devs]="\"xsk_pin_path\""
MAP_OR_UDS_PATH[num_of_devs]="\"/tmp/afxdp_dp/${!device}/xsks_map\""
fi
num_of_devs=$((num_of_devs+1))
done

if [ $num_of_devs == 0 ] ; then
AFXDP_DEVICES+="net1"
AFXDP_DEVICES+=("net1")
if [ ${PINNED_BPF_MAP} = false ] ; then
MAP_OR_UDS[$num_of_devs]="uds_path"
MAP_OR_UDS_PATH[$num_of_devs]="/tmp/afxdp_dp/${AFXDP_DEVICES}/afxdp.sock"
MAP_OR_UDS[num_of_devs]="uds_path"
MAP_OR_UDS_PATH[num_of_devs]="/tmp/afxdp_dp/${AFXDP_DEVICES[num_of_devs]}/afxdp.sock"
else
MAP_OR_UDS[$num_of_devs]="xsk_pin_path"
MAP_OR_UDS_PATH[$num_of_devs]="/tmp/afxdp_dp/${AFXDP_DEVICES}/xsks_map"
MAP_OR_UDS[num_of_devs]="xsk_pin_path"
MAP_OR_UDS_PATH[num_of_devs]="/tmp/afxdp_dp//${AFXDP_DEVICES[num_of_devs]}/xsks_map"
fi
fi

# echo "${MAP_OR_UDS[@]}"
# echo "${MAP_OR_UDS_PATH[@]}"

num_of_interfaces=0
num_of_qids=0
numa_node=0
Expand All @@ -71,7 +68,7 @@ declare -a num_of_cores_in_each_numa_node
declare -a LCORE

# get list of interfaces
for net in ${AFXDP_DEVICES[@]}
for net in "${AFXDP_DEVICES[@]}"
do
NET[num_of_interfaces++]=$net
QID[num_of_qids++]=${DEFAULT_QID}
Expand Down

0 comments on commit bf4977e

Please sign in to comment.