Skip to content

Commit

Permalink
super-linter: fixup shell script errors
Browse files Browse the repository at this point in the history
Signed-off-by: Maryam Tahhan <[email protected]>
  • Loading branch information
maryamtahhan committed Apr 28, 2023
1 parent a35fee7 commit 6fe92d1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
9 changes: 5 additions & 4 deletions doc/guides/sample_app_ug/cndpfwd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ The creation of an AF_XDP socket involves loading of a BPF program which is a pr
In order to run the CNDP application in an unprivileged container, the privileged operations are
done by a Kubernetes device plugin. The CNDP application talks to the Kubernetes device plugin over
a unix domain socket. The path to the unix domain socket created by the device plugin is the value
of the "uds_path" attribute. The "unprivileged" flag should be true if running the CNDP app in an
unprivileged container. The sysctl param ``kernel.unprivileged_bpf_disabled`` should be 0 to perform
unprivileged BPF operations. For more details about the device plugin, please refer to
:ref:`Integration of the K8s device plugin with CNDP <integration-k8s-dp>`.
of the "uds_path" attribute. The "unprivileged" flag is automatically configured if the "uds_path"
parameter is used. The sysctl param ``kernel.unprivileged_bpf_disabled`` should be 0 to perform
unprivileged BPF operations. Alternatively the "xsk_pin_path" can be used in combination with the
AF_XDP Device Plugin to support unprivileged Pods. For more details about the device plugin, please refer to
:ref:`Integration of the K8s device plugin with CNDP <integration-k8s-dp>`. Alternatively

Running the Application
-----------------------
Expand Down
1 change: 0 additions & 1 deletion lib/usr/app/jcfg/jcfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ typedef struct jcfg_lport {
#define JCFG_LPORT_BUSY_POLLING_NAME "busy_polling"
#define JCFG_LPORT_BUSY_TIMEOUT_NAME "busy_timeout"
#define JCFG_LPORT_BUSY_BUDGET_NAME "busy_budget"
#define JCFG_LPORT_UNPRIVILEGED_NAME "unprivileged"
#define JCFG_PINNED_XSK_MAP_NAME "xsk_pin_path"
#define JCFG_LPORT_FORCE_WAKEUP_NAME "force_wakeup"
#define JCFG_LPORT_SKB_MODE_NAME "skb_mode"
Expand Down
11 changes: 6 additions & 5 deletions tools/jsonc_gen_lport_groups.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ function build_netdevs_by_node
local node
local dev

for dev in ${CNDP_DEVICES[@]}; do
node=$(cat /sys/class/net/$dev/device/numa_node 2>/dev/null || echo 0)
netdevs_by_node[$node]="${netdevs_by_node[$node]} $dev"
for dev in "${CNDP_DEVICES[@]}"; do
node=$(cat /sys/class/net/"$dev"/device/numa_node 2>/dev/null || echo 0)
netdevs_by_node[node]="${netdevs_by_node[$node]} $dev"
done
}

Expand All @@ -77,12 +77,13 @@ function build_netdevs_by_node
#
function build_lcores_by_node
{
local lines=$(lscpu | awk -F: '/NUMA node[0-9] CPU\(s\):/{print $2}' | xargs)
local lines
lines=$(lscpu | awk -F: '/NUMA node[0-9] CPU\(s\):/{print $2}' | xargs)
local line
local i

i=0
for line in ${lines[@]}; do
for line in "${lines[@]}"; do
lcores_by_node[i]=$line
i=$((i+1))
done
Expand Down

0 comments on commit 6fe92d1

Please sign in to comment.