On Thu, Mar 18, 2021 at 2:01 AM Narcisa Ana Maria Vasile
<navas...@linux.microsoft.com> wrote:
> diff --git a/lib/librte_eal/common/eal_common_thread.c 
> b/lib/librte_eal/common/eal_common_thread.c
> index 73a055902..5219e783e 100644
> --- a/lib/librte_eal/common/eal_common_thread.c
> +++ b/lib/librte_eal/common/eal_common_thread.c
> @@ -84,7 +84,7 @@ thread_update_affinity(rte_cpuset_t *cpusetp)
>  }
>
>  int
> -rte_thread_set_affinity(rte_cpuset_t *cpusetp)
> +rte_thread_self_set_affinity(rte_cpuset_t *cpusetp)
>  {
>         if (pthread_setaffinity_np(pthread_self(), sizeof(rte_cpuset_t),
>                         cpusetp) != 0) {

[snip]

> diff --git a/lib/librte_eal/include/rte_thread.h 
> b/lib/librte_eal/include/rte_thread.h
> index e640ea185..66b112bc4 100644
> --- a/lib/librte_eal/include/rte_thread.h
> +++ b/lib/librte_eal/include/rte_thread.h

[snip]

> +/**
> + * Set the affinity of thread 'thread_id' to the cpu set
> + * specified by 'cpuset'.
> + *
> + * @param thread_id
> + *    Id of the thread for which to set the affinity.
> + *
> + * @param cpuset_size
> + *
> + * @param cpuset
> + *   Pointer to CPU affinity to set.
> + *
> + * @return
> + *   On success, return 0.
> + *   On failure, return nonzero.
> + */
> +__rte_experimental
> +int rte_thread_set_affinity(rte_thread_t thread_id, size_t cpuset_size,
> +                           const rte_cpuset_t *cpuset);
> +

[snip]

> @@ -34,7 +353,7 @@ typedef struct eal_tls_key *rte_tls_key;
>   * @return
>   *   On success, return 0; otherwise return -1;
>   */
> -int rte_thread_set_affinity(rte_cpuset_t *cpusetp);
> +int rte_thread_self_set_affinity(rte_cpuset_t *cpusetp);
>
>  /**
>   * Get core affinity of the current thread.

rte_thread_*et_affinity() are stable.
This breaks the ABI (which is bad) and this API change was not
announced previously.

The ABI check will catch it for you if you stop at this patch (the
patch 3 actually makes the check go silent because of a wrong
version.map update with duplicate symbols).

$ DPDK_ABI_REF_VERSION=v21.02 ./devtools/test-meson-builds.sh
...
[2502/2502] Linking target drivers/librte_event_octeontx2.so.21.2
Error: ABI issue reported for 'abidiff --suppr
/home/dmarchan/dpdk/devtools/../devtools/libabigail.abignore
--no-added-syms --headers-dir1
/home/dmarchan/abi/v21.02/build-gcc-shared/usr/local/include
--headers-dir2 /home/dmarchan/builds/build-gcc-shared/install/usr/local/include
/home/dmarchan/abi/v21.02/build-gcc-shared/dump/librte_eal.dump
/home/dmarchan/builds/build-gcc-shared/install/dump/librte_eal.dump'
ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged
this as a potential issue).
ABIDIFF_ABI_INCOMPATIBLE_CHANGE, this change breaks the ABI.

$ abidiff --suppr
/home/dmarchan/dpdk/devtools/../devtools/libabigail.abignore
--no-added-syms --headers-dir1
/home/dmarchan/abi/v21.02/build-gcc-shared/usr/local/include
--headers-dir2 /home/dmarchan/builds/build-gcc-shared/install/usr/local/include
/home/dmarchan/abi/v21.02/build-gcc-shared/dump/librte_eal.dump
/home/dmarchan/builds/build-gcc-shared/install/dump/librte_eal.dump
Functions changes summary: 2 Removed, 0 Changed, 0 Added (6 filtered
out) functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
Variable symbols changes summary: 0 Removed, 0 Added variable symbol
not referenced by debug info

2 Removed functions:

  [D] 'function void rte_thread_get_affinity(rte_cpuset_t*)'
{rte_thread_get_affinity@@DPDK_21}
  [D] 'function int rte_thread_set_affinity(rte_cpuset_t*)'
{rte_thread_set_affinity@@DPDK_21}


-- 
David Marchand

Reply via email to