eal: make lcore config private
The internal structure of lcore_config does not need to be part of visible API/ABI. Make it private to EAL. Rearrange the structure so it takes less memory (and cache footprint). Since we change the ABI, bump the library version. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
This commit is contained in:
parent
ab6ebd7020
commit
65661351ca
@ -23,10 +23,6 @@ Deprecation Notices
|
||||
* eal: The function ``rte_eal_remote_launch`` will return new error codes
|
||||
after read or write error on the pipe, instead of calling ``rte_panic``.
|
||||
|
||||
* eal: The ``lcore_config`` struct and global symbol will be made private to
|
||||
remove it from the externally visible ABI and allow it to be updated in the
|
||||
future.
|
||||
|
||||
* eal: both declaring and identifying devices will be streamlined in v18.11.
|
||||
New functions will appear to query a specific port from buses, classes of
|
||||
device and device drivers. Device declaration will be made coherent with the
|
||||
|
@ -283,6 +283,8 @@ API Changes
|
||||
Also, make sure to start the actual text at the margin.
|
||||
=========================================================
|
||||
|
||||
* eal: made the ``lcore_config`` struct and global symbol private.
|
||||
|
||||
* The network structure ``esp_tail`` has been prefixed by ``rte_``.
|
||||
|
||||
* The network definitions of PPPoE ethertypes have been prefixed by ``RTE_``.
|
||||
@ -372,7 +374,7 @@ The libraries prepended with a plus sign were incremented in this version.
|
||||
librte_compressdev.so.1
|
||||
librte_cryptodev.so.8
|
||||
librte_distributor.so.1
|
||||
librte_eal.so.11
|
||||
+ librte_eal.so.12
|
||||
librte_efd.so.1
|
||||
+ librte_ethdev.so.13
|
||||
+ librte_eventdev.so.8
|
||||
|
@ -15,6 +15,8 @@
|
||||
#include <rte_per_lcore.h>
|
||||
#include <rte_lcore.h>
|
||||
|
||||
#include "eal_private.h"
|
||||
|
||||
/*
|
||||
* Wait until a lcore finished its job.
|
||||
*/
|
||||
|
@ -10,6 +10,31 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include <rte_dev.h>
|
||||
#include <rte_lcore.h>
|
||||
|
||||
/**
|
||||
* Structure storing internal configuration (per-lcore)
|
||||
*/
|
||||
struct lcore_config {
|
||||
pthread_t thread_id; /**< pthread identifier */
|
||||
int pipe_master2slave[2]; /**< communication pipe with master */
|
||||
int pipe_slave2master[2]; /**< communication pipe with master */
|
||||
|
||||
lcore_function_t * volatile f; /**< function to call */
|
||||
void * volatile arg; /**< argument of function */
|
||||
volatile int ret; /**< return value of function */
|
||||
|
||||
volatile enum rte_lcore_state_t state; /**< lcore state */
|
||||
unsigned int socket_id; /**< physical socket id for this lcore */
|
||||
unsigned int core_id; /**< core number on socket for this lcore */
|
||||
int core_index; /**< relative index, starting from 0 */
|
||||
uint8_t core_role; /**< role of core eg: OFF, RTE, SERVICE */
|
||||
uint8_t detected; /**< true if lcore was detected */
|
||||
|
||||
rte_cpuset_t cpuset; /**< cpu set which the lcore affinity to */
|
||||
};
|
||||
|
||||
extern struct lcore_config lcore_config[RTE_MAX_LCORE];
|
||||
|
||||
/**
|
||||
* Initialize the memzone subsystem (private to eal).
|
||||
|
@ -22,30 +22,6 @@ extern "C" {
|
||||
|
||||
#define LCORE_ID_ANY UINT32_MAX /**< Any lcore. */
|
||||
|
||||
/**
|
||||
* Structure storing internal configuration (per-lcore)
|
||||
*/
|
||||
struct lcore_config {
|
||||
unsigned detected; /**< true if lcore was detected */
|
||||
pthread_t thread_id; /**< pthread identifier */
|
||||
int pipe_master2slave[2]; /**< communication pipe with master */
|
||||
int pipe_slave2master[2]; /**< communication pipe with master */
|
||||
lcore_function_t * volatile f; /**< function to call */
|
||||
void * volatile arg; /**< argument of function */
|
||||
volatile int ret; /**< return value of function */
|
||||
volatile enum rte_lcore_state_t state; /**< lcore state */
|
||||
unsigned socket_id; /**< physical socket id for this lcore */
|
||||
unsigned core_id; /**< core number on socket for this lcore */
|
||||
int core_index; /**< relative index, starting from 0 */
|
||||
rte_cpuset_t cpuset; /**< cpu set which the lcore affinity to */
|
||||
uint8_t core_role; /**< role of core eg: OFF, RTE, SERVICE */
|
||||
};
|
||||
|
||||
/**
|
||||
* Internal configuration (per-lcore)
|
||||
*/
|
||||
extern struct lcore_config lcore_config[RTE_MAX_LCORE];
|
||||
|
||||
RTE_DECLARE_PER_LCORE(unsigned, _lcore_id); /**< Per thread "lcore id". */
|
||||
RTE_DECLARE_PER_LCORE(rte_cpuset_t, _cpuset); /**< Per thread "cpuset". */
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include <rte_memory.h>
|
||||
#include <rte_malloc.h>
|
||||
|
||||
#include "eal_private.h"
|
||||
|
||||
#define RTE_SERVICE_NUM_MAX 64
|
||||
|
||||
#define SERVICE_F_REGISTERED (1 << 0)
|
||||
|
@ -22,7 +22,7 @@ LDLIBS += -lrte_kvargs
|
||||
|
||||
EXPORT_MAP := ../../rte_eal_version.map
|
||||
|
||||
LIBABIVER := 11
|
||||
LIBABIVER := 12
|
||||
|
||||
# specific to freebsd exec-env
|
||||
SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) := eal.c
|
||||
|
@ -10,7 +10,7 @@ ARCH_DIR ?= $(RTE_ARCH)
|
||||
EXPORT_MAP := ../../rte_eal_version.map
|
||||
VPATH += $(RTE_SDK)/lib/librte_eal/common/arch/$(ARCH_DIR)
|
||||
|
||||
LIBABIVER := 11
|
||||
LIBABIVER := 12
|
||||
|
||||
VPATH += $(RTE_SDK)/lib/librte_eal/common
|
||||
|
||||
|
@ -12,7 +12,7 @@ subdir('common') # defines common_sources, common_objs, etc.
|
||||
dpdk_conf.set('RTE_EXEC_ENV_' + exec_env.to_upper(), 1)
|
||||
subdir(exec_env + '/eal')
|
||||
|
||||
version = 11 # the version of the EAL API
|
||||
version = 12 # the version of the EAL API
|
||||
allow_experimental_apis = true
|
||||
deps += 'kvargs'
|
||||
if dpdk_conf.has('RTE_USE_LIBBSD')
|
||||
|
@ -4,7 +4,6 @@ DPDK_2.0 {
|
||||
__rte_panic;
|
||||
eal_parse_sysfs_value;
|
||||
eal_timer_source;
|
||||
lcore_config;
|
||||
per_lcore__lcore_id;
|
||||
per_lcore__rte_errno;
|
||||
rte_calloc;
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <rte_common.h>
|
||||
#include <eal_thread.h>
|
||||
|
||||
#include "eal_private.h"
|
||||
|
||||
RTE_DEFINE_PER_LCORE(unsigned int, _lcore_id) = LCORE_ID_ANY;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user