0012-scripts-replace-nproc-with-cross-platform-implementa.patch 937 B

123456789101112131415161718192021222324252627
  1. From 0e5f9f0a7f0ef1947984cd82ade9dbc14ba2c80d Mon Sep 17 00:00:00 2001
  2. From: Ioana Ciornei <[email protected]>
  3. Date: Wed, 25 Oct 2017 12:48:04 +0000
  4. Subject: [PATCH 12/12] scripts: replace 'nproc' with cross-platform
  5. implementation
  6. Signed-off-by: Ioana Ciornei <[email protected]>
  7. ---
  8. scripts/ls-main | 2 +-
  9. 1 file changed, 1 insertion(+), 1 deletion(-)
  10. diff --git a/scripts/ls-main b/scripts/ls-main
  11. index 526c052..7d127f6 100755
  12. --- a/scripts/ls-main
  13. +++ b/scripts/ls-main
  14. @@ -807,7 +807,7 @@ process_addni() {
  15. # if no --num-queues is specified then set it to number of cores
  16. num_queues_present=$(echo "$dpni_args" | grep -o "\-\-num-queues" || true)
  17. if [[ -z "$num_queues_present" ]]; then
  18. - dpni_args=$dpni_args" --num-queues="$(nproc)
  19. + dpni_args=$dpni_args" --num-queues="$(grep -c ^processor /proc/cpuinfo)
  20. fi
  21. # Check if --no-link the endpoint have been provided otherwise display the usage
  22. --
  23. 2.14.1