aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
authorHadi Rayan Al-Sandid <halsandi@cisco.com>2024-04-30 14:17:45 +0000
committerDamjan Marion <dmarion@0xa5.net>2024-05-06 11:52:35 +0000
commit4aecd4869c47c3561fb4acde4726a0a832798cff (patch)
treee3175fc1ebb25ffea8309ad5663231398e8f6572 /src/vppinfra
parentfb113ca560351f3e14d3569b902a522c5024c22f (diff)
vlib: revert automatic core pinning changes
This reverts commit 71c32a898941e32b5d4f865b50fbe775560c582d. Type: fix Reason for revert: vnet pinning is not considered in this patch. This causes keywords 'workers' and 'skip-cores' to be broken, as well as keyword 'main-core auto' introduced in this patch. If this patch is ever reconsidered, it must account for vnet pinning fix in commit https://gerrit.fd.io/r/c/vpp/+/40711. Change-Id: I1f3154a6c7e830b100f824375aa00e95b192f7f3 Signed-off-by: hsandid <halsandi@cisco.com>
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/unix-misc.c31
-rw-r--r--src/vppinfra/unix.h3
2 files changed, 0 insertions, 34 deletions
diff --git a/src/vppinfra/unix-misc.c b/src/vppinfra/unix-misc.c
index a72e55dd043..5008f82c493 100644
--- a/src/vppinfra/unix-misc.c
+++ b/src/vppinfra/unix-misc.c
@@ -49,7 +49,6 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <sys/syscall.h>
#include <sys/uio.h> /* writev */
#include <fcntl.h>
#include <stdio.h> /* for sprintf */
@@ -279,36 +278,6 @@ os_get_online_cpu_core_bitmap ()
}
__clib_export clib_bitmap_t *
-os_get_cpu_affinity_bitmap (int pid)
-{
-#if __linux
- int index, ret;
- cpu_set_t cpuset;
- uword *affinity_cpus;
-
- clib_bitmap_alloc (affinity_cpus, sizeof (cpu_set_t));
- clib_bitmap_zero (affinity_cpus);
-
- __CPU_ZERO_S (sizeof (cpu_set_t), &cpuset);
-
- ret = syscall (SYS_sched_getaffinity, 0, sizeof (cpu_set_t), &cpuset);
-
- if (ret < 0)
- {
- clib_bitmap_free (affinity_cpus);
- return 0;
- }
-
- for (index = 0; index < sizeof (cpu_set_t); index++)
- if (__CPU_ISSET_S (index, sizeof (cpu_set_t), &cpuset))
- clib_bitmap_set (affinity_cpus, index, 1);
- return affinity_cpus;
-#else
- return 0;
-#endif
-}
-
-__clib_export clib_bitmap_t *
os_get_online_cpu_node_bitmap ()
{
#if __linux__
diff --git a/src/vppinfra/unix.h b/src/vppinfra/unix.h
index abda21879f9..d0ddb93a46f 100644
--- a/src/vppinfra/unix.h
+++ b/src/vppinfra/unix.h
@@ -56,9 +56,6 @@ clib_error_t *unix_proc_file_contents (char *file, u8 ** result);
/* Retrieve bitmap of online cpu cures */
clib_bitmap_t *os_get_online_cpu_core_bitmap ();
-/* Retrieve bitmap of cpus vpp has affinity to */
-clib_bitmap_t *os_get_cpu_affinity_bitmap (int pid);
-
/* Retrieve bitmap of online cpu nodes (sockets) */
clib_bitmap_t *os_get_online_cpu_node_bitmap ();