Skip to contentSkip to conversation

doc: change to diverse and inclusive language

RFC In review Stephen Hemminger 14 participants 186 messages Jun 4, 2020 – Sep 10, 2020 Page 2 of 2

Subsystems (3)
lore
Share & tools
lore
#71 lore raw

PATCH v3 27/27 vhost: rename SLAVE to CLIENT

In reply to Stephen Hemminger

The vhost is a client server architecture so replace the term slave with client.

---
 drivers/vdpa/ifc/ifcvf_vdpa.c          |  4 +-
 drivers/vdpa/mlx5/mlx5_vdpa.c          |  4 +-
 lib/librte_vhost/rte_vhost.h           | 16 ++---
 lib/librte_vhost/rte_vhost_version.map |  2 +-
 lib/librte_vhost/vhost.c               |  4 +-
 lib/librte_vhost/vhost.h               |  4 +-
 lib/librte_vhost/vhost_crypto.c        |  2 +-
 lib/librte_vhost/vhost_user.c          | 96 +++++++++++++-------------
 lib/librte_vhost/vhost_user.h          | 24 +++----
 9 files changed, 78 insertions(+), 78 deletions(-)
drivers/vdpa/ifc/ifcvf_vdpa.c +2 -2
index de54dc8aab6c..6c02b99f5e44 100644
@@ -1071,8 +1071,8 @@ ifcvf_get_vdpa_features(struct rte_vdpa_device *vdev, uint64_t *features)
 
 #define VDPA_SUPPORTED_PROTOCOL_FEATURES \
 		(1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK | \
-		 1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ | \
-		 1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD | \
+		 1ULL << VHOST_USER_PROTOCOL_F_CLIENT_REQ | \
+		 1ULL << VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD | \
 		 1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER | \
 		 1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD)
 static int
drivers/vdpa/mlx5/mlx5_vdpa.c +2 -2
index dbd36ab0c95e..8fd2de9ba98f 100644
@@ -34,8 +34,8 @@
 			    (1ULL << VIRTIO_NET_F_MTU))
 
 #define MLX5_VDPA_PROTOCOL_FEATURES \
-			    ((1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ) | \
-			     (1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) | \
+			    ((1ULL << VHOST_USER_PROTOCOL_F_CLIENT_REQ) | \
+			     (1ULL << VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD) | \
 			     (1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \
 			     (1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD) | \
 			     (1ULL << VHOST_USER_PROTOCOL_F_MQ) | \
lib/librte_vhost/rte_vhost.h +8 -8
index 8a5c332c83ac..b952e6d47021 100644
@@ -74,8 +74,8 @@ extern "C" {
 #define VHOST_USER_PROTOCOL_F_NET_MTU	4
 #endif
 
-#ifndef VHOST_USER_PROTOCOL_F_SLAVE_REQ
-#define VHOST_USER_PROTOCOL_F_SLAVE_REQ	5
+#ifndef VHOST_USER_PROTOCOL_F_CLIENT_REQ
+#define VHOST_USER_PROTOCOL_F_CLIENT_REQ	5
 #endif
 
 #ifndef VHOST_USER_PROTOCOL_F_CRYPTO_SESSION
@@ -90,8 +90,8 @@ extern "C" {
 #define VHOST_USER_PROTOCOL_F_CONFIG 9
 #endif
 
-#ifndef VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD
-#define VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD 10
+#ifndef VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD
+#define VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD 10
 #endif
 
 #ifndef VHOST_USER_PROTOCOL_F_HOST_NOTIFIER
@@ -249,9 +249,9 @@ typedef enum rte_vhost_msg_result (*rte_vhost_msg_handle)(int vid, void *msg);
  * Optional vhost user message handlers.
  */
 struct rte_vhost_user_extern_ops {
-	/* Called prior to the master message handling. */
+	/* Called prior to the server message handling. */
 	rte_vhost_msg_handle pre_msg_handle;
-	/* Called after the master message handling. */
+	/* Called after the server message handling. */
 	rte_vhost_msg_handle post_msg_handle;
 };
 
@@ -1008,13 +1008,13 @@ rte_vhost_get_vdpa_device(int vid);
  * @param vid
  *  vhost device ID
  * @param need_reply
- *  wait for the master response the status of this operation
+ *  wait for the server response the status of this operation
  * @return
  *  0 on success, < 0 on failure
  */
 __rte_experimental
 int
-rte_vhost_slave_config_change(int vid, bool need_reply);
+rte_vhost_client_config_change(int vid, bool need_reply);
 
 #ifdef __cplusplus
 }
lib/librte_vhost/rte_vhost_version.map +1 -1
index 86784405a1e8..74973ce9b8ec 100644
@@ -65,7 +65,7 @@ EXPERIMENTAL {
 	rte_vhost_clr_inflight_desc_packed;
 	rte_vhost_get_vhost_ring_inflight;
 	rte_vhost_get_vring_base_from_inflight;
-	rte_vhost_slave_config_change;
+	rte_vhost_client_config_change;
 	rte_vdpa_find_device_by_name;
 	rte_vdpa_get_rte_device;
 	rte_vdpa_get_queue_num;
lib/librte_vhost/vhost.c +2 -2
index 0d822d6a3f48..3d111d714bf1 100644
@@ -632,9 +632,9 @@ vhost_new_device(void)
 	vhost_devices[i] = dev;
 	dev->vid = i;
 	dev->flags = VIRTIO_DEV_BUILTIN_VIRTIO_NET;
-	dev->slave_req_fd = -1;
+	dev->client_req_fd = -1;
 	dev->postcopy_ufd = -1;
-	rte_spinlock_init(&dev->slave_req_lock);
+	rte_spinlock_init(&dev->client_req_lock);
 
 	return i;
 }
lib/librte_vhost/vhost.h +2 -2
index 0344636997a6..a0902d1535c4 100644
@@ -356,8 +356,8 @@ struct virtio_net {
 	uint32_t		max_guest_pages;
 	struct guest_page       *guest_pages;
 
-	int			slave_req_fd;
-	rte_spinlock_t		slave_req_lock;
+	int			client_req_fd;
+	rte_spinlock_t		client_req_lock;
 
 	int			postcopy_ufd;
 	int			postcopy_listening;
lib/librte_vhost/vhost_crypto.c +1 -1
index 0f9df4059d0b..8e4fc1bf015a 100644
@@ -460,7 +460,7 @@ vhost_crypto_msg_post_handler(int vid, void *msg)
 		return RTE_VHOST_MSG_RESULT_ERR;
 	}
 
-	switch (vmsg->request.master) {
+	switch (vmsg->request.server) {
 	case VHOST_USER_CRYPTO_CREATE_SESS:
 		vhost_crypto_create_sess(vcrypto,
 				&vmsg->payload.crypto_session);
lib/librte_vhost/vhost_user.c +48 -48

304 lines not on this page · raw message

lib/librte_vhost/vhost_user.h +12 -12
index 1f65efa4a935..924da0dc17dd 100644
@@ -19,9 +19,9 @@
 					 (1ULL << VHOST_USER_PROTOCOL_F_RARP) | \
 					 (1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK) | \
 					 (1ULL << VHOST_USER_PROTOCOL_F_NET_MTU) | \
-					 (1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ) | \
+					 (1ULL << VHOST_USER_PROTOCOL_F_CLIENT_REQ) | \
 					 (1ULL << VHOST_USER_PROTOCOL_F_CRYPTO_SESSION) | \
-					 (1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) | \
+					 (1ULL << VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD) | \
 					 (1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \
 					 (1ULL << VHOST_USER_PROTOCOL_F_PAGEFAULT))
 
@@ -47,7 +47,7 @@ typedef enum VhostUserRequest {
 	VHOST_USER_SET_VRING_ENABLE = 18,
 	VHOST_USER_SEND_RARP = 19,
 	VHOST_USER_NET_SET_MTU = 20,
-	VHOST_USER_SET_SLAVE_REQ_FD = 21,
+	VHOST_USER_SET_CLIENT_REQ_FD = 21,
 	VHOST_USER_IOTLB_MSG = 22,
 	VHOST_USER_CRYPTO_CREATE_SESS = 26,
 	VHOST_USER_CRYPTO_CLOSE_SESS = 27,
@@ -59,13 +59,13 @@ typedef enum VhostUserRequest {
 	VHOST_USER_MAX = 33
 } VhostUserRequest;
 
-typedef enum VhostUserSlaveRequest {
-	VHOST_USER_SLAVE_NONE = 0,
-	VHOST_USER_SLAVE_IOTLB_MSG = 1,
-	VHOST_USER_SLAVE_CONFIG_CHANGE_MSG = 2,
-	VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG = 3,
-	VHOST_USER_SLAVE_MAX
-} VhostUserSlaveRequest;
+typedef enum VhostUserClientRequest {
+	VHOST_USER_CLIENT_NONE = 0,
+	VHOST_USER_CLIENT_IOTLB_MSG = 1,
+	VHOST_USER_CLIENT_CONFIG_CHANGE_MSG = 2,
+	VHOST_USER_CLIENT_VRING_HOST_NOTIFIER_MSG = 3,
+	VHOST_USER_CLIENT_MAX
+} VhostUserClientRequest;
 
 typedef struct VhostUserMemoryRegion {
 	uint64_t guest_phys_addr;
@@ -124,8 +124,8 @@ typedef struct VhostUserInflight {
 
 typedef struct VhostUserMsg {
 	union {
-		uint32_t master; /* a VhostUserRequest value */
-		uint32_t slave;  /* a VhostUserSlaveRequest value*/
+		uint32_t server; /* a VhostUserRequest value */
+		uint32_t client;  /* a VhostUserClientRequest value*/
 	} request;
 
 #define VHOST_USER_VERSION_MASK     0x3
Signature · 1 line
2.26.2
#72 lore raw

v4 cover Replace references to master and slave

In reply to Stephen Hemminger

This set of patches changes the API and conventions around referring to DPDK lcores. The first patch changes rte_get_master_lcore_id and related calls. The rest fix the DPDK to use the new naming.

Buried in the documentation set are a couple of patches where we were using incorrect naming around primary/secondary process.

This will could/should be flagged as an API policy violation since new API is jumping the queue of EXPERIMENTAL. But we can vote on the exception.

The one area left to be fixed is the bonding device.

v4
- fix checkpatch warnings
note: this patchset will cause some false positives
v3
- modify vhost to replace slave with client
- modify memif to replace slave with client
- fix variable names s2m becomes i2w etc.

Stephen Hemminger (27):
eal: rename terms used for DPDK lcores
kni: fix reference to master/slave process
bbdev: rename master to initial lcore
librte_power: change reference to rte_master_lcore
drivers: replace master/slave terminology examples/distributor: rename master to initial examples/bond: replace references to master lcore examples/ethtool-app: replace references to slave with worker examples/ip_pipeline: replace references to master_lcore examples/qos_{meter/sched}: replace references to master lcore examples/l3fwd: replace references to master lcore examples/l2fwd: replace references to master lcore examples/multi_process: replace references to master lcore examples/performance-thread: replace reference to master lcore examples/ptpclient: replace references to master lcore examples/ipcsec-secgw: replace references to master lcore
examples: replace reference to master lcore app/test-pmd: change references to master/slave
test-eventdev: replace references to slave with worker lcores app/test: replace refernces to master/slave
doc: fix incorrect reference to master process
doc: update references to master/slave lcore in documentation app/pdump: replace references to master/slave lcore app/test-XXX: replace reference to master/slave
eal: mark old naming as deprecated
memif: replace master/slave with server/client
vhost: rename SLAVE to CLIENT

 app/pdump/main.c                              |   2 +-
 app/test-acl/main.c                           |   2 +-
 app/test-bbdev/test_bbdev_perf.c              |  16 +--
 app/test-compress-perf/main.c                 |   8 +-
 app/test-crypto-perf/main.c                   |  14 +-
 app/test-eventdev/evt_options.c               |   2 +-
 app/test-eventdev/test_order_common.c         |  12 +-
 app/test-eventdev/test_perf_common.c          |  16 +--
 app/test-eventdev/test_pipeline_common.c      |   8 +-
 app/test-flow-perf/main.c                     |   2 +-
 app/test-pipeline/main.c                      |   4 +-
 app/test-pmd/config.c                         |   4 +-
 app/test-pmd/parameters.c                     |   2 +-
 app/test-pmd/softnicfwd.c                     |   2 +-
 app/test-pmd/testpmd.c                        |   4 +-
 app/test-sad/main.c                           |   4 +-
 app/test/autotest_test_funcs.py               |   2 +-
 app/test/test.c                               |   2 +-
 app/test/test_atomic.c                        |  26 ++--
 app/test/test_barrier.c                       |   2 +-
 app/test/test_cryptodev.c                     |  16 +--
 app/test/test_distributor.c                   |   8 +-
 app/test/test_distributor_perf.c              |  11 +-
 app/test/test_eal_flags.c                     |  32 ++---
 app/test/test_efd.c                           |   2 +-
 app/test/test_efd_perf.c                      |   2 +-
 app/test/test_func_reentrancy.c               |  25 ++--
 app/test/test_hash_multiwriter.c              |   4 +-
 app/test/test_hash_readwrite.c                |  38 +++---
 app/test/test_kni.c                           |  16 +--
 app/test/test_malloc.c                        |  12 +-
 app/test/test_mbuf.c                          |  36 ++---
 app/test/test_mcslock.c                       |  28 ++--
 app/test/test_mempool_perf.c                  |  10 +-
 app/test/test_mp_secondary.c                  |   2 +-
 app/test/test_pdump.c                         |   2 +-
 app/test/test_per_lcore.c                     |  14 +-
 app/test/test_pmd_perf.c                      |  20 +--
 app/test/test_rcu_qsbr.c                      |   2 +-
 app/test/test_rcu_qsbr_perf.c                 |   2 +-
 app/test/test_ring_perf.c                     |  14 +-
 app/test/test_ring_stress_impl.h              |  10 +-
 app/test/test_rwlock.c                        |  28 ++--
 app/test/test_service_cores.c                 |  10 +-
 app/test/test_spinlock.c                      |  34 ++---
 app/test/test_stack.c                         |   2 +-
 app/test/test_stack_perf.c                    |   6 +-
 app/test/test_ticketlock.c                    |  36 ++---
 app/test/test_timer.c                         | 107 ++++++++-------
 app/test/test_timer_racecond.c                |  27 ++--
 app/test/test_timer_secondary.c               |   2 +-
 app/test/test_trace_perf.c                    |   4 +-
 doc/guides/contributing/coding_style.rst      |   2 +-
 doc/guides/faq/faq.rst                        |   6 +-
 doc/guides/howto/debug_troubleshoot.rst       |   2 +-
 doc/guides/linux_gsg/eal_args.include.rst     |   4 +-
 doc/guides/nics/bnxt.rst                      |   2 +-
 doc/guides/nics/fail_safe.rst                 |   3 -
 doc/guides/nics/memif.rst                     |  82 +++++------
 .../prog_guide/env_abstraction_layer.rst      |   6 +-
 .../prog_guide/event_ethernet_rx_adapter.rst  |   2 +-
 doc/guides/prog_guide/glossary.rst            |   8 +-
 .../thread_safety_dpdk_functions.rst          |   4 +-
 doc/guides/rel_notes/release_20_08.rst        |   7 +-
 doc/guides/sample_app_ug/bbdev_app.rst        |   2 +-
 doc/guides/sample_app_ug/ethtool.rst          |   4 +-
 doc/guides/sample_app_ug/hello_world.rst      |   8 +-
 doc/guides/sample_app_ug/ioat.rst             |  12 +-
 doc/guides/sample_app_ug/ip_pipeline.rst      |   4 +-
 doc/guides/sample_app_ug/keep_alive.rst       |   2 +-
 doc/guides/sample_app_ug/l2_forward_event.rst |   4 +-
 .../sample_app_ug/l2_forward_real_virtual.rst |   4 +-
 doc/guides/sample_app_ug/l3_forward_graph.rst |   6 +-
 .../sample_app_ug/l3_forward_power_man.rst    |   2 +-
 doc/guides/sample_app_ug/link_status_intr.rst |   4 +-
 doc/guides/sample_app_ug/multi_process.rst    |   6 +-
 doc/guides/sample_app_ug/packet_ordering.rst  |   8 +-
 .../sample_app_ug/performance_thread.rst      |   6 +-
 doc/guides/sample_app_ug/qos_scheduler.rst    |   4 +-
 doc/guides/sample_app_ug/timer.rst            |  13 +-
 doc/guides/testpmd_app_ug/run_app.rst         |   2 +-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst   |   2 +-
 drivers/bus/dpaa/dpaa_bus.c                   |   2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.c      |   6 +-
 drivers/net/bnxt/bnxt_ring.c                  |   4 +-
 drivers/net/memif/memif.h                     |  40 +++---
 drivers/net/memif/memif_socket.c              |  54 ++++----
 drivers/net/memif/memif_socket.h              |   5 +-
 drivers/net/memif/rte_eth_memif.c             | 128 +++++++++---------
 drivers/net/memif/rte_eth_memif.h             |  20 +--
 drivers/net/mvpp2/mrvl_ethdev.c               |   6 +-
 drivers/net/qede/base/bcm_osal.c              |   4 +-
 drivers/net/softnic/rte_eth_softnic_thread.c  |   4 +-
 drivers/vdpa/ifc/ifcvf_vdpa.c                 |   4 +-
 drivers/vdpa/mlx5/mlx5_vdpa.c                 |   4 +-
 examples/bbdev_app/main.c                     |  14 +-
 examples/bond/main.c                          |   8 +-
 examples/distributor/main.c                   |  10 +-
 examples/ethtool/ethtool-app/main.c           |  10 +-
 examples/eventdev_pipeline/main.c             |   2 +-
 examples/flow_classify/flow_classify.c        |   2 +-
 examples/helloworld/main.c                    |   6 +-
 examples/ioat/ioatfwd.c                       |   6 +-
 examples/ip_fragmentation/main.c              |   4 +-
 examples/ip_pipeline/main.c                   |   2 +-
 examples/ip_pipeline/thread.c                 |  16 +--
 examples/ip_reassembly/main.c                 |   4 +-
 examples/ipsec-secgw/event_helper.c           |   6 +-
 examples/ipsec-secgw/ipsec-secgw.c            |   4 +-
 examples/ipv4_multicast/main.c                |   4 +-
 examples/kni/main.c                           |   7 +-
 examples/l2fwd-cat/l2fwd-cat.c                |   2 +-
 examples/l2fwd-crypto/main.c                  |   8 +-
 examples/l2fwd-event/l2fwd_event_generic.c    |   2 +-
 .../l2fwd-event/l2fwd_event_internal_port.c   |   2 +-
 examples/l2fwd-event/l2fwd_poll.c             |   2 +-
 examples/l2fwd-event/main.c                   |   2 +-
 examples/l2fwd-jobstats/main.c                |   4 +-
 examples/l2fwd-keepalive/main.c               |   6 +-
 examples/l2fwd/main.c                         |   8 +-
 examples/l3fwd-acl/main.c                     |   4 +-
 examples/l3fwd-graph/main.c                   |  14 +-
 examples/l3fwd-power/main.c                   |  20 +--
 examples/l3fwd/main.c                         |   2 +-
 examples/link_status_interrupt/main.c         |   8 +-
 .../client_server_mp/mp_server/main.c         |  10 +-
 examples/multi_process/simple_mp/main.c       |   6 +-
 examples/multi_process/symmetric_mp/main.c    |   2 +-
 examples/ntb/ntb_fwd.c                        |  14 +-
 examples/packet_ordering/main.c               |  22 +--
 .../performance-thread/l3fwd-thread/main.c    |  12 +-
 .../performance-thread/pthread_shim/main.c    |   4 +-
 examples/ptpclient/ptpclient.c                |   2 +-
 examples/qos_meter/main.c                     |   4 +-
 examples/qos_sched/args.c                     |  22 +--
 examples/qos_sched/cmdline.c                  |   2 +-
 examples/qos_sched/main.c                     |   2 +-
 examples/rxtx_callbacks/main.c                |   2 +-
 examples/server_node_efd/server/main.c        |  10 +-
 examples/skeleton/basicfwd.c                  |   2 +-
 examples/tep_termination/main.c               |  12 +-
 examples/timer/main.c                         |   8 +-
 examples/vhost/main.c                         |  10 +-
 examples/vmdq/main.c                          |   4 +-
 examples/vmdq_dcb/main.c                      |   6 +-
 lib/librte_eal/common/eal_common_launch.c     |  36 ++---
 lib/librte_eal/common/eal_common_lcore.c      |  11 +-
 lib/librte_eal/common/eal_common_options.c    |  62 ++++-----
 lib/librte_eal/common/eal_options.h           |   4 +-
 lib/librte_eal/common/eal_private.h           |   6 +-
 lib/librte_eal/common/eal_thread.h            |   6 +-
 lib/librte_eal/common/rte_random.c            |   2 +-
 lib/librte_eal/common/rte_service.c           |   2 +-
 lib/librte_eal/freebsd/eal.c                  |  24 ++--
 lib/librte_eal/freebsd/eal_thread.c           |  34 ++---
 lib/librte_eal/include/rte_eal.h              |   4 +-
 lib/librte_eal/include/rte_eal_trace.h        |   4 +-
 lib/librte_eal/include/rte_launch.h           |  62 +++++----
 lib/librte_eal/include/rte_lcore.h            |  31 ++++-
 lib/librte_eal/linux/eal.c                    |  24 ++--
 lib/librte_eal/linux/eal_memory.c             |  10 +-
 lib/librte_eal/linux/eal_thread.c             |  34 ++---
 lib/librte_eal/rte_eal_version.map            |   1 +
 lib/librte_eal/windows/eal.c                  |  14 +-
 lib/librte_eal/windows/eal_thread.c           |  32 ++---
 lib/librte_kni/rte_kni.h                      |   2 +-
 lib/librte_power/rte_power_empty_poll.c       |   2 +-
 lib/librte_vhost/rte_vhost.h                  |  16 +--
 lib/librte_vhost/rte_vhost_version.map        |   2 +-
 lib/librte_vhost/vhost.c                      |   4 +-
 lib/librte_vhost/vhost.h                      |   4 +-
 lib/librte_vhost/vhost_crypto.c               |   2 +-
 lib/librte_vhost/vhost_user.c                 |  96 ++++++-------
 lib/librte_vhost/vhost_user.h                 |  41 +++---
 174 files changed, 1074 insertions(+), 1041 deletions(-)
Signature · 1 line
2.26.2
#73 lore raw

PATCH v4 1/27 eal: rename terms used for DPDK lcores

Replace the old use of master/slave lcore with more inclusive name of initial/secondary lcore. The old visible API will stay for now.

Change master2slave to new init2worker and vice-versa.

This patch breaks the expected practice for new API's. The new rte_get_initial_lcore() will not go through the standard experimental API phase; there is no functional difference from the previous name.

---
 doc/guides/nics/memif.rst                  |  4 +-
 lib/librte_eal/common/eal_common_launch.c  | 36 ++++++-------
 lib/librte_eal/common/eal_common_lcore.c   | 11 ++--
 lib/librte_eal/common/eal_common_options.c | 62 +++++++++++-----------
 lib/librte_eal/common/eal_options.h        |  4 +-
 lib/librte_eal/common/eal_private.h        |  6 +--
 lib/librte_eal/common/eal_thread.h         |  6 +--
 lib/librte_eal/common/rte_random.c         |  2 +-
 lib/librte_eal/common/rte_service.c        |  2 +-
 lib/librte_eal/freebsd/eal.c               | 24 ++++-----
 lib/librte_eal/freebsd/eal_thread.c        | 34 ++++++------
 lib/librte_eal/include/rte_eal.h           |  4 +-
 lib/librte_eal/include/rte_eal_trace.h     |  4 +-
 lib/librte_eal/include/rte_launch.h        | 62 ++++++++++++----------
 lib/librte_eal/include/rte_lcore.h         | 29 +++++++---
 lib/librte_eal/linux/eal.c                 | 24 ++++-----
 lib/librte_eal/linux/eal_memory.c          | 10 ++--
 lib/librte_eal/linux/eal_thread.c          | 34 ++++++------
 lib/librte_eal/rte_eal_version.map         |  1 +
 lib/librte_eal/windows/eal.c               | 14 ++---
 lib/librte_eal/windows/eal_thread.c        | 32 +++++------
 21 files changed, 216 insertions(+), 189 deletions(-)
doc/guides/nics/memif.rst +2 -2
index ddeebed25ccd..9c67d7141cbe 100644
@@ -106,13 +106,13 @@ region n (no-zero-copy):
 +-----------------------+-------------------------------------------------------------------------+
 | Rings                 | Buffers                                                                 |
 +-----------+-----------+-----------------+---+---------------------------------------------------+
-| S2M rings | M2S rings | packet buffer 0 | . | pb ((1 << pmd->run.log2_ring_size)*(s2m + m2s))-1 |
+| S2M rings | M2S rings | packet buffer 0 | . | pb ((1 << pmd->run.log2_ring_size)*(w2i + i2w))-1 |
 +-----------+-----------+-----------------+---+---------------------------------------------------+
 
 S2M OR M2S Rings:
 
 +--------+--------+-----------------------+
-| ring 0 | ring 1 | ring num_s2m_rings - 1|
+| ring 0 | ring 1 | ring num_w2i_rings - 1|
 +--------+--------+-----------------------+
 
 ring 0:
lib/librte_eal/common/eal_common_launch.c +18 -18
index cf52d717f68e..43a0af196db2 100644
@@ -21,55 +21,55 @@
  * Wait until a lcore finished its job.
  */
 int
-rte_eal_wait_lcore(unsigned slave_id)
+rte_eal_wait_lcore(unsigned worker_id)
 {
-	if (lcore_config[slave_id].state == WAIT)
+	if (lcore_config[worker_id].state == WAIT)
 		return 0;
 
-	while (lcore_config[slave_id].state != WAIT &&
-	       lcore_config[slave_id].state != FINISHED)
+	while (lcore_config[worker_id].state != WAIT &&
+	       lcore_config[worker_id].state != FINISHED)
 		rte_pause();
 
 	rte_rmb();
 
 	/* we are in finished state, go to wait state */
-	lcore_config[slave_id].state = WAIT;
-	return lcore_config[slave_id].ret;
+	lcore_config[worker_id].state = WAIT;
+	return lcore_config[worker_id].ret;
 }
 
 /*
- * Check that every SLAVE lcores are in WAIT state, then call
- * rte_eal_remote_launch() for all of them. If call_master is true
- * (set to CALL_MASTER), also call the function on the master lcore.
+ * Check that every WORKER lcores are in WAIT state, then call
+ * rte_eal_remote_launch() for all of them. If call_initial is true
+ * (set to CALL_INITIAL), also call the function on the initial lcore.
  */
 int
 rte_eal_mp_remote_launch(int (*f)(void *), void *arg,
-			 enum rte_rmt_call_master_t call_master)
+			 enum rte_rmt_call_initial_t call_initial)
 {
 	int lcore_id;
-	int master = rte_get_master_lcore();
+	int initial = rte_get_initial_lcore();
 
 	/* check state of lcores */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (lcore_config[lcore_id].state != WAIT)
 			return -EBUSY;
 	}
 
 	/* send messages to cores */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		rte_eal_remote_launch(f, arg, lcore_id);
 	}
 
-	if (call_master == CALL_MASTER) {
-		lcore_config[master].ret = f(arg);
-		lcore_config[master].state = FINISHED;
+	if (call_initial == CALL_INITIAL) {
+		lcore_config[initial].ret = f(arg);
+		lcore_config[initial].state = FINISHED;
 	}
 
 	return 0;
 }
 
 /*
- * Return the state of the lcore identified by slave_id.
+ * Return the state of the lcore identified by worker_id.
  */
 enum rte_lcore_state_t
 rte_eal_get_lcore_state(unsigned lcore_id)
@@ -86,7 +86,7 @@ rte_eal_mp_wait_lcore(void)
 {
 	unsigned lcore_id;
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		rte_eal_wait_lcore(lcore_id);
 	}
 }
lib/librte_eal/common/eal_common_lcore.c +8 -3
index 5404922a87d2..a8c8b7206992 100644
@@ -16,9 +16,14 @@
 #include "eal_private.h"
 #include "eal_thread.h"
 
+unsigned int rte_get_initial_lcore(void)
+{
+	return rte_eal_get_configuration()->initial_lcore;
+}
+
 unsigned int rte_get_master_lcore(void)
 {
-	return rte_eal_get_configuration()->master_lcore;
+	return rte_eal_get_configuration()->initial_lcore;
 }
 
 unsigned int rte_lcore_count(void)
@@ -72,7 +77,7 @@ int rte_lcore_is_enabled(unsigned int lcore_id)
 	return cfg->lcore_role[lcore_id] == ROLE_RTE;
 }
 
-unsigned int rte_get_next_lcore(unsigned int i, int skip_master, int wrap)
+unsigned int rte_get_next_lcore(unsigned int i, int skip_initial, int wrap)
 {
 	i++;
 	if (wrap)
@@ -80,7 +85,7 @@ unsigned int rte_get_next_lcore(unsigned int i, int skip_master, int wrap)
 
 	while (i < RTE_MAX_LCORE) {
 		if (!rte_lcore_is_enabled(i) ||
-		    (skip_master && (i == rte_get_master_lcore()))) {
+		    (skip_initial && (i == rte_get_initial_lcore()))) {
 			i++;
 			if (wrap)
 				i %= RTE_MAX_LCORE;
lib/librte_eal/common/eal_common_options.c +31 -31

140 lines not on this page · raw message

lib/librte_eal/common/eal_options.h +2 -2
index 18e6da9ab37b..0ffe1a5ec0a3 100644
@@ -43,8 +43,8 @@ enum {
 	OPT_TRACE_BUF_SIZE_NUM,
 #define OPT_TRACE_MODE        "trace-mode"
 	OPT_TRACE_MODE_NUM,
-#define OPT_MASTER_LCORE      "master-lcore"
-	OPT_MASTER_LCORE_NUM,
+#define OPT_INITIAL_LCORE     "initial-lcore"
+	OPT_INITIAL_LCORE_NUM,
 #define OPT_MBUF_POOL_OPS_NAME "mbuf-pool-ops-name"
 	OPT_MBUF_POOL_OPS_NAME_NUM,
 #define OPT_PROC_TYPE         "proc-type"
lib/librte_eal/common/eal_private.h +3 -3
index 46bcae930590..9ef057d9b0f3 100644
@@ -20,8 +20,8 @@
  */
 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 */
+	int pipe_init2worker[2];  /**< communication pipe with initial core */
+	int pipe_worker2init[2];  /**< communication pipe with initial core */
 
 	lcore_function_t * volatile f; /**< function to call */
 	void * volatile arg;       /**< argument of function */
@@ -42,7 +42,7 @@ extern struct lcore_config lcore_config[RTE_MAX_LCORE];
  * The global RTE configuration structure.
  */
 struct rte_config {
-	uint32_t master_lcore;       /**< Id of the master lcore */
+	uint32_t initial_lcore;       /**< Id of the initial lcore */
 	uint32_t lcore_count;        /**< Number of available logical cores. */
 	uint32_t numa_node_count;    /**< Number of detected NUMA nodes. */
 	uint32_t numa_nodes[RTE_MAX_NUMA_NODES]; /**< List of detected NUMA nodes. */
lib/librte_eal/common/eal_thread.h +3 -3
index b40ed249edab..35301d852bc2 100644
@@ -16,12 +16,12 @@
 __rte_noreturn void *eal_thread_loop(void *arg);
 
 /**
- * Init per-lcore info for master thread
+ * Init per-lcore info for initial thread
  *
  * @param lcore_id
- *   identifier of master lcore
+ *   identifier of initial lcore
  */
-void eal_thread_init_master(unsigned lcore_id);
+void eal_thread_initial_lcore(unsigned lcore_id);
 
 /**
  * Get the NUMA socket id from cpu id.
lib/librte_eal/common/rte_random.c +1 -1
index b7a089ac4fe0..6bae53bdf659 100644
@@ -122,7 +122,7 @@ struct rte_rand_state *__rte_rand_get_state(void)
 	lcore_id = rte_lcore_id();
 
 	if (unlikely(lcore_id == LCORE_ID_ANY))
-		lcore_id = rte_get_master_lcore();
+		lcore_id = rte_get_initial_lcore();
 
 	return &rand_states[lcore_id];
 }
lib/librte_eal/common/rte_service.c +1 -1
index 6123a2124d33..6a80b1675559 100644
@@ -106,7 +106,7 @@ rte_service_init(void)
 	struct rte_config *cfg = rte_eal_get_configuration();
 	for (i = 0; i < RTE_MAX_LCORE; i++) {
 		if (lcore_config[i].core_role == ROLE_SERVICE) {
-			if ((unsigned int)i == cfg->master_lcore)
+			if ((unsigned int)i == cfg->initial_lcore)
 				continue;
 			rte_service_lcore_add(i);
 			count++;
lib/librte_eal/freebsd/eal.c +12 -12
index 8c75cba79a71..f914400db50f 100644
@@ -622,10 +622,10 @@ eal_check_mem_on_local_socket(void)
 	int socket_id;
 	const struct rte_config *config = rte_eal_get_configuration();
 
-	socket_id = rte_lcore_to_socket_id(config->master_lcore);
+	socket_id = rte_lcore_to_socket_id(config->initial_lcore);
 
 	if (rte_memseg_list_walk(check_socket, &socket_id) == 0)
-		RTE_LOG(WARNING, EAL, "WARNING: Master core has no memory on local socket!\n");
+		RTE_LOG(WARNING, EAL, "WARNING: Initial core has no memory on local socket!\n");
 }
 
 
@@ -845,23 +845,23 @@ rte_eal_init(int argc, char **argv)
 
 	eal_check_mem_on_local_socket();
 
-	eal_thread_init_master(config->master_lcore);
+	eal_thread_initial_lcore(config->initial_lcore);
 
 	ret = eal_thread_dump_affinity(cpuset, sizeof(cpuset));
 
-	RTE_LOG(DEBUG, EAL, "Master lcore %u is ready (tid=%p;cpuset=[%s%s])\n",
-		config->master_lcore, thread_id, cpuset,
+	RTE_LOG(DEBUG, EAL, "Initial lcore %u is ready (tid=%p;cpuset=[%s%s])\n",
+		rte_config.initial_lcore, thread_id, cpuset,
 		ret == 0 ? "" : "...");
 
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 
 		/*
-		 * create communication pipes between master thread
+		 * create communication pipes between initial thread
 		 * and children
 		 */
-		if (pipe(lcore_config[i].pipe_master2slave) < 0)
+		if (pipe(lcore_config[i].pipe_init2worker) < 0)
 			rte_panic("Cannot create pipe\n");
-		if (pipe(lcore_config[i].pipe_slave2master) < 0)
+		if (pipe(lcore_config[i].pipe_worker2init) < 0)
 			rte_panic("Cannot create pipe\n");
 
 		lcore_config[i].state = WAIT;
@@ -874,15 +874,15 @@ rte_eal_init(int argc, char **argv)
 
 		/* Set thread_name for aid in debugging. */
 		snprintf(thread_name, sizeof(thread_name),
-				"lcore-slave-%d", i);
+				"lcore-work-%d", i);
 		rte_thread_setname(lcore_config[i].thread_id, thread_name);
 	}
 
 	/*
-	 * Launch a dummy function on all slave lcores, so that master lcore
+	 * Launch a dummy function on all worker lcores, so that initial lcore
 	 * knows they are all ready when this function returns.
 	 */
-	rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER);
+	rte_eal_mp_remote_launch(sync_func, NULL, SKIP_INITIAL);
 	rte_eal_mp_wait_lcore();
 
 	/* initialize services so vdevs register service during bus_probe. */
lib/librte_eal/freebsd/eal_thread.c +17 -17
index b52019782ac6..5fff09c017c1 100644
@@ -30,35 +30,35 @@ RTE_DEFINE_PER_LCORE(unsigned, _socket_id) = (unsigned)SOCKET_ID_ANY;
 RTE_DEFINE_PER_LCORE(rte_cpuset_t, _cpuset);
 
 /*
- * Send a message to a slave lcore identified by slave_id to call a
+ * Send a message to a worker lcore identified by worker_id to call a
  * function f with argument arg. Once the execution is done, the
  * remote lcore switch in FINISHED state.
  */
 int
-rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id)
+rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned worker_id)
 {
 	int n;
 	char c = 0;
-	int m2s = lcore_config[slave_id].pipe_master2slave[1];
-	int s2m = lcore_config[slave_id].pipe_slave2master[0];
+	int i2w = lcore_config[worker_id].pipe_init2worker[1];
+	int w2i = lcore_config[worker_id].pipe_worker2init[0];
 	int rc = -EBUSY;
 
-	if (lcore_config[slave_id].state != WAIT)
+	if (lcore_config[worker_id].state != WAIT)
 		goto finish;
 
-	lcore_config[slave_id].f = f;
-	lcore_config[slave_id].arg = arg;
+	lcore_config[worker_id].f = f;
+	lcore_config[worker_id].arg = arg;
 
 	/* send message */
 	n = 0;
 	while (n == 0 || (n < 0 && errno == EINTR))
-		n = write(m2s, &c, 1);
+		n = write(i2w, &c, 1);
 	if (n < 0)
 		rte_panic("cannot write on configuration pipe\n");
 
 	/* wait ack */
 	do {
-		n = read(s2m, &c, 1);
+		n = read(w2i, &c, 1);
 	} while (n < 0 && errno == EINTR);
 
 	if (n <= 0)
@@ -66,7 +66,7 @@ rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id)
 
 	rc = 0;
 finish:
-	rte_eal_trace_thread_remote_launch(f, arg, slave_id, rc);
+	rte_eal_trace_thread_remote_launch(f, arg, worker_id, rc);
 	return rc;
 }
 
@@ -83,7 +83,7 @@ eal_thread_set_affinity(void)
 	return rte_thread_set_affinity(&lcore_config[lcore_id].cpuset);
 }
 
-void eal_thread_init_master(unsigned lcore_id)
+void eal_thread_set_initial_lcore(unsigned lcore_id)
 {
 	/* set the lcore ID in per-lcore memory area */
 	RTE_PER_LCORE(_lcore_id) = lcore_id;
@@ -101,21 +101,21 @@ eal_thread_loop(__rte_unused void *arg)
 	int n, ret;
 	unsigned lcore_id;
 	pthread_t thread_id;
-	int m2s, s2m;
+	int i2w, w2i;
 	char cpuset[RTE_CPU_AFFINITY_STR_LEN];
 
 	thread_id = pthread_self();
 
 	/* retrieve our lcore_id from the configuration structure */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (thread_id == lcore_config[lcore_id].thread_id)
 			break;
 	}
 	if (lcore_id == RTE_MAX_LCORE)
 		rte_panic("cannot retrieve lcore id\n");
 
-	m2s = lcore_config[lcore_id].pipe_master2slave[0];
-	s2m = lcore_config[lcore_id].pipe_slave2master[1];
+	i2w = lcore_config[lcore_id].pipe_init2worker[0];
+	w2i = lcore_config[lcore_id].pipe_worker2init[1];
 
 	/* set the lcore ID in per-lcore memory area */
 	RTE_PER_LCORE(_lcore_id) = lcore_id;
@@ -138,7 +138,7 @@ eal_thread_loop(__rte_unused void *arg)
 
 		/* wait command */
 		do {
-			n = read(m2s, &c, 1);
+			n = read(i2w, &c, 1);
 		} while (n < 0 && errno == EINTR);
 
 		if (n <= 0)
@@ -149,7 +149,7 @@ eal_thread_loop(__rte_unused void *arg)
 		/* send ack */
 		n = 0;
 		while (n == 0 || (n < 0 && errno == EINTR))
-			n = write(s2m, &c, 1);
+			n = write(w2i, &c, 1);
 		if (n < 0)
 			rte_panic("cannot write on configuration pipe\n");
 
lib/librte_eal/include/rte_eal.h +2 -2
index 2f9ed298de63..c01b9e913d48 100644
@@ -73,11 +73,11 @@ int rte_eal_iopl_init(void);
 /**
  * Initialize the Environment Abstraction Layer (EAL).
  *
- * This function is to be executed on the MASTER lcore only, as soon
+ * This function is to be executed on the initial lcore only, as soon
  * as possible in the application's main() function.
  *
  * The function finishes the initialization process before main() is called.
- * It puts the SLAVE lcores in the WAIT state.
+ * It puts the worker lcores in the WAIT state.
  *
  * When the multi-partition feature is supported, depending on the
  * configuration (if CONFIG_RTE_EAL_MAIN_PARTITION is disabled), this
lib/librte_eal/include/rte_eal_trace.h +2 -2
index bcfef0cfaa62..f2b47184d72f 100644
@@ -210,10 +210,10 @@ RTE_TRACE_POINT(
 RTE_TRACE_POINT(
 	rte_eal_trace_thread_remote_launch,
 	RTE_TRACE_POINT_ARGS(int (*f)(void *), void *arg,
-		unsigned int slave_id, int rc),
+		unsigned int worker_id, int rc),
 	rte_trace_point_emit_ptr(f);
 	rte_trace_point_emit_ptr(arg);
-	rte_trace_point_emit_u32(slave_id);
+	rte_trace_point_emit_u32(worker_id);
 	rte_trace_point_emit_int(rc);
 )
 RTE_TRACE_POINT(
lib/librte_eal/include/rte_launch.h +34 -28

139 lines not on this page · raw message

lib/librte_eal/include/rte_lcore.h +22 -7
index 339046bc8691..069cb1f427b9 100644
@@ -54,10 +54,18 @@ rte_lcore_id(void)
 }
 
 /**
- * Get the id of the master lcore
+ * Get the id of the initial lcore
  *
  * @return
- *   the id of the master lcore
+ *   the id of the initial lcore
+ */
+unsigned int rte_get_initial_lcore(void);
+
+/**
+ * Deprecated API to get the id of the initial lcore
+ *
+ * @return
+ *   the id of the initial lcore
  */
 unsigned int rte_get_master_lcore(void);
 
@@ -179,15 +187,15 @@ int rte_lcore_is_enabled(unsigned int lcore_id);
  *
  * @param i
  *   The current lcore (reference).
- * @param skip_master
- *   If true, do not return the ID of the master lcore.
+ * @param skip_initial
+ *   If true, do not return the ID of the initial lcore.
  * @param wrap
  *   If true, go back to 0 when RTE_MAX_LCORE is reached; otherwise,
  *   return RTE_MAX_LCORE.
  * @return
  *   The next lcore_id or RTE_MAX_LCORE if not found.
  */
-unsigned int rte_get_next_lcore(unsigned int i, int skip_master, int wrap);
+unsigned int rte_get_next_lcore(unsigned int i, int skip_initial, int wrap);
 
 /**
  * Macro to browse all running lcores.
@@ -198,13 +206,20 @@ unsigned int rte_get_next_lcore(unsigned int i, int skip_master, int wrap);
 	     i = rte_get_next_lcore(i, 0, 0))
 
 /**
- * Macro to browse all running lcores except the master lcore.
+ * Macro to browse all running lcores except the initial lcore.
  */
-#define RTE_LCORE_FOREACH_SLAVE(i)					\
+#define RTE_LCORE_FOREACH_WORKER(i)					\
 	for (i = rte_get_next_lcore(-1, 1, 0);				\
 	     i<RTE_MAX_LCORE;						\
 	     i = rte_get_next_lcore(i, 1, 0))
 
+/**
+ * Backward compatibility
+ */
+#define RTE_LCORE_FOREACH_SLAVE(x)		\
+	RTE_LCORE_FOREACH_WORKER(x)
+
+
 /**
  * Set core affinity of the current thread.
  * Support both EAL and non-EAL thread and update TLS.
lib/librte_eal/linux/eal.c +12 -12
index 3b56d14da1d4..5289b99d1959 100644
@@ -855,10 +855,10 @@ eal_check_mem_on_local_socket(void)
 	int socket_id;
 	const struct rte_config *config = rte_eal_get_configuration();
 
-	socket_id = rte_lcore_to_socket_id(config->master_lcore);
+	socket_id = rte_lcore_to_socket_id(config->initial_lcore);
 
 	if (rte_memseg_list_walk(check_socket, &socket_id) == 0)
-		RTE_LOG(WARNING, EAL, "WARNING: Master core has no memory on local socket!\n");
+		RTE_LOG(WARNING, EAL, "WARNING: Initial core has no memory on local socket!\n");
 }
 
 static int
@@ -1184,23 +1184,23 @@ rte_eal_init(int argc, char **argv)
 
 	eal_check_mem_on_local_socket();
 
-	eal_thread_init_master(config->master_lcore);
+	eal_thread_initial_lcore(config->initial_lcore);
 
 	ret = eal_thread_dump_affinity(cpuset, sizeof(cpuset));
 
-	RTE_LOG(DEBUG, EAL, "Master lcore %u is ready (tid=%zx;cpuset=[%s%s])\n",
-		config->master_lcore, (uintptr_t)thread_id, cpuset,
+	RTE_LOG(DEBUG, EAL, "Initial lcore %u is ready (tid=%zx;cpuset=[%s%s])\n",
+		config->initial_lcore, (uintptr_t)thread_id, cpuset,
 		ret == 0 ? "" : "...");
 
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 
 		/*
-		 * create communication pipes between master thread
+		 * create communication pipes between initial thread
 		 * and children
 		 */
-		if (pipe(lcore_config[i].pipe_master2slave) < 0)
+		if (pipe(lcore_config[i].pipe_init2worker) < 0)
 			rte_panic("Cannot create pipe\n");
-		if (pipe(lcore_config[i].pipe_slave2master) < 0)
+		if (pipe(lcore_config[i].pipe_worker2init) < 0)
 			rte_panic("Cannot create pipe\n");
 
 		lcore_config[i].state = WAIT;
@@ -1213,7 +1213,7 @@ rte_eal_init(int argc, char **argv)
 
 		/* Set thread_name for aid in debugging. */
 		snprintf(thread_name, sizeof(thread_name),
-			"lcore-slave-%d", i);
+			"lcore-work-%d", i);
 		ret = rte_thread_setname(lcore_config[i].thread_id,
 						thread_name);
 		if (ret != 0)
@@ -1222,10 +1222,10 @@ rte_eal_init(int argc, char **argv)
 	}
 
 	/*
-	 * Launch a dummy function on all slave lcores, so that master lcore
+	 * Launch a dummy function on all worker lcores, so that initial lcore
 	 * knows they are all ready when this function returns.
 	 */
-	rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER);
+	rte_eal_mp_remote_launch(sync_func, NULL, SKIP_INITIAL);
 	rte_eal_mp_wait_lcore();
 
 	/* initialize services so vdevs register service during bus_probe. */
lib/librte_eal/linux/eal_memory.c +5 -5
index 89725291b0ce..1cbb8aab6016 100644
@@ -1737,7 +1737,7 @@ memseg_primary_init_32(void)
 	/* the allocation logic is a little bit convoluted, but here's how it
 	 * works, in a nutshell:
 	 *  - if user hasn't specified on which sockets to allocate memory via
-	 *    --socket-mem, we allocate all of our memory on master core socket.
+	 *    --socket-mem, we allocate all of our memory on initial core socket.
 	 *  - if user has specified sockets to allocate memory on, there may be
 	 *    some "unused" memory left (e.g. if user has specified --socket-mem
 	 *    such that not all memory adds up to 2 gigabytes), so add it to all
@@ -1751,7 +1751,7 @@ memseg_primary_init_32(void)
 	for (i = 0; i < rte_socket_count(); i++) {
 		int hp_sizes = (int) internal_conf->num_hugepage_sizes;
 		uint64_t max_socket_mem, cur_socket_mem;
-		unsigned int master_lcore_socket;
+		unsigned int initial_lcore_socket;
 		struct rte_config *cfg = rte_eal_get_configuration();
 		bool skip;
 
@@ -1767,10 +1767,10 @@ memseg_primary_init_32(void)
 		skip = active_sockets != 0 &&
 				internal_conf->socket_mem[socket_id] == 0;
 		/* ...or if we didn't specifically request memory on *any*
-		 * socket, and this is not master lcore
+		 * socket, and this is not initial lcore
 		 */
-		master_lcore_socket = rte_lcore_to_socket_id(cfg->master_lcore);
-		skip |= active_sockets == 0 && socket_id != master_lcore_socket;
+		initial_lcore_socket = rte_lcore_to_socket_id(cfg->initial_lcore);
+		skip |= active_sockets == 0 && socket_id != initial_lcore_socket;
 
 		if (skip) {
 			RTE_LOG(DEBUG, EAL, "Will not preallocate memory on socket %u\n",
lib/librte_eal/linux/eal_thread.c +17 -17
index cd9d6e0ebf5b..324e9a73060b 100644
@@ -30,35 +30,35 @@ RTE_DEFINE_PER_LCORE(unsigned, _socket_id) = (unsigned)SOCKET_ID_ANY;
 RTE_DEFINE_PER_LCORE(rte_cpuset_t, _cpuset);
 
 /*
- * Send a message to a slave lcore identified by slave_id to call a
+ * Send a message to a worker lcore identified by worker_id to call a
  * function f with argument arg. Once the execution is done, the
  * remote lcore switch in FINISHED state.
  */
 int
-rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id)
+rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned worker_id)
 {
 	int n;
 	char c = 0;
-	int m2s = lcore_config[slave_id].pipe_master2slave[1];
-	int s2m = lcore_config[slave_id].pipe_slave2master[0];
+	int i2w = lcore_config[worker_id].pipe_init2worker[1];
+	int w2i = lcore_config[worker_id].pipe_worker2init[0];
 	int rc = -EBUSY;
 
-	if (lcore_config[slave_id].state != WAIT)
+	if (lcore_config[worker_id].state != WAIT)
 		goto finish;
 
-	lcore_config[slave_id].f = f;
-	lcore_config[slave_id].arg = arg;
+	lcore_config[worker_id].f = f;
+	lcore_config[worker_id].arg = arg;
 
 	/* send message */
 	n = 0;
 	while (n == 0 || (n < 0 && errno == EINTR))
-		n = write(m2s, &c, 1);
+		n = write(i2w, &c, 1);
 	if (n < 0)
 		rte_panic("cannot write on configuration pipe\n");
 
 	/* wait ack */
 	do {
-		n = read(s2m, &c, 1);
+		n = read(w2i, &c, 1);
 	} while (n < 0 && errno == EINTR);
 
 	if (n <= 0)
@@ -66,7 +66,7 @@ rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id)
 
 	rc = 0;
 finish:
-	rte_eal_trace_thread_remote_launch(f, arg, slave_id, rc);
+	rte_eal_trace_thread_remote_launch(f, arg, worker_id, rc);
 	return rc;
 }
 
@@ -83,7 +83,7 @@ eal_thread_set_affinity(void)
 	return rte_thread_set_affinity(&lcore_config[lcore_id].cpuset);
 }
 
-void eal_thread_init_master(unsigned lcore_id)
+void eal_thread_initial_lcore(unsigned lcore_id)
 {
 	/* set the lcore ID in per-lcore memory area */
 	RTE_PER_LCORE(_lcore_id) = lcore_id;
@@ -101,21 +101,21 @@ eal_thread_loop(__rte_unused void *arg)
 	int n, ret;
 	unsigned lcore_id;
 	pthread_t thread_id;
-	int m2s, s2m;
+	int i2w, w2i;
 	char cpuset[RTE_CPU_AFFINITY_STR_LEN];
 
 	thread_id = pthread_self();
 
 	/* retrieve our lcore_id from the configuration structure */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (thread_id == lcore_config[lcore_id].thread_id)
 			break;
 	}
 	if (lcore_id == RTE_MAX_LCORE)
 		rte_panic("cannot retrieve lcore id\n");
 
-	m2s = lcore_config[lcore_id].pipe_master2slave[0];
-	s2m = lcore_config[lcore_id].pipe_slave2master[1];
+	i2w = lcore_config[lcore_id].pipe_init2worker[0];
+	w2i = lcore_config[lcore_id].pipe_worker2init[1];
 
 	/* set the lcore ID in per-lcore memory area */
 	RTE_PER_LCORE(_lcore_id) = lcore_id;
@@ -138,7 +138,7 @@ eal_thread_loop(__rte_unused void *arg)
 
 		/* wait command */
 		do {
-			n = read(m2s, &c, 1);
+			n = read(i2w, &c, 1);
 		} while (n < 0 && errno == EINTR);
 
 		if (n <= 0)
@@ -149,7 +149,7 @@ eal_thread_loop(__rte_unused void *arg)
 		/* send ack */
 		n = 0;
 		while (n == 0 || (n < 0 && errno == EINTR))
-			n = write(s2m, &c, 1);
+			n = write(w2i, &c, 1);
 		if (n < 0)
 			rte_panic("cannot write on configuration pipe\n");
 
lib/librte_eal/rte_eal_version.map +1 -0
index 196eef5afab7..fb8f8a32beaf 100644
@@ -79,6 +79,7 @@ DPDK_20.0 {
 	rte_hexdump;
 	rte_hypervisor_get;
 	rte_hypervisor_get_name;
+	rte_init_lcore_id;
 	rte_intr_allow_others;
 	rte_intr_callback_register;
 	rte_intr_callback_unregister;
lib/librte_eal/windows/eal.c +7 -7
index eb10b4ef9689..7d1fe127eae0 100644
@@ -333,7 +333,7 @@ rte_eal_init(int argc, char **argv)
 		return -1;
 	}
 
-	eal_thread_init_master(config->master_lcore);
+	eal_thread_initial_lcore(config->initial_lcore);
 
 	bscan = rte_bus_scan();
 	if (bscan < 0) {
@@ -342,16 +342,16 @@ rte_eal_init(int argc, char **argv)
 		return -1;
 	}
 
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 
 		/*
-		 * create communication pipes between master thread
+		 * create communication pipes between initial thread
 		 * and children
 		 */
-		if (_pipe(lcore_config[i].pipe_master2slave,
+		if (_pipe(lcore_config[i].pipe_init2worker,
 			sizeof(char), _O_BINARY) < 0)
 			rte_panic("Cannot create pipe\n");
-		if (_pipe(lcore_config[i].pipe_slave2master,
+		if (_pipe(lcore_config[i].pipe_worker2init,
 			sizeof(char), _O_BINARY) < 0)
 			rte_panic("Cannot create pipe\n");
 
@@ -363,10 +363,10 @@ rte_eal_init(int argc, char **argv)
 	}
 
 	/*
-	 * Launch a dummy function on all slave lcores, so that master lcore
+	 * Launch a dummy function on all worker lcores, so that initial lcore
 	 * knows they are all ready when this function returns.
 	 */
-	rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER);
+	rte_eal_mp_remote_launch(sync_func, NULL, SKIP_INITIAL);
 	rte_eal_mp_wait_lcore();
 	return fctret;
 }
lib/librte_eal/windows/eal_thread.c +16 -16
index 3dd56519c99a..b3a8a47be313 100644
@@ -21,34 +21,34 @@ RTE_DEFINE_PER_LCORE(unsigned int, _socket_id) = (unsigned int)SOCKET_ID_ANY;
 RTE_DEFINE_PER_LCORE(rte_cpuset_t, _cpuset);
 
 /*
- * Send a message to a slave lcore identified by slave_id to call a
+ * Send a message to a worker lcore identified by worker_id to call a
  * function f with argument arg. Once the execution is done, the
  * remote lcore switch in FINISHED state.
  */
 int
-rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned int slave_id)
+rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned int worker_id)
 {
 	int n;
 	char c = 0;
-	int m2s = lcore_config[slave_id].pipe_master2slave[1];
-	int s2m = lcore_config[slave_id].pipe_slave2master[0];
+	int i2w = lcore_config[worker_id].pipe_init2worker[1];
+	int w2i = lcore_config[worker_id].pipe_worker2init[0];
 
-	if (lcore_config[slave_id].state != WAIT)
+	if (lcore_config[worker_id].state != WAIT)
 		return -EBUSY;
 
-	lcore_config[slave_id].f = f;
-	lcore_config[slave_id].arg = arg;
+	lcore_config[worker_id].f = f;
+	lcore_config[worker_id].arg = arg;
 
 	/* send message */
 	n = 0;
 	while (n == 0 || (n < 0 && errno == EINTR))
-		n = _write(m2s, &c, 1);
+		n = _write(i2w, &c, 1);
 	if (n < 0)
 		rte_panic("cannot write on configuration pipe\n");
 
 	/* wait ack */
 	do {
-		n = _read(s2m, &c, 1);
+		n = _read(w2i, &c, 1);
 	} while (n < 0 && errno == EINTR);
 
 	if (n <= 0)
@@ -58,7 +58,7 @@ rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned int slave_id)
 }
 
 void
-eal_thread_init_master(unsigned int lcore_id)
+eal_thread_set_initial_lcore(unsigned int lcore_id)
 {
 	/* set the lcore ID in per-lcore memory area */
 	RTE_PER_LCORE(_lcore_id) = lcore_id;
@@ -72,21 +72,21 @@ eal_thread_loop(void *arg __rte_unused)
 	int n, ret;
 	unsigned int lcore_id;
 	pthread_t thread_id;
-	int m2s, s2m;
+	int i2w, w2i;
 	char cpuset[RTE_CPU_AFFINITY_STR_LEN];
 
 	thread_id = pthread_self();
 
 	/* retrieve our lcore_id from the configuration structure */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (thread_id == lcore_config[lcore_id].thread_id)
 			break;
 	}
 	if (lcore_id == RTE_MAX_LCORE)
 		rte_panic("cannot retrieve lcore id\n");
 
-	m2s = lcore_config[lcore_id].pipe_master2slave[0];
-	s2m = lcore_config[lcore_id].pipe_slave2master[1];
+	i2w = lcore_config[lcore_id].pipe_init2worker[0];
+	w2i = lcore_config[lcore_id].pipe_worker2init[1];
 
 	/* set the lcore ID in per-lcore memory area */
 	RTE_PER_LCORE(_lcore_id) = lcore_id;
@@ -100,7 +100,7 @@ eal_thread_loop(void *arg __rte_unused)
 
 		/* wait command */
 		do {
-			n = _read(m2s, &c, 1);
+			n = _read(i2w, &c, 1);
 		} while (n < 0 && errno == EINTR);
 
 		if (n <= 0)
@@ -111,7 +111,7 @@ eal_thread_loop(void *arg __rte_unused)
 		/* send ack */
 		n = 0;
 		while (n == 0 || (n < 0 && errno == EINTR))
-			n = _write(s2m, &c, 1);
+			n = _write(w2i, &c, 1);
 		if (n < 0)
 			rte_panic("cannot write on configuration pipe\n");
 
Signature · 1 line
2.26.2
#74 lore raw

Re: [dpdk-dev] [PATCH v4 01/27] eal: rename terms used for DPDK lcores

Quoted 6 lines · Stephen Hemminger

Replace the old use of master/slave lcore with more inclusive name of initial/secondary lcore. The old visible API will stay for now.

Change master2slave to new init2worker and vice-versa.

Quoted 7 lines

This patch breaks the expected practice for new API's. The new rte_get_initial_lcore() will not go through the standard experimental API phase; there is no functional difference from the previous name.

---

It's more difficult than it needs to be to review this patchset as it's out of date with current code.

Quoted 9 lines
doc/guides/nics/memif.rst +0 -1
index ddeebed25ccd..9c67d7141cbe 100644
@@ -106,13 +106,13 @@ region n (no-zero-copy):
  +-----------------------+-------------------------------------------------------------------------+
  | Rings                 | Buffers                                                                 |
  +-----------+-----------+-----------------+---+---------------------------------------------------+
-| S2M rings | M2S rings | packet buffer 0 | . | pb ((1 << pmd->run.log2_ring_size)*(s2m + m2s))-1 |

doc/guides/nics/memif.rst region n (no-zero-copy): · line 117

Quoted 10 lines
doc/guides/nics/memif.rst +2 -1
+| S2M rings | M2S rings | packet buffer 0 | . | pb ((1 << pmd->run.log2_ring_size)*(w2i + i2w))-1 |
  +-----------+-----------+-----------------+---+---------------------------------------------------+
 
  S2M OR M2S Rings:
 
  +--------+--------+-----------------------+
-| ring 0 | ring 1 | ring num_s2m_rings - 1|
+| ring 0 | ring 1 | ring num_w2i_rings - 1|
  +--------+--------+-----------------------+
 

This is probably a rebase error, looks like it belongs with the memif patch.

<snip>

lib/librte_eal/rte_eal_version.map DPDK_20.0 { · line 82

Quoted 9 lines
lib/librte_eal/rte_eal_version.map +1 -0
index 196eef5afab7..fb8f8a32beaf 100644
@@ -79,6 +79,7 @@ DPDK_20.0 {
  	rte_hexdump;
  	rte_hypervisor_get;
  	rte_hypervisor_get_name;
+	rte_init_lcore_id;

Isn't it "rte_get_initial_lcore"?

Also, as i've already mentioned in the response to the cover letter, i think "main lcore" would be more descriptive than "initial lcore".

Signature · 2 lines
Thanks,
Anatoly
#75 lore raw

PATCH v4 2/27 kni: fix reference to master/slave process

In reply to Stephen Hemminger

In DPDK, the correct terms for process are primary/secondary. This is bugfix, not a change in terms for new release.

Fixes f2e7592c474c ("kni: fix multi-process support")
---
 lib/librte_kni/rte_kni.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_kni/rte_kni.h +1 -1
index f1bb782c68ea..855facd1a319 100644
@@ -212,7 +212,7 @@ const char *rte_kni_get_name(const struct rte_kni *kni);
 
 /**
  * Register KNI request handling for a specified port,and it can
- * be called by master process or slave process.
+ * be called by primary process or secondary process.
  *
  * @param kni
  *  pointer to struct rte_kni.
Signature · 1 line
2.26.2
#77 lore raw

PATCH v4 3/27 bbdev: rename master to initial lcore

In reply to Stephen Hemminger

Conform to new API.

---
 examples/bbdev_app/main.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
examples/bbdev_app/main.c +7 -7
index 68a46050c048..d1db739d4e2f 100644
@@ -1042,7 +1042,7 @@ main(int argc, char **argv)
 	struct stats_lcore_params stats_lcore;
 	struct rte_ring *enc_to_dec_ring;
 	bool stats_thread_started = false;
-	unsigned int master_lcore_id = rte_get_master_lcore();
+	unsigned int initial_lcore_id = rte_get_initial_lcore();
 
 	rte_atomic16_init(&global_exit_flag);
 
@@ -1145,9 +1145,9 @@ main(int argc, char **argv)
 	stats_lcore.app_params = &app_params;
 	stats_lcore.lconf = lcore_conf;
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (lcore_conf[lcore_id].core_type != 0)
-			/* launch per-lcore processing loop on slave lcores */
+			/* launch per-lcore processing loop on worker lcores */
 			rte_eal_remote_launch(processing_loop,
 					&lcore_conf[lcore_id], lcore_id);
 		else if (!stats_thread_started) {
@@ -1159,15 +1159,15 @@ main(int argc, char **argv)
 	}
 
 	if (!stats_thread_started &&
-			lcore_conf[master_lcore_id].core_type != 0)
+			lcore_conf[initial_lcore_id].core_type != 0)
 		rte_exit(EXIT_FAILURE,
 				"Not enough lcores to run the statistics printing loop!");
-	else if (lcore_conf[master_lcore_id].core_type != 0)
-		processing_loop(&lcore_conf[master_lcore_id]);
+	else if (lcore_conf[initial_lcore_id].core_type != 0)
+		processing_loop(&lcore_conf[initial_lcore_id]);
 	else if (!stats_thread_started)
 		stats_loop(&stats_lcore);
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		ret |= rte_eal_wait_lcore(lcore_id);
 	}
 
Signature · 1 line
2.26.2
#79 lore raw

PATCH v4 4/27 librte_power: change reference to rte_master_lcore

In reply to Stephen Hemminger

New API name is rte_get_initial_lcore()

---
 lib/librte_power/rte_power_empty_poll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_power/rte_power_empty_poll.c +1 -1
index 70c07b1533f3..d54a09b9d6a4 100644
@@ -452,7 +452,7 @@ rte_power_empty_poll_stat_init(struct ep_params **eptr, uint8_t *freq_tlb,
 		if (get_freq_index(LOW) > total_avail_freqs[i])
 			return -1;
 
-		if (rte_get_master_lcore() != i) {
+		if (rte_get_initial_lcore() != i) {
 			w->wrk_stats[i].lcore_id = i;
 			set_policy(&w->wrk_stats[i], policy);
 		}
Signature · 1 line
2.26.2
Acked-by on v4 4/27
#80 lore raw

Re: [dpdk-dev] [PATCH v4 04/27] librte_power: change reference to rte_master_lcore

Quoted 13 lines · Stephen Hemminger

New API name is rte_get_initial_lcore()

---
  lib/librte_power/rte_power_empty_poll.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_power/rte_power_empty_poll.c +0 -0
index 70c07b1533f3..d54a09b9d6a4 100644

lib/librte_power/rte_power_empty_poll.c rte_power_empty_poll_stat_init(struct ep_params **eptr, uint8_t *freq_tlb, · line 458

Quoted 8 lines
lib/librte_power/rte_power_empty_poll.c +1 -1
@@ -452,7 +452,7 @@ rte_power_empty_poll_stat_init(struct ep_params **eptr, uint8_t *freq_tlb,
  		if (get_freq_index(LOW) > total_avail_freqs[i])
  			return -1;
 
-		if (rte_get_master_lcore() != i) {
+		if (rte_get_initial_lcore() != i) {
  			w->wrk_stats[i].lcore_id = i;
  			set_policy(&w->wrk_stats[i], policy);
  		}
Signature · 2 lines
Thanks,
Anatoly
#81 lore raw

PATCH v4 5/27 drivers: replace master/slave terminology

In reply to Stephen Hemminger

Replace rte_get_master_lcore() with rte_get_initial_lcore(). Replace RTE_LCORE_FOREACH_SLAVE with RTE_LCORE_FOREACH_WORKER

---
 drivers/bus/dpaa/dpaa_bus.c                  | 2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.c     | 6 +++---
 drivers/net/bnxt/bnxt_ring.c                 | 4 ++--
 drivers/net/mvpp2/mrvl_ethdev.c              | 6 +++---
 drivers/net/qede/base/bcm_osal.c             | 4 ++--
 drivers/net/softnic/rte_eth_softnic_thread.c | 4 ++--
 6 files changed, 13 insertions(+), 13 deletions(-)
drivers/bus/dpaa/dpaa_bus.c +1 -1
index 591e28c1e709..81d62b02428f 100644
@@ -260,7 +260,7 @@ int rte_dpaa_portal_init(void *arg)
 	BUS_INIT_FUNC_TRACE();
 
 	if ((size_t)arg == 1 || lcore == LCORE_ID_ANY)
-		lcore = rte_get_master_lcore();
+		lcore = rte_get_initial_lcore();
 	else
 		if (lcore >= RTE_MAX_LCORE)
 			return -1;
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +3 -3
index 21c535f2fbad..d498161fe427 100644
@@ -195,7 +195,7 @@ dpaa2_configure_stashing(struct dpaa2_dpio_dev *dpio_dev, int lcoreid)
 
 	/* Set the Stashing Destination */
 	if (lcoreid < 0) {
-		lcoreid = rte_get_master_lcore();
+		lcoreid = rte_get_initial_lcore();
 		if (lcoreid < 0) {
 			DPAA2_BUS_ERR("Getting CPU Index failed");
 			return -1;
@@ -259,7 +259,7 @@ dpaa2_affine_qbman_swp(void)
 	uint64_t tid = syscall(SYS_gettid);
 
 	if (lcore_id == LCORE_ID_ANY)
-		lcore_id = rte_get_master_lcore();
+		lcore_id = rte_get_initial_lcore();
 	/* if the core id is not supported */
 	else if (lcore_id >= RTE_MAX_LCORE)
 		return -1;
@@ -307,7 +307,7 @@ dpaa2_affine_qbman_ethrx_swp(void)
 	uint64_t tid = syscall(SYS_gettid);
 
 	if (lcore_id == LCORE_ID_ANY)
-		lcore_id = rte_get_master_lcore();
+		lcore_id = rte_get_initial_lcore();
 	/* if the core id is not supported */
 	else if (lcore_id >= RTE_MAX_LCORE)
 		return -1;
drivers/net/bnxt/bnxt_ring.c +2 -2
index 24a947f27823..b649e3317ea1 100644
@@ -429,7 +429,7 @@ int bnxt_alloc_rxtx_nq_ring(struct bnxt *bp)
 	if (!BNXT_HAS_NQ(bp) || bp->rxtx_nq_ring)
 		return 0;
 
-	socket_id = rte_lcore_to_socket_id(rte_get_master_lcore());
+	socket_id = rte_lcore_to_socket_id(rte_get_initial_lcore());
 
 	nqr = rte_zmalloc_socket("nqr",
 				 sizeof(struct bnxt_cp_ring_info),
@@ -819,7 +819,7 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp)
 	if (BNXT_NUM_ASYNC_CPR(bp) == 0)
 		return 0;
 
-	socket_id = rte_lcore_to_socket_id(rte_get_master_lcore());
+	socket_id = rte_lcore_to_socket_id(rte_get_initial_lcore());
 
 	cpr = rte_zmalloc_socket("cpr",
 				 sizeof(struct bnxt_cp_ring_info),
drivers/net/mvpp2/mrvl_ethdev.c +3 -3
index 9037274327b1..4ffd81d903c4 100644
@@ -816,7 +816,7 @@ mrvl_flush_bpool(struct rte_eth_dev *dev)
 	unsigned int core_id = rte_lcore_id();
 
 	if (core_id == LCORE_ID_ANY)
-		core_id = rte_get_master_lcore();
+		core_id = rte_get_initial_lcore();
 
 	hif = mrvl_get_hif(priv, core_id);
 
@@ -1620,7 +1620,7 @@ mrvl_fill_bpool(struct mrvl_rxq *rxq, int num)
 
 	core_id = rte_lcore_id();
 	if (core_id == LCORE_ID_ANY)
-		core_id = rte_get_master_lcore();
+		core_id = rte_get_initial_lcore();
 
 	hif = mrvl_get_hif(rxq->priv, core_id);
 	if (!hif)
@@ -1770,7 +1770,7 @@ mrvl_rx_queue_release(void *rxq)
 	unsigned int core_id = rte_lcore_id();
 
 	if (core_id == LCORE_ID_ANY)
-		core_id = rte_get_master_lcore();
+		core_id = rte_get_initial_lcore();
 
 	if (!q)
 		return;
drivers/net/qede/base/bcm_osal.c +2 -2
index 54e5e4f98159..8ecbf82c5e7c 100644
@@ -112,7 +112,7 @@ void *osal_dma_alloc_coherent(struct ecore_dev *p_dev,
 	snprintf(mz_name, sizeof(mz_name), "%lx",
 					(unsigned long)rte_get_timer_cycles());
 	if (core_id == (unsigned int)LCORE_ID_ANY)
-		core_id = rte_get_master_lcore();
+		core_id = rte_get_initial_lcore();
 	socket_id = rte_lcore_to_socket_id(core_id);
 	mz = rte_memzone_reserve_aligned(mz_name, size, socket_id,
 			RTE_MEMZONE_IOVA_CONTIG, RTE_CACHE_LINE_SIZE);
@@ -151,7 +151,7 @@ void *osal_dma_alloc_coherent_aligned(struct ecore_dev *p_dev,
 	snprintf(mz_name, sizeof(mz_name), "%lx",
 					(unsigned long)rte_get_timer_cycles());
 	if (core_id == (unsigned int)LCORE_ID_ANY)
-		core_id = rte_get_master_lcore();
+		core_id = rte_get_initial_lcore();
 	socket_id = rte_lcore_to_socket_id(core_id);
 	mz = rte_memzone_reserve_aligned(mz_name, size, socket_id,
 			RTE_MEMZONE_IOVA_CONTIG, align);
drivers/net/softnic/rte_eth_softnic_thread.c +2 -2
index dcfb5eb82c18..a2b6f522427a 100644
@@ -25,7 +25,7 @@ softnic_thread_free(struct pmd_internals *softnic)
 {
 	uint32_t i;
 
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 		struct softnic_thread *t = &softnic->thread[i];
 
 		/* MSGQs */
@@ -99,7 +99,7 @@ softnic_thread_init(struct pmd_internals *softnic)
 static inline int
 thread_is_valid(struct pmd_internals *softnic, uint32_t thread_id)
 {
-	if (thread_id == rte_get_master_lcore())
+	if (thread_id == rte_get_initial_lcore())
 		return 0; /* FALSE */
 
 	if (softnic->params.sc && rte_lcore_has_role(thread_id, ROLE_SERVICE))
Signature · 1 line
2.26.2
Reviewed-by on v4 5/27
#82 lore raw

Re: [dpdk-dev] [PATCH v4 05/27] drivers: replace master/slave terminology

Quoted 5 lines · Stephen Hemminger

Replace rte_get_master_lcore() with rte_get_initial_lcore(). Replace RTE_LCORE_FOREACH_SLAVE with RTE_LCORE_FOREACH_WORKER

---

Comments in pci_common_uio.c:54 and vmbus_common_uio.c:88 refers to secondary process as "slave", should probably fix that too.

You mentioned "bonding" driver as needing work but there's actually a whole bunch of instances of such terminology being used internally in other drivers as well (e.g. cryptodev scheduler). A quick grep on "master|slave" gives us a huge list of files, and while some of them are spec terms (e.g. PCI bus mastering), a lot of them aren't. I'm of course not suggesting it all should be done in this patch, just noting that bonding isn't the only driver needing work :)

As for contents of this patch (provided the corrections mentioned above are done),

Signature · 2 lines
Thanks,
Anatoly
#83 lore raw

PATCH v4 6/27 examples/distributor: rename master to initial

In reply to Stephen Hemminger

Conform to new API

---
 examples/distributor/main.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
examples/distributor/main.c +5 -5
index 567c5e98919d..d3906bede6fc 100644
@@ -612,7 +612,7 @@ static int
 init_power_library(void)
 {
 	int ret = 0, lcore_id;
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		/* init power management library */
 		ret = rte_power_init(lcore_id);
 		if (ret) {
@@ -808,7 +808,7 @@ main(int argc, char *argv[])
 		 * available, the higher frequency cores will go to the
 		 * distributor first, then rx, then tx.
 		 */
-		RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+		RTE_LCORE_FOREACH_WORKER(lcore_id) {
 
 			rte_power_get_capabilities(lcore_id, &lcore_cap);
 
@@ -841,7 +841,7 @@ main(int argc, char *argv[])
 	 * after the high performing core assignment above, pre-assign
 	 * them here.
 	 */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (lcore_id == (unsigned int)distr_core_id ||
 				lcore_id == (unsigned int)rx_core_id ||
 				lcore_id == (unsigned int)tx_core_id)
@@ -872,7 +872,7 @@ main(int argc, char *argv[])
 	 * Kick off all the worker threads first, avoiding the pre-assigned
 	 * lcore_ids for tx, rx and distributor workloads.
 	 */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (lcore_id == (unsigned int)distr_core_id ||
 				lcore_id == (unsigned int)rx_core_id ||
 				lcore_id == (unsigned int)tx_core_id)
@@ -925,7 +925,7 @@ main(int argc, char *argv[])
 		usleep(1000);
 	}
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
Signature · 1 line
2.26.2
#85 lore raw

PATCH v4 7/27 examples/bond: replace references to master lcore

In reply to Stephen Hemminger

Change the references to master lcore.
For now, ok to keep 'slave' for bonding since
that is part of the API not addressed yet.

---
 examples/bond/main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
examples/bond/main.c +4 -4
index 8608285b686e..e415d7bc9c8c 100644
@@ -590,7 +590,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result,
 		return;
 	}
 
-	/* start lcore main on core != master_core - ARP response thread */
+	/* start lcore main on core != initial_core - ARP response thread */
 	slave_core_id = rte_get_next_lcore(rte_lcore_id(), 1, 0);
 	if ((slave_core_id >= RTE_MAX_LCORE) || (slave_core_id == 0))
 		return;
@@ -802,7 +802,7 @@ cmdline_parse_ctx_t main_ctx[] = {
 	NULL,
 };
 
-/* prompt function, called from main on MASTER lcore */
+/* prompt function, called from main on initial lcore */
 static void prompt(__rte_unused void *arg1)
 {
 	struct cmdline *cl;
@@ -852,12 +852,12 @@ main(int argc, char *argv[])
 	rte_spinlock_init(&global_flag_stru_p->lock);
 
 	/* check state of lcores */
-	RTE_LCORE_FOREACH_SLAVE(slave_core_id) {
+	RTE_LCORE_FOREACH_WORKER(slave_core_id) {
 		if (rte_eal_get_lcore_state(slave_core_id) != WAIT)
 			return -EBUSY;
 	}
 
-	/* start lcore main on core != master_core - ARP response thread */
+	/* start lcore main on core != initial_core - ARP response thread */
 	slave_core_id = rte_get_next_lcore(rte_lcore_id(), 1, 0);
 	if ((slave_core_id >= RTE_MAX_LCORE) || (slave_core_id == 0))
 		return -EPERM;
Signature · 1 line
2.26.2
#87 lore raw

PATCH v4 8/27 examples/ethtool-app: replace references to slave with worker

In reply to Stephen Hemminger

Conforms to new API naming conventions.

---
 examples/ethtool/ethtool-app/main.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
examples/ethtool/ethtool-app/main.c +5 -5
index 7383413215d6..a55d31d891df 100644
@@ -176,7 +176,7 @@ static void process_frame(struct app_port *ptr_port,
 	rte_ether_addr_copy(&ptr_port->mac_addr, &ptr_mac_hdr->s_addr);
 }
 
-static int slave_main(__rte_unused void *ptr_data)
+static int worker_main(__rte_unused void *ptr_data)
 {
 	struct app_port *ptr_port;
 	struct rte_mbuf *ptr_frame;
@@ -284,16 +284,16 @@ int main(int argc, char **argv)
 	app_cfg.cnt_ports = cnt_ports;
 
 	if (rte_lcore_count() < 2)
-		rte_exit(EXIT_FAILURE, "No available slave core!\n");
-	/* Assume there is an available slave.. */
+		rte_exit(EXIT_FAILURE, "No available worker core!\n");
+	/* Assume there is an available worker.. */
 	id_core = rte_lcore_id();
 	id_core = rte_get_next_lcore(id_core, 1, 1);
-	rte_eal_remote_launch(slave_main, NULL, id_core);
+	rte_eal_remote_launch(worker_main, NULL, id_core);
 
 	ethapp_main();
 
 	app_cfg.exit_now = 1;
-	RTE_LCORE_FOREACH_SLAVE(id_core) {
+	RTE_LCORE_FOREACH_WORKER(id_core) {
 		if (rte_eal_wait_lcore(id_core) < 0)
 			return -1;
 	}
Signature · 1 line
2.26.2
#89 lore raw

PATCH v4 9/27 examples/ip_pipeline: replace references to master_lcore

In reply to Stephen Hemminger

Use initial lcore instead of primary lcore

---
 examples/ip_pipeline/main.c   |  2 +-
 examples/ip_pipeline/thread.c | 16 ++++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)
examples/ip_pipeline/main.c +1 -1
index 97d1e91c2b4b..060c6311ddc6 100644
@@ -250,7 +250,7 @@ main(int argc, char **argv)
 	rte_eal_mp_remote_launch(
 		thread_main,
 		NULL,
-		SKIP_MASTER);
+		SKIP_INITIAL);
 
 	/* Script */
 	if (app.script_name)
examples/ip_pipeline/thread.c +8 -8
index adb83167cd84..feefdca4eba2 100644
@@ -32,7 +32,7 @@
 #endif
 
 /**
- * Master thead: data plane thread context
+ * Initial thread: data plane thread context
  */
 struct thread {
 	struct rte_ring *msgq_req;
@@ -78,7 +78,7 @@ struct thread_data {
 static struct thread_data thread_data[RTE_MAX_LCORE];
 
 /**
- * Master thread: data plane thread init
+ * Initial thread: data plane thread init
  */
 static void
 thread_free(void)
@@ -105,7 +105,7 @@ thread_init(void)
 {
 	uint32_t i;
 
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 		char name[NAME_MAX];
 		struct rte_ring *msgq_req, *msgq_rsp;
 		struct thread *t = &thread[i];
@@ -137,7 +137,7 @@ thread_init(void)
 			return -1;
 		}
 
-		/* Master thread records */
+		/* Initial thread records */
 		t->msgq_req = msgq_req;
 		t->msgq_rsp = msgq_rsp;
 		t->enabled = 1;
@@ -179,7 +179,7 @@ pipeline_is_running(struct pipeline *p)
 }
 
 /**
- * Master thread & data plane threads: message passing
+ * Initial thread & data plane threads: message passing
  */
 enum thread_req_type {
 	THREAD_REQ_PIPELINE_ENABLE = 0,
@@ -213,7 +213,7 @@ struct thread_msg_rsp {
 };
 
 /**
- * Master thread
+ * Initial thread
  */
 static struct thread_msg_req *
 thread_msg_alloc(void)
@@ -556,7 +556,7 @@ thread_msg_handle(struct thread_data *t)
 }
 
 /**
- * Master thread & data plane threads: message passing
+ * Initial thread & data plane threads: message passing
  */
 enum pipeline_req_type {
 	/* Port IN */
@@ -730,7 +730,7 @@ struct pipeline_msg_rsp {
 };
 
 /**
- * Master thread
+ * Initial thread
  */
 static struct pipeline_msg_req *
 pipeline_msg_alloc(void)
Signature · 1 line
2.26.2
#91 lore raw

Re: [dpdk-dev] [PATCH v4 09/27] examples/ip_pipeline: replace references to master_lcore

Quoted 12 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Burakov, Anatoly
Sent: Monday, July 13, 2020 2:01 PM
To: Stephen Hemminger <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH v4 09/27] examples/ip_pipeline: replace references to master_lcore

Quoted 2 lines · Stephen Hemminger

Use initial lcore instead of primary lcore

Quoted 8 lines
Quoted 2 lines

---

--
Thanks,
Anatoly

Hi Stephen,

Sorry for the late feedback, may I suggest for this particular application replacing Master thread with Control thread rather than Initial thread, thanks!

Regards,
Cristian

#92 lore raw

PATCH v4 10/27 examples/qos_{meter/sched}: replace references to master lcore

In reply to Stephen Hemminger

Use initial lcore instead.

---
 examples/qos_meter/main.c    |  4 ++--
 examples/qos_sched/args.c    | 22 +++++++++++-----------
 examples/qos_sched/cmdline.c |  2 +-
 examples/qos_sched/main.c    |  2 +-
 4 files changed, 15 insertions(+), 15 deletions(-)
examples/qos_meter/main.c +2 -2
index 6d057abfe3e7..9f1497121105 100644
@@ -457,8 +457,8 @@ main(int argc, char **argv)
 		rte_exit(EXIT_FAILURE, "Invalid configure flow table\n");
 
 	/* Launch per-lcore init on every lcore */
-	rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER);
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL);
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
examples/qos_sched/args.c +11 -11
index 7431b29816aa..6d757c565e46 100644
@@ -22,7 +22,7 @@
 #define MAX_OPT_VALUES 8
 #define SYS_CPU_DIR "/sys/devices/system/cpu/cpu%u/topology/"
 
-static uint32_t app_master_core = 1;
+static uint32_t app_initial_core = 1;
 static uint32_t app_numa_mask;
 static uint64_t app_used_core_mask = 0;
 static uint64_t app_used_port_mask = 0;
@@ -40,7 +40,7 @@ static const char usage[] =
 	"                                                                               \n"
 	"Application optional parameters:                                               \n"
         "    --i     : run in interactive mode (default value is %u)                    \n"
-	"    --mst I : master core index (default value is %u)                          \n"
+	"    --mst I : initial core index (default value is %u)                         \n"
 	"    --rsz \"A, B, C\" :   Ring sizes                                           \n"
 	"           A = Size (in number of buffer descriptors) of each of the NIC RX    \n"
 	"               rings read by the I/O RX lcores (default value is %u)           \n"
@@ -72,7 +72,7 @@ static const char usage[] =
 static void
 app_usage(const char *prgname)
 {
-	printf(usage, prgname, APP_INTERACTIVE_DEFAULT, app_master_core,
+	printf(usage, prgname, APP_INTERACTIVE_DEFAULT, app_initial_core,
 		APP_RX_DESC_DEFAULT, APP_RING_SIZE, APP_TX_DESC_DEFAULT,
 		MAX_PKT_RX_BURST, PKT_ENQUEUE, PKT_DEQUEUE,
 		MAX_PKT_TX_BURST, NB_MBUF,
@@ -98,7 +98,7 @@ app_eal_core_mask(void)
 			cm |= (1ULL << i);
 	}
 
-	cm |= (1ULL << rte_get_master_lcore());
+	cm |= (1ULL << rte_get_initial_lcore());
 
 	return cm;
 }
@@ -353,7 +353,7 @@ app_parse_args(int argc, char **argv)
 					break;
 				}
 				if (str_is(optname, "mst")) {
-					app_master_core = (uint32_t)atoi(optarg);
+					app_initial_core = (uint32_t)atoi(optarg);
 					break;
 				}
 				if (str_is(optname, "rsz")) {
@@ -408,18 +408,18 @@ app_parse_args(int argc, char **argv)
 			}
 	}
 
-	/* check master core index validity */
-	for(i = 0; i <= app_master_core; i++) {
-		if (app_used_core_mask & (1u << app_master_core)) {
-			RTE_LOG(ERR, APP, "Master core index is not configured properly\n");
+	/* check initial core index validity */
+	for (i = 0; i <= app_initial_core; i++) {
+		if (app_used_core_mask & (1u << app_initial_core)) {
+			RTE_LOG(ERR, APP, "Initial core index is not configured properly\n");
 			app_usage(prgname);
 			return -1;
 		}
 	}
-	app_used_core_mask |= 1u << app_master_core;
+	app_used_core_mask |= 1u << app_initial_core;
 
 	if ((app_used_core_mask != app_eal_core_mask()) ||
-			(app_master_core != rte_get_master_lcore())) {
+			(app_initial_core != rte_get_initial_lcore())) {
 		RTE_LOG(ERR, APP, "EAL core mask not configured properly, must be %" PRIx64
 				" instead of %" PRIx64 "\n" , app_used_core_mask, app_eal_core_mask());
 		return -1;
examples/qos_sched/cmdline.c +1 -1
index ba68e0d02693..67e7695b6558 100644
@@ -599,7 +599,7 @@ cmdline_parse_ctx_t main_ctx[] = {
 	NULL,
 };
 
-/* prompt function, called from main on MASTER lcore */
+/* prompt function, called from main on initial lcore */
 void
 prompt(void)
 {
examples/qos_sched/main.c +1 -1
index 73864d66dbc8..9c6be9fa17c0 100644
@@ -204,7 +204,7 @@ main(int argc, char **argv)
 		return -1;
 
 	/* launch per-lcore init on every lcore */
-	rte_eal_mp_remote_launch(app_main_loop, NULL, SKIP_MASTER);
+	rte_eal_mp_remote_launch(app_main_loop, NULL, SKIP_INITIAL);
 
 	if (interactive) {
 		sleep(1);
Signature · 1 line
2.26.2
#94 lore raw

PATCH v4 11/27 examples/l3fwd: replace references to master lcore

In reply to Stephen Hemminger

Use initial lcore instead.

---
 examples/l3fwd-acl/main.c   |  4 ++--
 examples/l3fwd-graph/main.c | 14 +++++++-------
 examples/l3fwd-power/main.c | 20 ++++++++++----------
 examples/l3fwd/main.c       |  2 +-
 4 files changed, 20 insertions(+), 20 deletions(-)
examples/l3fwd-acl/main.c +2 -2
index f22fca732892..c351f87bc159 100644
@@ -2110,8 +2110,8 @@ main(int argc, char **argv)
 	check_all_ports_link_status(enabled_port_mask);
 
 	/* launch per-lcore init on every lcore */
-	rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER);
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL);
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
examples/l3fwd-graph/main.c +7 -7
index c70270c4d131..8b9f61fd8e4a 100644
@@ -167,8 +167,8 @@ check_lcore_params(void)
 			return -1;
 		}
 
-		if (lcore == rte_get_master_lcore()) {
-			printf("Error: lcore %u is master lcore\n", lcore);
+		if (lcore == rte_get_initial_lcore()) {
+			printf("Error: lcore %u is initial lcore\n", lcore);
 			return -1;
 		}
 		socketid = rte_lcore_to_socket_id(lcore);
@@ -1099,16 +1099,16 @@ main(int argc, char **argv)
 			route_str, i);
 	}
 
-	/* Launch per-lcore init on every slave lcore */
-	rte_eal_mp_remote_launch(graph_main_loop, NULL, SKIP_MASTER);
+	/* Launch per-lcore init on every worker lcore */
+	rte_eal_mp_remote_launch(graph_main_loop, NULL, SKIP_INITIAL);
 
-	/* Accumulate and print stats on master until exit */
+	/* Accumulate and print stats on initial until exit */
 	if (rte_graph_has_stats_feature())
 		print_stats();
 
-	/* Wait for slave cores to exit */
+	/* Wait for worker cores to exit */
 	ret = 0;
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		ret = rte_eal_wait_lcore(lcore_id);
 		/* Destroy graph */
 		if (ret < 0 || rte_graph_destroy(
examples/l3fwd-power/main.c +10 -10
index 9db94ce044c2..71a60bb93a37 100644
@@ -1351,7 +1351,7 @@ check_lcore_params(void)
 						"off\n", lcore, socketid);
 		}
 		if (app_mode == APP_MODE_TELEMETRY && lcore == rte_lcore_id()) {
-			printf("cannot enable master core %d in config for telemetry mode\n",
+			printf("cannot enable initial core %d in config for telemetry mode\n",
 				rte_lcore_id());
 			return -1;
 		}
@@ -2089,7 +2089,7 @@ get_current_stat_values(uint64_t *values)
 	uint64_t app_eps = 0, app_fps = 0, app_br = 0;
 	uint64_t count = 0;
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		qconf = &lcore_conf[lcore_id];
 		if (qconf->n_rx_queue == 0)
 			continue;
@@ -2181,10 +2181,10 @@ launch_timer(unsigned int lcore_id)
 	RTE_SET_USED(lcore_id);
 
 
-	if (rte_get_master_lcore() != lcore_id) {
-		rte_panic("timer on lcore:%d which is not master core:%d\n",
+	if (rte_get_initial_lcore() != lcore_id) {
+		rte_panic("timer on lcore:%d which is not initial core:%d\n",
 				lcore_id,
-				rte_get_master_lcore());
+				rte_get_initial_lcore());
 	}
 
 	RTE_LOG(INFO, POWER, "Bring up the Timer\n");
@@ -2515,11 +2515,11 @@ main(int argc, char **argv)
 
 	/* launch per-lcore init on every lcore */
 	if (app_mode == APP_MODE_LEGACY) {
-		rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER);
+		rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL);
 	} else if (app_mode == APP_MODE_EMPTY_POLL) {
 		empty_poll_stop = false;
 		rte_eal_mp_remote_launch(main_empty_poll_loop, NULL,
-				SKIP_MASTER);
+				SKIP_INITIAL);
 	} else {
 		unsigned int i;
 
@@ -2535,7 +2535,7 @@ main(int argc, char **argv)
 		else
 			rte_exit(EXIT_FAILURE, "failed to register metrics names");
 
-		RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+		RTE_LCORE_FOREACH_WORKER(lcore_id) {
 			rte_spinlock_init(&stats[lcore_id].telemetry_lock);
 		}
 		rte_timer_init(&telemetry_timer);
@@ -2543,13 +2543,13 @@ main(int argc, char **argv)
 				handle_app_stats,
 				"Returns global power stats. Parameters: None");
 		rte_eal_mp_remote_launch(main_telemetry_loop, NULL,
-						SKIP_MASTER);
+						SKIP_INITIAL);
 	}
 
 	if (app_mode == APP_MODE_EMPTY_POLL || app_mode == APP_MODE_TELEMETRY)
 		launch_timer(rte_lcore_id());
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
examples/l3fwd/main.c +1 -1
index 24ede42903db..5ad2256e68c8 100644
@@ -1278,7 +1278,7 @@ main(int argc, char **argv)
 
 	ret = 0;
 	/* launch per-lcore init on every lcore */
-	rte_eal_mp_remote_launch(l3fwd_lkp.main_loop, NULL, CALL_MASTER);
+	rte_eal_mp_remote_launch(l3fwd_lkp.main_loop, NULL, CALL_INITIAL);
 	if (evt_rsrc->enabled) {
 		for (i = 0; i < evt_rsrc->rx_adptr.nb_rx_adptr; i++)
 			rte_event_eth_rx_adapter_stop(
Signature · 1 line
2.26.2
#96 lore raw

PATCH v4 12/27 examples/l2fwd: replace references to master lcore

In reply to Stephen Hemminger

Use term initial lcore instead.

---
 examples/l2fwd-cat/l2fwd-cat.c                   | 2 +-
 examples/l2fwd-crypto/main.c                     | 8 ++++----
 examples/l2fwd-event/l2fwd_event_generic.c       | 2 +-
 examples/l2fwd-event/l2fwd_event_internal_port.c | 2 +-
 examples/l2fwd-event/l2fwd_poll.c                | 2 +-
 examples/l2fwd-event/main.c                      | 2 +-
 examples/l2fwd-jobstats/main.c                   | 4 ++--
 examples/l2fwd-keepalive/main.c                  | 6 +++---
 examples/l2fwd/main.c                            | 8 ++++----
 9 files changed, 18 insertions(+), 18 deletions(-)
examples/l2fwd-cat/l2fwd-cat.c +1 -1
index 45a497c082da..a8a6e0c6ca91 100644
@@ -198,7 +198,7 @@ main(int argc, char *argv[])
 	if (rte_lcore_count() > 1)
 		printf("\nWARNING: Too many lcores enabled. Only 1 used.\n");
 
-	/* Call lcore_main on the master core only. */
+	/* Call lcore_main on the initial core only. */
 	lcore_main();
 
 	return 0;
examples/l2fwd-crypto/main.c +4 -4
index 827da9b3e38b..3d35b67e6a89 100644
@@ -874,8 +874,8 @@ l2fwd_main_loop(struct l2fwd_crypto_options *options)
 				if (unlikely(timer_tsc >=
 						(uint64_t)timer_period)) {
 
-					/* do this only on master core */
-					if (lcore_id == rte_get_master_lcore()
+					/* do this only on initial core */
+					if (lcore_id == rte_get_initial_lcore()
 						&& options->refresh_period) {
 						print_stats();
 						timer_tsc = 0;
@@ -2802,8 +2802,8 @@ main(int argc, char **argv)
 
 	/* launch per-lcore init on every lcore */
 	rte_eal_mp_remote_launch(l2fwd_launch_one_lcore, (void *)&options,
-			CALL_MASTER);
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+			CALL_INITIAL);
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
examples/l2fwd-event/l2fwd_event_generic.c +1 -1
index 2dc95e5f7d1a..63de608db459 100644
@@ -72,7 +72,7 @@ l2fwd_event_device_setup_generic(struct l2fwd_resources *rsrc)
 		event_d_conf.nb_event_port_enqueue_depth =
 				dev_info.max_event_port_enqueue_depth;
 
-	/* Ignore Master core and service cores. */
+	/* Ignore initial core and service cores. */
 	num_workers = rte_lcore_count() - 1 - rte_service_lcore_count();
 	if (dev_info.max_event_ports < num_workers)
 		num_workers = dev_info.max_event_ports;
examples/l2fwd-event/l2fwd_event_internal_port.c +1 -1
index 63d57b46c2da..376c44d662a1 100644
@@ -71,7 +71,7 @@ l2fwd_event_device_setup_internal_port(struct l2fwd_resources *rsrc)
 		event_d_conf.nb_event_port_enqueue_depth =
 				dev_info.max_event_port_enqueue_depth;
 
-	/* Ignore Master core. */
+	/* Ignore initial core. */
 	num_workers = rte_lcore_count() - 1;
 	if (dev_info.max_event_ports < num_workers)
 		num_workers = dev_info.max_event_ports;
examples/l2fwd-event/l2fwd_poll.c +1 -1
index 2033c65e54b1..6a16819ad5e8 100644
@@ -116,7 +116,7 @@ l2fwd_poll_lcore_config(struct l2fwd_resources *rsrc)
 
 		/* get the lcore_id for this port */
 		while (rte_lcore_is_enabled(rx_lcore_id) == 0 ||
-		       rx_lcore_id == rte_get_master_lcore() ||
+		       rx_lcore_id == rte_get_initial_lcore() ||
 		       poll_rsrc->lcore_queue_conf[rx_lcore_id].n_rx_port ==
 		       rsrc->rx_queue_per_lcore) {
 			rx_lcore_id++;
examples/l2fwd-event/main.c +1 -1
index 4fe500333cdc..02d08569a757 100644
@@ -673,7 +673,7 @@ main(int argc, char **argv)
 
 	/* launch per-lcore init on every lcore */
 	rte_eal_mp_remote_launch(l2fwd_launch_one_lcore, rsrc,
-				 SKIP_MASTER);
+				 SKIP_INITIAL);
 	l2fwd_event_print_stats(rsrc);
 	if (rsrc->event_mode) {
 		struct l2fwd_event_resources *evt_rsrc =
examples/l2fwd-jobstats/main.c +2 -2
index 47a3b0976546..c06027964a64 100644
@@ -1022,8 +1022,8 @@ main(int argc, char **argv)
 		RTE_LOG(INFO, L2FWD, "Stats display disabled\n");
 
 	/* launch per-lcore init on every lcore */
-	rte_eal_mp_remote_launch(l2fwd_launch_one_lcore, NULL, CALL_MASTER);
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	rte_eal_mp_remote_launch(l2fwd_launch_one_lcore, NULL, CALL_INITIAL);
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
examples/l2fwd-keepalive/main.c +3 -3
index b2742633bc65..c0a99a3b3da5 100644
@@ -792,8 +792,8 @@ main(int argc, char **argv)
 				) != 0 )
 			rte_exit(EXIT_FAILURE, "Stats setup failure.\n");
 	}
-	/* launch per-lcore init on every slave lcore */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	/* launch per-lcore init on every worker lcore */
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		struct lcore_queue_conf *qconf = &lcore_queue_conf[lcore_id];
 
 		if (qconf->n_rx_port == 0)
@@ -816,7 +816,7 @@ main(int argc, char **argv)
 		rte_delay_ms(5);
 		}
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
examples/l2fwd/main.c +4 -4
index 4a41aac63841..b07476fb7a38 100644
@@ -250,8 +250,8 @@ l2fwd_main_loop(void)
 				/* if timer has reached its timeout */
 				if (unlikely(timer_tsc >= timer_period)) {
 
-					/* do this only on master core */
-					if (lcore_id == rte_get_master_lcore()) {
+					/* do this only on initial core */
+					if (lcore_id == rte_get_initial_lcore()) {
 						print_stats();
 						/* reset the timer */
 						timer_tsc = 0;
@@ -756,8 +756,8 @@ main(int argc, char **argv)
 
 	ret = 0;
 	/* launch per-lcore init on every lcore */
-	rte_eal_mp_remote_launch(l2fwd_launch_one_lcore, NULL, CALL_MASTER);
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	rte_eal_mp_remote_launch(l2fwd_launch_one_lcore, NULL, CALL_INITIAL);
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0) {
 			ret = -1;
 			break;
Signature · 1 line
2.26.2
#98 lore raw

PATCH v4 13/27 examples/multi_process: replace references to master lcore

In reply to Stephen Hemminger

Use initial lcore instead.

---
 .../multi_process/client_server_mp/mp_server/main.c    | 10 +++++-----
 examples/multi_process/simple_mp/main.c                |  6 +++---
 examples/multi_process/symmetric_mp/main.c             |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)
examples/multi_process/client_server_mp/mp_server/main.c +5 -5
index 280dab867281..d9aac4648f1d 100644
@@ -84,7 +84,7 @@ get_printable_mac_addr(uint16_t port)
 /*
  * This function displays the recorded statistics for each port
  * and for each client. It uses ANSI terminal codes to clear
- * screen when called. It is called from a single non-master
+ * screen when called. It is called from a single worker
  * thread in the server process, when the process is run with more
  * than one lcore enabled.
  */
@@ -146,7 +146,7 @@ do_stats_display(void)
 }
 
 /*
- * The function called from each non-master lcore used by the process.
+ * The function called from each worker lcore used by the process.
  * The test_and_set function is used to randomly pick a single lcore on which
  * the code to display the statistics will run. Otherwise, the code just
  * repeatedly sleeps.
@@ -244,7 +244,7 @@ process_packets(uint32_t port_num __rte_unused,
 }
 
 /*
- * Function called by the master lcore of the DPDK process.
+ * Function called by the initial lcore of the DPDK process.
  */
 static void
 do_packet_forwarding(void)
@@ -297,8 +297,8 @@ main(int argc, char *argv[])
 	/* clear statistics */
 	clear_stats();
 
-	/* put all other cores to sleep bar master */
-	rte_eal_mp_remote_launch(sleep_lcore, NULL, SKIP_MASTER);
+	/* put all other cores to sleep execpt initial core */
+	rte_eal_mp_remote_launch(sleep_lcore, NULL, SKIP_INITIAL);
 
 	do_packet_forwarding();
 	return 0;
examples/multi_process/simple_mp/main.c +3 -3
index fc79528462e9..f89d46a720b2 100644
@@ -108,12 +108,12 @@ main(int argc, char **argv)
 
 	RTE_LOG(INFO, APP, "Finished Process Init.\n");
 
-	/* call lcore_recv() on every slave lcore */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	/* call lcore_recv() on every worker lcore */
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		rte_eal_remote_launch(lcore_recv, NULL, lcore_id);
 	}
 
-	/* call cmd prompt on master lcore */
+	/* call cmd prompt on initial lcore */
 	struct cmdline *cl = cmdline_stdin_new(simple_mp_ctx, "\nsimple_mp > ");
 	if (cl == NULL)
 		rte_exit(EXIT_FAILURE, "Cannot create cmdline instance\n");
examples/multi_process/symmetric_mp/main.c +1 -1
index 9a16e198cbf4..683062a627a2 100644
@@ -473,7 +473,7 @@ main(int argc, char **argv)
 
 	RTE_LOG(INFO, APP, "Finished Process Init.\n");
 
-	rte_eal_mp_remote_launch(lcore_main, NULL, CALL_MASTER);
+	rte_eal_mp_remote_launch(lcore_main, NULL, CALL_INITIAL);
 
 	return 0;
 }
Signature · 1 line
2.26.2
#100 lore raw

PATCH v4 14/27 examples/performance-thread: replace reference to master lcore

In reply to Stephen Hemminger

Use initial lcore instead.

---
 examples/performance-thread/l3fwd-thread/main.c | 12 ++++++------
 examples/performance-thread/pthread_shim/main.c |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)
examples/performance-thread/l3fwd-thread/main.c +6 -6
index 84c1d7b3a232..a23bb021ce6b 100644
@@ -2211,7 +2211,7 @@ lthread_rx(void *dummy)
 /*
  * Start scheduler with initial lthread on lcore
  *
- * This lthread loop spawns all rx and tx lthreads on master lcore
+ * This lthread loop spawns all rx and tx lthreads on initial lcore
  */
 
 static void *
@@ -2265,7 +2265,7 @@ lthread_spawner(__rte_unused void *arg)
  * (main_lthread_master).
  */
 static int
-lthread_master_spawner(__rte_unused void *arg) {
+lthread_initial_spawner(__rte_unused void *arg) {
 	struct lthread *lt;
 	int lcore_id = rte_lcore_id();
 
@@ -3765,14 +3765,14 @@ main(int argc, char **argv)
 #endif
 
 		lthread_num_schedulers_set(nb_lcores);
-		rte_eal_mp_remote_launch(sched_spawner, NULL, SKIP_MASTER);
-		lthread_master_spawner(NULL);
+		rte_eal_mp_remote_launch(sched_spawner, NULL, SKIP_INITIAL);
+		lthread_initial_spawner(NULL);
 
 	} else {
 		printf("Starting P-Threading Model\n");
 		/* launch per-lcore init on every lcore */
-		rte_eal_mp_remote_launch(pthread_run, NULL, CALL_MASTER);
-		RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+		rte_eal_mp_remote_launch(pthread_run, NULL, CALL_INITIAL);
+		RTE_LCORE_FOREACH_WORKER(lcore_id) {
 			if (rte_eal_wait_lcore(lcore_id) < 0)
 				return -1;
 		}
examples/performance-thread/pthread_shim/main.c +2 -2
index 18f83059bc17..fa6c52209065 100644
@@ -252,10 +252,10 @@ int main(int argc, char **argv)
 	lthread_num_schedulers_set(num_sched);
 
 	/* launch all threads */
-	rte_eal_mp_remote_launch(lthread_scheduler, (void *)NULL, CALL_MASTER);
+	rte_eal_mp_remote_launch(lthread_scheduler, (void *)NULL, CALL_INITIAL);
 
 	/* wait for threads to stop */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		rte_eal_wait_lcore(lcore_id);
 	}
 	return 0;
Signature · 1 line
2.26.2
Acked-by on v4 14/27
#101 lore raw

Re: [dpdk-dev] [PATCH v4 14/27] examples/performance-thread: replace reference to master lcore

Quoted 3 lines · Stephen Hemminger

Use initial lcore instead.

---

<snip>

examples/performance-thread/l3fwd-thread/main.c lthread_spawner(__rte_unused void *arg) · line 2268

Quoted 7 lines

static void *

examples/performance-thread/l3fwd-thread/main.c +1 -1
@@ -2265,7 +2265,7 @@ lthread_spawner(__rte_unused void *arg)
   * (main_lthread_master).
   */
  static int
-lthread_master_spawner(__rte_unused void *arg) {
+lthread_initial_spawner(__rte_unused void *arg) {

You've missed the comments right above this.

Once that's fixed,

Signature · 2 lines
Thanks,
Anatoly
#102 lore raw

PATCH v4 15/27 examples/ptpclient: replace references to master lcore

In reply to Stephen Hemminger

Replace master lcore with initial lcore.
This API still has issue with use of term master clock.

---
 examples/ptpclient/ptpclient.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/ptpclient/ptpclient.c +1 -1
index bfa86eec5a4a..119f4f6e5d89 100644
@@ -785,7 +785,7 @@ main(int argc, char *argv[])
 	if (rte_lcore_count() > 1)
 		printf("\nWARNING: Too many lcores enabled. Only 1 used.\n");
 
-	/* Call lcore_main on the master core only. */
+	/* Call lcore_main on the initial core only. */
 	lcore_main();
 
 	return 0;
Signature · 1 line
2.26.2
#104 lore raw

PATCH v4 16/27 examples/ipcsec-secgw: replace references to master lcore

In reply to Stephen Hemminger

Use initial lcore instead.

---
 examples/ipsec-secgw/event_helper.c | 6 +++---
 examples/ipsec-secgw/ipsec-secgw.c  | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
examples/ipsec-secgw/event_helper.c +3 -3
index 865dc911b864..239c35985bd6 100644
@@ -1461,16 +1461,16 @@ eh_conf_init(void)
 
 	/* Set two cores as eth cores for Rx & Tx */
 
-	/* Use first core other than master core as Rx core */
+	/* Use first core other than initial core as Rx core */
 	eth_core_id = rte_get_next_lcore(0,	/* curr core */
-					 1,	/* skip master core */
+					 1,	/* skip initial core */
 					 0	/* wrap */);
 
 	rte_bitmap_set(em_conf->eth_core_mask, eth_core_id);
 
 	/* Use next core as Tx core */
 	eth_core_id = rte_get_next_lcore(eth_core_id,	/* curr core */
-					 1,		/* skip master core */
+					 1,		/* skip initial core */
 					 0		/* wrap */);
 
 	rte_bitmap_set(em_conf->eth_core_mask, eth_core_id);
examples/ipsec-secgw/ipsec-secgw.c +2 -2
index f777ce2afe41..388f7f614ae0 100644
@@ -2917,8 +2917,8 @@ main(int32_t argc, char **argv)
 	check_all_ports_link_status(enabled_port_mask);
 
 	/* launch per-lcore init on every lcore */
-	rte_eal_mp_remote_launch(ipsec_launch_one_lcore, eh_conf, CALL_MASTER);
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	rte_eal_mp_remote_launch(ipsec_launch_one_lcore, eh_conf, CALL_INITIAL);
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
Signature · 1 line
2.26.2
#106 lore raw

PATCH v4 17/27 examples: replace reference to master lcore

In reply to Stephen Hemminger

Small changes in several examples to replace master_lcore with initial_lcore across multiple small examples.

---
 examples/eventdev_pipeline/main.c      |  2 +-
 examples/flow_classify/flow_classify.c |  2 +-
 examples/helloworld/main.c             |  6 +++---
 examples/ioat/ioatfwd.c                |  6 +++---
 examples/ip_fragmentation/main.c       |  4 ++--
 examples/ip_reassembly/main.c          |  4 ++--
 examples/ipv4_multicast/main.c         |  4 ++--
 examples/kni/main.c                    |  7 +++----
 examples/link_status_interrupt/main.c  |  8 ++++----
 examples/ntb/ntb_fwd.c                 | 14 +++++++-------
 examples/packet_ordering/main.c        | 22 +++++++++++-----------
 examples/rxtx_callbacks/main.c         |  2 +-
 examples/server_node_efd/server/main.c | 10 +++++-----
 examples/skeleton/basicfwd.c           |  2 +-
 examples/tep_termination/main.c        | 12 ++++++------
 examples/timer/main.c                  |  8 ++++----
 examples/vhost/main.c                  | 10 +++++-----
 examples/vmdq/main.c                   |  4 ++--
 examples/vmdq_dcb/main.c               |  6 +++---
 19 files changed, 66 insertions(+), 67 deletions(-)
examples/eventdev_pipeline/main.c +1 -1
index 21958269f743..91969ce039cf 100644
@@ -395,7 +395,7 @@ main(int argc, char **argv)
 	}
 
 	int worker_idx = 0;
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (lcore_id >= MAX_NUM_CORE)
 			break;
 
examples/flow_classify/flow_classify.c +1 -1
index 433e64d3f901..e8d23225c4b8 100644
@@ -850,7 +850,7 @@ main(int argc, char *argv[])
 		rte_exit(EXIT_FAILURE, "Failed to add rules\n");
 	}
 
-	/* Call lcore_main on the master core only. */
+	/* Call lcore_main on the initial core only. */
 	lcore_main(cls_app);
 
 	return 0;
examples/helloworld/main.c +3 -3
index 968045f1b042..029bee26cba2 100644
@@ -34,12 +34,12 @@ main(int argc, char **argv)
 	if (ret < 0)
 		rte_panic("Cannot init EAL\n");
 
-	/* call lcore_hello() on every slave lcore */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	/* call lcore_hello() on every worker lcore */
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		rte_eal_remote_launch(lcore_hello, NULL, lcore_id);
 	}
 
-	/* call it on master lcore too */
+	/* call it on initial lcore too */
 	lcore_hello(NULL);
 
 	rte_eal_mp_wait_lcore();
examples/ioat/ioatfwd.c +3 -3
index b66ee73bcec4..919c95e425b2 100644
@@ -520,7 +520,7 @@ tx_main_loop(void)
 			ioat_tx_port(&cfg.ports[i]);
 }
 
-/* Main rx and tx loop if only one slave lcore available */
+/* Main rx and tx loop if only one worker lcore available */
 static void
 rxtx_main_loop(void)
 {
@@ -984,7 +984,7 @@ main(int argc, char **argv)
 	cfg.nb_lcores = rte_lcore_count() - 1;
 	if (cfg.nb_lcores < 1)
 		rte_exit(EXIT_FAILURE,
-			"There should be at least one slave lcore.\n");
+			"There should be at least one worker lcore.\n");
 
 	if (copy_mode == COPY_MODE_IOAT_NUM)
 		assign_rawdevs();
@@ -992,7 +992,7 @@ main(int argc, char **argv)
 		assign_rings();
 
 	start_forwarding_cores();
-	/* master core prints stats while other cores forward */
+	/* initial core prints stats while other cores forward */
 	print_stats(argv[0]);
 
 	/* force_quit is true when we get here */
examples/ip_fragmentation/main.c +2 -2
index 4afb97109fed..13b9f3ca0b66 100644
@@ -1072,8 +1072,8 @@ main(int argc, char **argv)
 	check_all_ports_link_status(enabled_port_mask);
 
 	/* launch per-lcore init on every lcore */
-	rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER);
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL);
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
examples/ip_reassembly/main.c +2 -2
index 494d7ee77641..01d89eef2f70 100644
@@ -1201,8 +1201,8 @@ main(int argc, char **argv)
 	signal(SIGINT, signal_handler);
 
 	/* launch per-lcore init on every lcore */
-	rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER);
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL);
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
examples/ipv4_multicast/main.c +2 -2
index 7e255c35a301..52dee9f68bcf 100644
@@ -801,8 +801,8 @@ main(int argc, char **argv)
 		rte_exit(EXIT_FAILURE, "Cannot build the multicast hash\n");
 
 	/* launch per-lcore init on every lcore */
-	rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER);
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL);
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
examples/kni/main.c +3 -4
index f5d12a5b8676..fde7db45e657 100644
@@ -956,8 +956,7 @@ kni_alloc(uint16_t port_id)
 		conf.mbuf_size = MAX_PACKET_SZ;
 		/*
 		 * The first KNI device associated to a port
-		 * is the master, for multiple kernel thread
-		 * environment.
+		 * is special, for multiple kernel thread environment.
 		 */
 		if (i == 0) {
 			struct rte_kni_ops ops;
@@ -1105,8 +1104,8 @@ main(int argc, char** argv)
 			"Could not create link status thread!\n");
 
 	/* Launch per-lcore function on every lcore */
-	rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER);
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL);
+	RTE_LCORE_FOREACH_WORKER(i) {
 		if (rte_eal_wait_lcore(i) < 0)
 			return -1;
 	}
examples/link_status_interrupt/main.c +4 -4
index 9bbcadfcf8b9..e22c264fda71 100644
@@ -255,8 +255,8 @@ lsi_main_loop(void)
 				/* if timer has reached its timeout */
 				if (unlikely(timer_tsc >= (uint64_t) timer_period)) {
 
-					/* do this only on master core */
-					if (lcore_id == rte_get_master_lcore()) {
+					/* do this only on initial core */
+					if (lcore_id == rte_get_initial_lcore()) {
 						print_stats();
 						/* reset the timer */
 						timer_tsc = 0;
@@ -735,8 +735,8 @@ main(int argc, char **argv)
 	check_all_ports_link_status(nb_ports, lsi_enabled_port_mask);
 
 	/* launch per-lcore init on every lcore */
-	rte_eal_mp_remote_launch(lsi_launch_one_lcore, NULL, CALL_MASTER);
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	rte_eal_mp_remote_launch(lsi_launch_one_lcore, NULL, CALL_INITIAL);
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
examples/ntb/ntb_fwd.c +7 -7
index eba8ebf9fab0..c60b6f3f944b 100644
@@ -162,7 +162,7 @@ cmd_quit_parsed(__rte_unused void *parsed_result,
 	uint32_t lcore_id;
 
 	/* Stop transmission first. */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		conf = &fwd_lcore_conf[lcore_id];
 
 		if (!conf->nb_stream)
@@ -668,7 +668,7 @@ assign_stream_to_lcores(void)
 	uint8_t lcore_num, nb_extra;
 
 	lcore_num = rte_lcore_count();
-	/* Exclude master core */
+	/* Exclude initial core */
 	lcore_num--;
 
 	nb_streams = (fwd_mode == IOFWD) ? num_queues * 2 : num_queues;
@@ -678,7 +678,7 @@ assign_stream_to_lcores(void)
 	sm_id = 0;
 	i = 0;
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		conf = &fwd_lcore_conf[lcore_id];
 
 		if (i < nb_extra) {
@@ -697,7 +697,7 @@ assign_stream_to_lcores(void)
 	}
 
 	/* Print packet forwading config. */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		conf = &fwd_lcore_conf[lcore_id];
 
 		if (!conf->nb_stream)
@@ -765,7 +765,7 @@ start_pkt_fwd(void)
 	assign_stream_to_lcores();
 	in_test = 1;
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		conf = &fwd_lcore_conf[lcore_id];
 
 		if (!conf->nb_stream)
@@ -826,7 +826,7 @@ cmd_stop_parsed(__rte_unused void *parsed_result,
 	struct ntb_fwd_lcore_conf *conf;
 	uint32_t lcore_id;
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		conf = &fwd_lcore_conf[lcore_id];
 
 		if (!conf->nb_stream)
@@ -1074,7 +1074,7 @@ cmdline_parse_ctx_t main_ctx[] = {
 	NULL,
 };
 
-/* prompt function, called from main on MASTER lcore */
+/* prompt function, called from main on initial lcore */
 static void
 prompt(void)
 {
examples/packet_ordering/main.c +11 -11
index b397b318e651..bcf3cbf89af2 100644
@@ -348,10 +348,10 @@ print_stats(void)
 {
 	uint16_t i;
 	struct rte_eth_stats eth_stats;
-	unsigned int lcore_id, last_lcore_id, master_lcore_id, end_w_lcore_id;
+	unsigned int lcore_id, last_lcore_id, initial_lcore_id, end_w_lcore_id;
 
 	last_lcore_id   = get_last_lcore_id();
-	master_lcore_id = rte_get_master_lcore();
+	initial_lcore_id = rte_get_initial_lcore();
 	end_w_lcore_id  = get_previous_lcore_id(last_lcore_id);
 
 	printf("\nRX thread stats:\n");
@@ -363,7 +363,7 @@ print_stats(void)
 	for (lcore_id = 0; lcore_id <= end_w_lcore_id; lcore_id++) {
 		if (insight_worker
 			&& rte_lcore_is_enabled(lcore_id)
-			&& lcore_id != master_lcore_id) {
+			&& lcore_id != initial_lcore_id) {
 			printf("\nWorker thread stats on core [%u]:\n",
 					lcore_id);
 			printf(" - Pkts deqd from workers ring:		%"PRIu64"\n",
@@ -661,7 +661,7 @@ main(int argc, char **argv)
 {
 	int ret;
 	unsigned nb_ports;
-	unsigned int lcore_id, last_lcore_id, master_lcore_id;
+	unsigned int lcore_id, last_lcore_id, initial_lcore_id;
 	uint16_t port_id;
 	uint16_t nb_ports_available;
 	struct worker_thread_args worker_args = {NULL, NULL};
@@ -748,32 +748,32 @@ main(int argc, char **argv)
 	}
 
 	last_lcore_id   = get_last_lcore_id();
-	master_lcore_id = rte_get_master_lcore();
+	initial_lcore_id = rte_get_initial_lcore();
 
 	worker_args.ring_in  = rx_to_workers;
 	worker_args.ring_out = workers_to_tx;
 
-	/* Start worker_thread() on all the available slave cores but the last 1 */
+	/* Start worker_thread() on all the available worker cores but the last 1 */
 	for (lcore_id = 0; lcore_id <= get_previous_lcore_id(last_lcore_id); lcore_id++)
-		if (rte_lcore_is_enabled(lcore_id) && lcore_id != master_lcore_id)
+		if (rte_lcore_is_enabled(lcore_id) && lcore_id != initial_lcore_id)
 			rte_eal_remote_launch(worker_thread, (void *)&worker_args,
 					lcore_id);
 
 	if (disable_reorder) {
-		/* Start tx_thread() on the last slave core */
+		/* Start tx_thread() on the last worker core */
 		rte_eal_remote_launch((lcore_function_t *)tx_thread, workers_to_tx,
 				last_lcore_id);
 	} else {
 		send_args.ring_in = workers_to_tx;
-		/* Start send_thread() on the last slave core */
+		/* Start send_thread() on the last worker core */
 		rte_eal_remote_launch((lcore_function_t *)send_thread,
 				(void *)&send_args, last_lcore_id);
 	}
 
-	/* Start rx_thread() on the master core */
+	/* Start rx_thread() on the initial core */
 	rx_thread(rx_to_workers);
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
examples/rxtx_callbacks/main.c +1 -1
index 54d124b00bc9..562abb87d7ff 100644
@@ -302,7 +302,7 @@ main(int argc, char *argv[])
 		printf("\nWARNING: Too much enabled lcores - "
 			"App uses only 1 lcore\n");
 
-	/* call lcore_main on master core only */
+	/* call lcore_main on initial core only */
 	lcore_main();
 	return 0;
 }
examples/server_node_efd/server/main.c +5 -5
index 05f961cff5d0..912dcd06c70f 100644
@@ -95,7 +95,7 @@ get_printable_mac_addr(uint16_t port)
 /*
  * This function displays the recorded statistics for each port
  * and for each node. It uses ANSI terminal codes to clear
- * screen when called. It is called from a single non-master
+ * screen when called. It is called from a single worker
  * thread in the server process, when the process is run with more
  * than one lcore enabled.
  */
@@ -168,7 +168,7 @@ do_stats_display(void)
 }
 
 /*
- * The function called from each non-master lcore used by the process.
+ * The function called from each worker lcore used by the process.
  * The test_and_set function is used to randomly pick a single lcore on which
  * the code to display the statistics will run. Otherwise, the code just
  * repeatedly sleeps.
@@ -290,7 +290,7 @@ process_packets(uint32_t port_num __rte_unused, struct rte_mbuf *pkts[],
 }
 
 /*
- * Function called by the master lcore of the DPDK process.
+ * Function called by the initial lcore of the DPDK process.
  */
 static void
 do_packet_forwarding(void)
@@ -330,8 +330,8 @@ main(int argc, char *argv[])
 	/* clear statistics */
 	clear_stats();
 
-	/* put all other cores to sleep bar master */
-	rte_eal_mp_remote_launch(sleep_lcore, NULL, SKIP_MASTER);
+	/* put all other cores to sleep  */
+	rte_eal_mp_remote_launch(sleep_lcore, NULL, SKIP_INITIAL);
 
 	do_packet_forwarding();
 	return 0;
examples/skeleton/basicfwd.c +1 -1
index 72ba85fa1fe5..3062ac2f596c 100644
@@ -202,7 +202,7 @@ main(int argc, char *argv[])
 	if (rte_lcore_count() > 1)
 		printf("\nWARNING: Too many lcores enabled. Only 1 used.\n");
 
-	/* Call lcore_main on the master core only. */
+	/* Call lcore_main on the initial core only. */
 	lcore_main();
 
 	return 0;
examples/tep_termination/main.c +6 -6
index b9fffca020a9..55fb3335538f 100644
@@ -838,7 +838,7 @@ init_data_ll(void)
 {
 	int lcore;
 
-	RTE_LCORE_FOREACH_SLAVE(lcore) {
+	RTE_LCORE_FOREACH_WORKER(lcore) {
 		lcore_info[lcore].lcore_ll =
 			malloc(sizeof(struct lcore_ll_info));
 		if (lcore_info[lcore].lcore_ll == NULL) {
@@ -930,7 +930,7 @@ destroy_device(int vid)
 	rm_data_ll_entry(&ll_root_used, ll_main_dev_cur, ll_main_dev_last);
 
 	/* Set the dev_removal_flag on each lcore. */
-	RTE_LCORE_FOREACH_SLAVE(lcore) {
+	RTE_LCORE_FOREACH_WORKER(lcore) {
 		lcore_info[lcore].lcore_ll->dev_removal_flag =
 			REQUEST_DEV_REMOVAL;
 	}
@@ -941,7 +941,7 @@ destroy_device(int vid)
 	 * the device removed from the linked lists and that the devices
 	 * are no longer in use.
 	 */
-	RTE_LCORE_FOREACH_SLAVE(lcore) {
+	RTE_LCORE_FOREACH_WORKER(lcore) {
 		while (lcore_info[lcore].lcore_ll->dev_removal_flag
 			!= ACK_DEV_REMOVAL)
 			rte_pause();
@@ -1001,7 +1001,7 @@ new_device(int vid)
 	vdev->remove = 0;
 
 	/* Find a suitable lcore to add the device. */
-	RTE_LCORE_FOREACH_SLAVE(lcore) {
+	RTE_LCORE_FOREACH_WORKER(lcore) {
 		if (lcore_info[lcore].lcore_ll->device_num < device_num_min) {
 			device_num_min = lcore_info[lcore].lcore_ll->device_num;
 			core_add = lcore;
@@ -1207,7 +1207,7 @@ main(int argc, char *argv[])
 	}
 
 	/* Launch all data cores. */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		rte_eal_remote_launch(switch_worker,
 			mbuf_pool, lcore_id);
 	}
@@ -1231,7 +1231,7 @@ main(int argc, char *argv[])
 			"failed to start vhost driver.\n");
 	}
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id)
+	RTE_LCORE_FOREACH_WORKER(lcore_id)
 		rte_eal_wait_lcore(lcore_id);
 
 	return 0;
examples/timer/main.c +4 -4
index 0259022f104e..50a0f60951e2 100644
@@ -100,7 +100,7 @@ main(int argc, char **argv)
 	rte_timer_init(&timer0);
 	rte_timer_init(&timer1);
 
-	/* load timer0, every second, on master lcore, reloaded automatically */
+	/* load timer0, every second, on initial lcore, reloaded automatically */
 	hz = rte_get_timer_hz();
 	lcore_id = rte_lcore_id();
 	rte_timer_reset(&timer0, hz, PERIODICAL, lcore_id, timer0_cb, NULL);
@@ -109,12 +109,12 @@ main(int argc, char **argv)
 	lcore_id = rte_get_next_lcore(lcore_id, 0, 1);
 	rte_timer_reset(&timer1, hz/3, SINGLE, lcore_id, timer1_cb, NULL);
 
-	/* call lcore_mainloop() on every slave lcore */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	/* call lcore_mainloop() on every worker lcore */
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		rte_eal_remote_launch(lcore_mainloop, NULL, lcore_id);
 	}
 
-	/* call it on master lcore too */
+	/* call it on initial lcore too */
 	(void) lcore_mainloop(NULL);
 
 	return 0;
examples/vhost/main.c +5 -5
index 312829e8b930..012aa6706ca1 100644
@@ -1205,7 +1205,7 @@ destroy_device(int vid)
 
 
 	/* Set the dev_removal_flag on each lcore. */
-	RTE_LCORE_FOREACH_SLAVE(lcore)
+	RTE_LCORE_FOREACH_WORKER(lcore)
 		lcore_info[lcore].dev_removal_flag = REQUEST_DEV_REMOVAL;
 
 	/*
@@ -1213,7 +1213,7 @@ destroy_device(int vid)
 	 * we can be sure that they can no longer access the device removed
 	 * from the linked lists and that the devices are no longer in use.
 	 */
-	RTE_LCORE_FOREACH_SLAVE(lcore) {
+	RTE_LCORE_FOREACH_WORKER(lcore) {
 		while (lcore_info[lcore].dev_removal_flag != ACK_DEV_REMOVAL)
 			rte_pause();
 	}
@@ -1258,7 +1258,7 @@ new_device(int vid)
 	vdev->remove = 0;
 
 	/* Find a suitable lcore to add the device. */
-	RTE_LCORE_FOREACH_SLAVE(lcore) {
+	RTE_LCORE_FOREACH_WORKER(lcore) {
 		if (lcore_info[lcore].device_num < device_num_min) {
 			device_num_min = lcore_info[lcore].device_num;
 			core_add = lcore;
@@ -1507,7 +1507,7 @@ main(int argc, char *argv[])
 	}
 
 	/* Launch all data cores. */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id)
+	RTE_LCORE_FOREACH_WORKER(lcore_id)
 		rte_eal_remote_launch(switch_worker, NULL, lcore_id);
 
 	if (client_mode)
@@ -1568,7 +1568,7 @@ main(int argc, char *argv[])
 		}
 	}
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id)
+	RTE_LCORE_FOREACH_WORKER(lcore_id)
 		rte_eal_wait_lcore(lcore_id);
 
 	return 0;
examples/vmdq/main.c +2 -2
index d08826c868f8..25fb6fd62f1b 100644
@@ -656,8 +656,8 @@ main(int argc, char *argv[])
 	}
 
 	/* call lcore_main() on every lcore */
-	rte_eal_mp_remote_launch(lcore_main, NULL, CALL_MASTER);
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	rte_eal_mp_remote_launch(lcore_main, NULL, CALL_INITIAL);
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
examples/vmdq_dcb/main.c +3 -3
index f417b2fd9b91..e1c8ed0c381a 100644
@@ -702,12 +702,12 @@ main(int argc, char *argv[])
 			rte_exit(EXIT_FAILURE, "Cannot initialize network ports\n");
 	}
 
-	/* call lcore_main() on every slave lcore */
+	/* call lcore_main() on every worker lcore */
 	i = 0;
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		rte_eal_remote_launch(lcore_main, (void*)i++, lcore_id);
 	}
-	/* call on master too */
+	/* call on initial too */
 	(void) lcore_main((void*)i);
 
 	return 0;
Signature · 1 line
2.26.2
#108 lore raw

PATCH v4 18/27 app/test-pmd: change references to master/slave

In reply to Stephen Hemminger

Use new API and naming convention

---
 app/test-pmd/config.c     | 4 ++--
 app/test-pmd/parameters.c | 2 +-
 app/test-pmd/softnicfwd.c | 2 +-
 app/test-pmd/testpmd.c    | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)
app/test-pmd/config.c +2 -2
index a7112c998bdb..816d9e2064ef 100644
@@ -2649,9 +2649,9 @@ set_fwd_lcores_list(unsigned int *lcorelist, unsigned int nb_lc)
 			printf("lcore %u not enabled\n", lcore_cpuid);
 			return -1;
 		}
-		if (lcore_cpuid == rte_get_master_lcore()) {
+		if (lcore_cpuid == rte_get_initial_lcore()) {
 			printf("lcore %u cannot be masked on for running "
-			       "packet forwarding, which is the master lcore "
+			       "packet forwarding, which is the initial lcore "
 			       "and reserved for command line parsing only\n",
 			       lcore_cpuid);
 			return -1;
app/test-pmd/parameters.c +1 -1
index f761e14707bf..48aafa289367 100644
@@ -88,7 +88,7 @@ usage(char* progname)
 	printf("  --nb-ports=N: set the number of forwarding ports "
 	       "(1 <= N <= %d).\n", nb_ports);
 	printf("  --coremask=COREMASK: hexadecimal bitmask of cores running "
-	       "the packet forwarding test. The master lcore is reserved for "
+	       "the packet forwarding test. The initial lcore is reserved for "
 	       "command line parsing only, and cannot be masked on for "
 	       "packet forwarding.\n");
 	printf("  --portmask=PORTMASK: hexadecimal bitmask of ports used "
app/test-pmd/softnicfwd.c +1 -1
index e9d437364467..d773551845e4 100644
@@ -654,7 +654,7 @@ softnic_fwd_begin(portid_t pi)
 		if (!rte_lcore_is_enabled(lcore))
 			continue;
 
-		if (lcore == rte_get_master_lcore())
+		if (lcore == rte_get_initial_lcore())
 			continue;
 
 		if (fwd_core_present == 0) {
app/test-pmd/testpmd.c +2 -2
index 4989d22ca86c..a68ef351e37e 100644
@@ -83,7 +83,7 @@
 uint16_t verbose_level = 0; /**< Silent by default. */
 int testpmd_logtype; /**< Log type for testpmd logs */
 
-/* use master core for command line ? */
+/* use initial core for command line ? */
 uint8_t interactive = 0;
 uint8_t auto_start = 0;
 uint8_t tx_first;
@@ -552,7 +552,7 @@ set_default_fwd_lcores_config(void)
 			}
 			socket_ids[num_sockets++] = sock_num;
 		}
-		if (i == rte_get_master_lcore())
+		if (i == rte_get_initial_lcore())
 			continue;
 		fwd_lcores_cpuids[nb_lc++] = i;
 	}
Signature · 1 line
2.26.2
Acked-by on v4 18/27
#109 lore raw

Re: [dpdk-dev] [PATCH v4 18/27] app/test-pmd: change references to master/slave

Quoted 10 lines · Stephen Hemminger

Use new API and naming convention

---
  app/test-pmd/config.c     | 4 ++--
  app/test-pmd/parameters.c | 2 +-
  app/test-pmd/softnicfwd.c | 2 +-
  app/test-pmd/testpmd.c    | 4 ++--
  4 files changed, 6 insertions(+), 6 deletions(-)

I don't have softnicfwd.c in my repo, where is that?

Otherwise,

Signature · 2 lines
Thanks,
Anatoly
#110 lore raw

PATCH v4 19/27 test-eventdev: replace references to slave with worker lcores

In reply to Stephen Hemminger

Use new API terminolgy

---
 app/test-eventdev/evt_options.c          |  2 +-
 app/test-eventdev/test_order_common.c    | 12 ++++++------
 app/test-eventdev/test_perf_common.c     | 16 ++++++++--------
 app/test-eventdev/test_pipeline_common.c |  8 ++++----
 4 files changed, 19 insertions(+), 19 deletions(-)
app/test-eventdev/evt_options.c +1 -1
index c60b61a904b0..e09a0592673f 100644
@@ -438,7 +438,7 @@ evt_options_dump(struct evt_options *opt)
 	evt_dump("verbose_level", "%d", opt->verbose_level);
 	evt_dump("socket_id", "%d", opt->socket_id);
 	evt_dump("pool_sz", "%d", opt->pool_sz);
-	evt_dump("master lcore", "%d", rte_get_master_lcore());
+	evt_dump("initial lcore", "%d", rte_get_initial_lcore());
 	evt_dump("nb_pkts", "%"PRIu64, opt->nb_pkts);
 	evt_dump("nb_timers", "%"PRIu64, opt->nb_timers);
 	evt_dump_begin("available lcores");
app/test-eventdev/test_order_common.c +6 -6
index 4190f9ade82b..4082e2f210f8 100644
@@ -74,15 +74,15 @@ order_opt_check(struct evt_options *opt)
 		return -1;
 	}
 
-	/* 1 producer + N workers + 1 master */
+	/* 1 producer + N workers + 1 initial lcore */
 	if (rte_lcore_count() < 3) {
 		evt_err("test need minimum 3 lcores");
 		return -1;
 	}
 
 	/* Validate worker lcores */
-	if (evt_lcores_has_overlap(opt->wlcores, rte_get_master_lcore())) {
-		evt_err("worker lcores overlaps with master lcore");
+	if (evt_lcores_has_overlap(opt->wlcores, rte_get_initial_lcore())) {
+		evt_err("worker lcores overlaps with initial lcore");
 		return -1;
 	}
 
@@ -117,8 +117,8 @@ order_opt_check(struct evt_options *opt)
 	}
 
 	/* Validate producer lcore */
-	if (plcore == (int)rte_get_master_lcore()) {
-		evt_err("producer lcore and master lcore should be different");
+	if (plcore == (int)rte_get_initial_lcore()) {
+		evt_err("producer lcore and initial lcore should be different");
 		return -1;
 	}
 	if (!rte_lcore_is_enabled(plcore)) {
@@ -245,7 +245,7 @@ order_launch_lcores(struct evt_test *test, struct evt_options *opt,
 
 	int wkr_idx = 0;
 	/* launch workers */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (!(opt->wlcores[lcore_id]))
 			continue;
 
app/test-eventdev/test_perf_common.c +8 -8
index b3af4bfecaff..752603803b25 100644
@@ -254,7 +254,7 @@ perf_launch_lcores(struct evt_test *test, struct evt_options *opt,
 
 	int port_idx = 0;
 	/* launch workers */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (!(opt->wlcores[lcore_id]))
 			continue;
 
@@ -268,7 +268,7 @@ perf_launch_lcores(struct evt_test *test, struct evt_options *opt,
 	}
 
 	/* launch producers */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (!(opt->plcores[lcore_id]))
 			continue;
 
@@ -541,8 +541,8 @@ perf_opt_check(struct evt_options *opt, uint64_t nb_queues)
 {
 	unsigned int lcores;
 
-	/* N producer + N worker + 1 master when producer cores are used
-	 * Else N worker + 1 master when Rx adapter is used
+	/* N producer + N worker + 1 initial lcore when producer cores are used
+	 * Else N worker + 1 initial lcore when Rx adapter is used
 	 */
 	lcores = opt->prod_type == EVT_PROD_TYPE_SYNT ? 3 : 2;
 
@@ -552,8 +552,8 @@ perf_opt_check(struct evt_options *opt, uint64_t nb_queues)
 	}
 
 	/* Validate worker lcores */
-	if (evt_lcores_has_overlap(opt->wlcores, rte_get_master_lcore())) {
-		evt_err("worker lcores overlaps with master lcore");
+	if (evt_lcores_has_overlap(opt->wlcores, rte_get_initial_lcore())) {
+		evt_err("worker lcores overlaps with initial lcore");
 		return -1;
 	}
 	if (evt_lcores_has_overlap_multi(opt->wlcores, opt->plcores)) {
@@ -573,8 +573,8 @@ perf_opt_check(struct evt_options *opt, uint64_t nb_queues)
 			opt->prod_type == EVT_PROD_TYPE_EVENT_TIMER_ADPTR) {
 		/* Validate producer lcores */
 		if (evt_lcores_has_overlap(opt->plcores,
-					rte_get_master_lcore())) {
-			evt_err("producer lcores overlaps with master lcore");
+					rte_get_initial_lcore())) {
+			evt_err("producer lcores overlaps with initial lcore");
 			return -1;
 		}
 		if (evt_has_disabled_lcore(opt->plcores)) {
app/test-eventdev/test_pipeline_common.c +4 -4
index 17088b1b48e4..00ec3dad6bf7 100644
@@ -60,7 +60,7 @@ pipeline_launch_lcores(struct evt_test *test, struct evt_options *opt,
 
 	int port_idx = 0;
 	/* launch workers */
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (!(opt->wlcores[lcore_id]))
 			continue;
 
@@ -107,7 +107,7 @@ pipeline_opt_check(struct evt_options *opt, uint64_t nb_queues)
 {
 	unsigned int lcores;
 	/*
-	 * N worker + 1 master
+	 * N worker + 1 initial lcore
 	 */
 	lcores = 2;
 
@@ -129,8 +129,8 @@ pipeline_opt_check(struct evt_options *opt, uint64_t nb_queues)
 	}
 
 	/* Validate worker lcores */
-	if (evt_lcores_has_overlap(opt->wlcores, rte_get_master_lcore())) {
-		evt_err("worker lcores overlaps with master lcore");
+	if (evt_lcores_has_overlap(opt->wlcores, rte_get_initial_lcore())) {
+		evt_err("worker lcores overlaps with initial lcore");
 		return -1;
 	}
 	if (evt_has_disabled_lcore(opt->wlcores)) {
Signature · 1 line
2.26.2
#112 lore raw

PATCH v4 20/27 app/test: replace refernces to master/slave

In reply to Stephen Hemminger

Use initial and worker when referring to lcores

---
 app/test/autotest_test_funcs.py  |   2 +-
 app/test/test.c                  |   2 +-
 app/test/test_atomic.c           |  26 ++++----
 app/test/test_barrier.c          |   2 +-
 app/test/test_cryptodev.c        |  16 ++---
 app/test/test_distributor.c      |   8 +--
 app/test/test_distributor_perf.c |  11 ++--
 app/test/test_eal_flags.c        |  32 ++++-----
 app/test/test_efd.c              |   2 +-
 app/test/test_efd_perf.c         |   2 +-
 app/test/test_func_reentrancy.c  |  25 ++++----
 app/test/test_hash_multiwriter.c |   4 +-
 app/test/test_hash_readwrite.c   |  38 +++++------
 app/test/test_kni.c              |  16 ++---
 app/test/test_malloc.c           |  12 ++--
 app/test/test_mbuf.c             |  36 +++++------
 app/test/test_mcslock.c          |  28 ++++----
 app/test/test_mempool_perf.c     |  10 +--
 app/test/test_mp_secondary.c     |   2 +-
 app/test/test_pdump.c            |   2 +-
 app/test/test_per_lcore.c        |  14 ++--
 app/test/test_pmd_perf.c         |  20 +++---
 app/test/test_rcu_qsbr.c         |   2 +-
 app/test/test_rcu_qsbr_perf.c    |   2 +-
 app/test/test_ring_perf.c        |  14 ++--
 app/test/test_ring_stress_impl.h |  10 +--
 app/test/test_rwlock.c           |  28 ++++----
 app/test/test_service_cores.c    |  10 +--
 app/test/test_spinlock.c         |  34 +++++-----
 app/test/test_stack.c            |   2 +-
 app/test/test_stack_perf.c       |   6 +-
 app/test/test_ticketlock.c       |  36 +++++------
 app/test/test_timer.c            | 107 +++++++++++++++----------------
 app/test/test_timer_racecond.c   |  27 ++++----
 app/test/test_timer_secondary.c  |   2 +-
 app/test/test_trace_perf.c       |   4 +-
 36 files changed, 297 insertions(+), 297 deletions(-)
app/test/autotest_test_funcs.py +1 -1
index 26688b71323e..23d530f1e18b 100644
@@ -102,7 +102,7 @@ def rwlock_autotest(child, test_name):
         index = child.expect(["Test OK",
                               "Test Failed",
                               "Hello from core ([0-9]*) !",
-                              "Global write lock taken on master "
+                              "Global write lock taken on initial lcore "
                               "core ([0-9]*)",
                               pexpect.TIMEOUT], timeout=10)
         # ok
app/test/test.c +1 -1
index 94d26ab1f67c..a9fce18ca73e 100644
@@ -58,7 +58,7 @@ do_recursive_call(void)
 #endif
 #endif
 			{ "test_missing_c_flag", no_action },
-			{ "test_master_lcore_flag", no_action },
+			{ "test_initial_lcore_flag", no_action },
 			{ "test_invalid_n_flag", no_action },
 			{ "test_no_hpet_flag", no_action },
 			{ "test_whitelist_flag", no_action },
app/test/test_atomic.c +13 -13
index 214452e54399..88c3639d759d 100644
@@ -456,7 +456,7 @@ test_atomic(void)
 
 	printf("usual inc/dec/add/sub functions\n");
 
-	rte_eal_mp_remote_launch(test_atomic_usual, NULL, SKIP_MASTER);
+	rte_eal_mp_remote_launch(test_atomic_usual, NULL, SKIP_INITIAL);
 	rte_atomic32_set(&synchro, 1);
 	rte_eal_mp_wait_lcore();
 	rte_atomic32_set(&synchro, 0);
@@ -482,7 +482,7 @@ test_atomic(void)
 	rte_atomic32_set(&a32, 0);
 	rte_atomic16_set(&a16, 0);
 	rte_atomic64_set(&count, 0);
-	rte_eal_mp_remote_launch(test_atomic_tas, NULL, SKIP_MASTER);
+	rte_eal_mp_remote_launch(test_atomic_tas, NULL, SKIP_INITIAL);
 	rte_atomic32_set(&synchro, 1);
 	rte_eal_mp_wait_lcore();
 	rte_atomic32_set(&synchro, 0);
@@ -499,7 +499,7 @@ test_atomic(void)
 	rte_atomic16_set(&a16, 0);
 	rte_atomic64_set(&count, 0);
 	rte_eal_mp_remote_launch(test_atomic_addsub_and_return, NULL,
-				 SKIP_MASTER);
+				 SKIP_INITIAL);
 	rte_atomic32_set(&synchro, 1);
 	rte_eal_mp_wait_lcore();
 	rte_atomic32_set(&synchro, 0);
@@ -510,8 +510,8 @@ test_atomic(void)
 	}
 
 	/*
-	 * Set a64, a32 and a16 with the same value of minus "number of slave
-	 * lcores", launch all slave lcores to atomically increase by one and
+	 * Set a64, a32 and a16 with the same value of minus "number of worker
+	 * lcores", launch all worker lcores to atomically increase by one and
 	 * test them respectively.
 	 * Each lcore should have only one chance to increase a64 by one and
 	 * then check if it is equal to 0, but there should be only one lcore
@@ -519,7 +519,7 @@ test_atomic(void)
 	 * Then a variable of "count", initialized to zero, is increased by
 	 * one if a64, a32 or a16 is 0 after being increased and tested
 	 * atomically.
-	 * We can check if "count" is finally equal to 3 to see if all slave
+	 * We can check if "count" is finally equal to 3 to see if all worker
 	 * lcores performed "atomic inc and test" right.
 	 */
 	printf("inc and test\n");
@@ -533,7 +533,7 @@ test_atomic(void)
 	rte_atomic64_set(&a64, (int64_t)(1 - (int64_t)rte_lcore_count()));
 	rte_atomic32_set(&a32, (int32_t)(1 - (int32_t)rte_lcore_count()));
 	rte_atomic16_set(&a16, (int16_t)(1 - (int16_t)rte_lcore_count()));
-	rte_eal_mp_remote_launch(test_atomic_inc_and_test, NULL, SKIP_MASTER);
+	rte_eal_mp_remote_launch(test_atomic_inc_and_test, NULL, SKIP_INITIAL);
 	rte_atomic32_set(&synchro, 1);
 	rte_eal_mp_wait_lcore();
 	rte_atomic32_clear(&synchro);
@@ -544,7 +544,7 @@ test_atomic(void)
 	}
 
 	/*
-	 * Same as above, but this time we set the values to "number of slave
+	 * Same as above, but this time we set the values to "number of worker
 	 * lcores", and decrement instead of increment.
 	 */
 	printf("dec and test\n");
@@ -555,7 +555,7 @@ test_atomic(void)
 	rte_atomic64_set(&a64, (int64_t)(rte_lcore_count() - 1));
 	rte_atomic32_set(&a32, (int32_t)(rte_lcore_count() - 1));
 	rte_atomic16_set(&a16, (int16_t)(rte_lcore_count() - 1));
-	rte_eal_mp_remote_launch(test_atomic_dec_and_test, NULL, SKIP_MASTER);
+	rte_eal_mp_remote_launch(test_atomic_dec_and_test, NULL, SKIP_INITIAL);
 	rte_atomic32_set(&synchro, 1);
 	rte_eal_mp_wait_lcore();
 	rte_atomic32_clear(&synchro);
@@ -569,10 +569,10 @@ test_atomic(void)
 	/*
 	 * This case tests the functionality of rte_atomic128_cmp_exchange
 	 * API. It calls rte_atomic128_cmp_exchange with four kinds of memory
-	 * models successively on each slave core. Once each 128-bit atomic
+	 * models successively on each worker core. Once each 128-bit atomic
 	 * compare and swap operation is successful, it updates the global
 	 * 128-bit counter by 2 for the first 64-bit and 1 for the second
-	 * 64-bit. Each slave core iterates this test N times.
+	 * 64-bit. Each worker core iterates this test N times.
 	 * At the end of test, verify whether the first 64-bits of the 128-bit
 	 * counter and the second 64bits is differ by the total iterations. If
 	 * it is, the test passes.
@@ -585,7 +585,7 @@ test_atomic(void)
 	count128.val[1] = 0;
 
 	rte_eal_mp_remote_launch(test_atomic128_cmp_exchange, NULL,
-				 SKIP_MASTER);
+				 SKIP_INITIAL);
 	rte_atomic32_set(&synchro, 1);
 	rte_eal_mp_wait_lcore();
 	rte_atomic32_clear(&synchro);
@@ -619,7 +619,7 @@ test_atomic(void)
 	token64 = ((uint64_t)get_crc8(&t.u8[0], sizeof(token64) - 1) << 56)
 		| (t.u64 & 0x00ffffffffffffff);
 
-	rte_eal_mp_remote_launch(test_atomic_exchange, NULL, SKIP_MASTER);
+	rte_eal_mp_remote_launch(test_atomic_exchange, NULL, SKIP_INITIAL);
 	rte_atomic32_set(&synchro, 1);
 	rte_eal_mp_wait_lcore();
 	rte_atomic32_clear(&synchro);
app/test/test_barrier.c +1 -1
index 43b5f6232c6d..a27a4b0ae06f 100644
@@ -236,7 +236,7 @@ plock_test(uint64_t iter, enum plock_use_type utype)
 
 	/* test phase - start and wait for completion on each active lcore */
 
-	rte_eal_mp_remote_launch(plock_test1_lcore, lpt, CALL_MASTER);
+	rte_eal_mp_remote_launch(plock_test1_lcore, lpt, CALL_INITIAL);
 	rte_eal_mp_wait_lcore();
 
 	/* validation phase - make sure that shared and local data match */
app/test/test_cryptodev.c +8 -8
index 8f631468b740..2ebc5c6ac806 100644
@@ -474,29 +474,29 @@ testsuite_setup(void)
 	char vdev_args[VDEV_ARGS_SIZE] = {""};
 	char temp_str[VDEV_ARGS_SIZE] = {"mode=multi-core,"
 		"ordering=enable,name=cryptodev_test_scheduler,corelist="};
-	uint16_t slave_core_count = 0;
+	uint16_t worker_core_count = 0;
 	uint16_t socket_id = 0;
 
 	if (gbl_driver_id == rte_cryptodev_driver_id_get(
 			RTE_STR(CRYPTODEV_NAME_SCHEDULER_PMD))) {
 
-		/* Identify the Slave Cores
-		 * Use 2 slave cores for the device args
+		/* Identify the Worker Cores
+		 * Use 2 worker cores for the device args
 		 */
-		RTE_LCORE_FOREACH_SLAVE(i) {
-			if (slave_core_count > 1)
+		RTE_LCORE_FOREACH_WORKER(i) {
+			if (worker_core_count > 1)
 				break;
 			snprintf(vdev_args, sizeof(vdev_args),
 					"%s%d", temp_str, i);
 			strcpy(temp_str, vdev_args);
 			strlcat(temp_str, ";", sizeof(temp_str));
-			slave_core_count++;
+			worker_core_count++;
 			socket_id = rte_lcore_to_socket_id(i);
 		}
-		if (slave_core_count != 2) {
+		if (worker_core_count != 2) {
 			RTE_LOG(ERR, USER1,
 				"Cryptodev scheduler test require at least "
-				"two slave cores to run. "
+				"two worker cores to run. "
 				"Please use the correct coremask.\n");
 			return TEST_FAILED;
 		}
app/test/test_distributor.c +4 -4
index ba1f81cf8d19..ebc415953872 100644
@@ -654,13 +654,13 @@ test_distributor(void)
 					sizeof(worker_params.name));
 
 		rte_eal_mp_remote_launch(handle_work,
-				&worker_params, SKIP_MASTER);
+				&worker_params, SKIP_INITIAL);
 		if (sanity_test(&worker_params, p) < 0)
 			goto err;
 		quit_workers(&worker_params, p);
 
 		rte_eal_mp_remote_launch(handle_work_with_free_mbufs,
-				&worker_params, SKIP_MASTER);
+				&worker_params, SKIP_INITIAL);
 		if (sanity_test_with_mbuf_alloc(&worker_params, p) < 0)
 			goto err;
 		quit_workers(&worker_params, p);
@@ -668,7 +668,7 @@ test_distributor(void)
 		if (rte_lcore_count() > 2) {
 			rte_eal_mp_remote_launch(handle_work_for_shutdown_test,
 					&worker_params,
-					SKIP_MASTER);
+					SKIP_INITIAL);
 			if (sanity_test_with_worker_shutdown(&worker_params,
 					p) < 0)
 				goto err;
@@ -676,7 +676,7 @@ test_distributor(void)
 
 			rte_eal_mp_remote_launch(handle_work_for_shutdown_test,
 					&worker_params,
-					SKIP_MASTER);
+					SKIP_INITIAL);
 			if (test_flush_with_worker_shutdown(&worker_params,
 					p) < 0)
 				goto err;
app/test/test_distributor_perf.c +5 -6
index f153bcf9bd87..58ac3639dd83 100644
@@ -53,11 +53,10 @@ time_cache_line_switch(void)
 {
 	/* allocate a full cache line for data, we use only first byte of it */
 	uint64_t data[RTE_CACHE_LINE_SIZE*3 / sizeof(uint64_t)];
-
-	unsigned i, slaveid = rte_get_next_lcore(rte_lcore_id(), 0, 0);
+	unsigned int i, workerid = rte_get_next_lcore(rte_lcore_id(), 0, 0);
 	volatile uint64_t *pdata = &data[0];
 	*pdata = 1;
-	rte_eal_remote_launch((lcore_function_t *)flip_bit, &data[0], slaveid);
+	rte_eal_remote_launch((lcore_function_t *)flip_bit, &data[0], workerid);
 	while (*pdata)
 		rte_pause();
 
@@ -72,7 +71,7 @@ time_cache_line_switch(void)
 	while (*pdata)
 		rte_pause();
 	*pdata = 2;
-	rte_eal_wait_lcore(slaveid);
+	rte_eal_wait_lcore(workerid);
 	printf("==== Cache line switch test ===\n");
 	printf("Time for %u iterations = %"PRIu64" ticks\n", (1<<ITER_POWER_CL),
 			end_time-start_time);
@@ -251,13 +250,13 @@ test_distributor_perf(void)
 	}
 
 	printf("=== Performance test of distributor (single mode) ===\n");
-	rte_eal_mp_remote_launch(handle_work, ds, SKIP_MASTER);
+	rte_eal_mp_remote_launch(handle_work, ds, SKIP_INITIAL);
 	if (perf_test(ds, p) < 0)
 		return -1;
 	quit_workers(ds, p);
 
 	printf("=== Performance test of distributor (burst mode) ===\n");
-	rte_eal_mp_remote_launch(handle_work, db, SKIP_MASTER);
+	rte_eal_mp_remote_launch(handle_work, db, SKIP_INITIAL);
 	if (perf_test(db, p) < 0)
 		return -1;
 	quit_workers(db, p);
app/test/test_eal_flags.c +16 -16
index 4ee809e3db2e..5598fdf0f433 100644
@@ -596,10 +596,10 @@ test_missing_c_flag(void)
 }
 
 /*
- * Test --master-lcore option with matching coremask
+ * Test --initial-lcore option with matching coremask
  */
 static int
-test_master_lcore_flag(void)
+test_initial_lcore_flag(void)
 {
 #ifdef RTE_EXEC_ENV_FREEBSD
 	/* BSD target doesn't support prefixes at this point */
@@ -616,34 +616,34 @@ test_master_lcore_flag(void)
 	if (!rte_lcore_is_enabled(0) || !rte_lcore_is_enabled(1))
 		return TEST_SKIPPED;
 
-	/* --master-lcore flag but no value */
+	/* --initial-lcore flag but no value */
 	const char *argv1[] = { prgname, prefix, mp_flag,
-				"-c", "3", "--master-lcore"};
-	/* --master-lcore flag with invalid value */
+				"-c", "3", "--initial-lcore"};
+	/* --initial-lcore flag with invalid value */
 	const char *argv2[] = { prgname, prefix, mp_flag,
-				"-c", "3", "--master-lcore", "-1"};
+				"-c", "3", "--initial-lcore", "-1"};
 	const char *argv3[] = { prgname, prefix, mp_flag,
-				"-c", "3", "--master-lcore", "X"};
-	/* master lcore not in coremask */
+				"-c", "3", "--initial-lcore", "X"};
+	/* initial lcore not in coremask */
 	const char *argv4[] = { prgname, prefix, mp_flag,
-				"-c", "3", "--master-lcore", "2"};
+				"-c", "3", "--initial-lcore", "2"};
 	/* valid value */
 	const char *argv5[] = { prgname, prefix, mp_flag,
-				"-c", "3", "--master-lcore", "1"};
+				"-c", "3", "--initial-lcore", "1"};
 	/* valid value set before coremask */
 	const char *argv6[] = { prgname, prefix, mp_flag,
-				"--master-lcore", "1", "-c", "3"};
+				"--initial-lcore", "1", "-c", "3"};
 
 	if (launch_proc(argv1) == 0
 			|| launch_proc(argv2) == 0
 			|| launch_proc(argv3) == 0
 			|| launch_proc(argv4) == 0) {
-		printf("Error - process ran without error with wrong --master-lcore\n");
+		printf("Error - process ran without error with wrong --initial-lcore\n");
 		return -1;
 	}
 	if (launch_proc(argv5) != 0
 			|| launch_proc(argv6) != 0) {
-		printf("Error - process did not run ok with valid --master-lcore\n");
+		printf("Error - process did not run ok with valid --initial-lcore\n");
 		return -1;
 	}
 	return 0;
@@ -1465,9 +1465,9 @@ test_eal_flags(void)
 		return ret;
 	}
 
-	ret = test_master_lcore_flag();
+	ret = test_initial_lcore_flag();
 	if (ret < 0) {
-		printf("Error in test_master_lcore_flag()\n");
+		printf("Error in test_initial_lcore_flag()\n");
 		return ret;
 	}
 
@@ -1539,7 +1539,7 @@ REGISTER_TEST_COMMAND(eal_flags_autotest, test_eal_flags);
 
 /* subtests used in meson for CI */
 REGISTER_TEST_COMMAND(eal_flags_c_opt_autotest, test_missing_c_flag);
-REGISTER_TEST_COMMAND(eal_flags_master_opt_autotest, test_master_lcore_flag);
+REGISTER_TEST_COMMAND(eal_flags_master_opt_autotest, test_initial_lcore_flag);
 REGISTER_TEST_COMMAND(eal_flags_n_opt_autotest, test_invalid_n_flag);
 REGISTER_TEST_COMMAND(eal_flags_hpet_autotest, test_no_hpet_flag);
 REGISTER_TEST_COMMAND(eal_flags_no_huge_autotest, test_no_huge_flag);
app/test/test_efd.c +1 -1
index e3e5e30ea60b..0c15d157b681 100644
@@ -100,7 +100,7 @@ static inline uint8_t efd_get_all_sockets_bitmask(void)
 {
 	uint8_t all_cpu_sockets_bitmask = 0;
 	unsigned int i;
-	unsigned int next_lcore = rte_get_master_lcore();
+	unsigned int next_lcore = rte_get_initial_lcore();
 	const int val_true = 1, val_false = 0;
 	for (i = 0; i < rte_lcore_count(); i++) {
 		all_cpu_sockets_bitmask |= 1 << rte_lcore_to_socket_id(next_lcore);
app/test/test_efd_perf.c +1 -1
index d47622d5cafd..5b823a23f6ea 100644
@@ -33,7 +33,7 @@ static inline uint8_t efd_get_all_sockets_bitmask(void)
 {
 	uint8_t all_cpu_sockets_bitmask = 0;
 	unsigned int i;
-	unsigned int next_lcore = rte_get_master_lcore();
+	unsigned int next_lcore = rte_get_initial_lcore();
 	const int val_true = 1, val_false = 0;
 	for (i = 0; i < rte_lcore_count(); i++) {
 		all_cpu_sockets_bitmask |= 1 << rte_lcore_to_socket_id(next_lcore);
app/test/test_func_reentrancy.c +13 -12
index f5ddd03d7670..3eec81ff769e 100644
@@ -57,10 +57,11 @@ typedef void (*case_clean_t)(unsigned lcore_id);
 static rte_atomic32_t obj_count = RTE_ATOMIC32_INIT(0);
 static rte_atomic32_t synchro = RTE_ATOMIC32_INIT(0);
 
-#define WAIT_SYNCHRO_FOR_SLAVES()   do{ \
-	if (lcore_self != rte_get_master_lcore())                  \
-		while (rte_atomic32_read(&synchro) == 0);        \
-} while(0)
+#define WAIT_SYNCHRO_FOR_WORKERS()					\
+	do {								\
+		if (lcore_self != rte_get_initial_lcore())		\
+			while (rte_atomic32_read(&synchro) == 0);	\
+	} while(0)
 
 /*
  * rte_eal_init only init once
@@ -70,7 +71,7 @@ test_eal_init_once(__rte_unused void *arg)
 {
 	unsigned lcore_self =  rte_lcore_id();
 
-	WAIT_SYNCHRO_FOR_SLAVES();
+	WAIT_SYNCHRO_FOR_WORKERS();
 
 	rte_atomic32_set(&obj_count, 1); /* silent the check in the caller */
 	if (rte_eal_init(0, NULL) != -1)
@@ -106,7 +107,7 @@ ring_create_lookup(__rte_unused void *arg)
 	char ring_name[MAX_STRING_SIZE];
 	int i;
 
-	WAIT_SYNCHRO_FOR_SLAVES();
+	WAIT_SYNCHRO_FOR_WORKERS();
 
 	/* create the same ring simultaneously on all threads */
 	for (i = 0; i < MAX_ITER_ONCE; i++) {
@@ -166,7 +167,7 @@ mempool_create_lookup(__rte_unused void *arg)
 	char mempool_name[MAX_STRING_SIZE];
 	int i;
 
-	WAIT_SYNCHRO_FOR_SLAVES();
+	WAIT_SYNCHRO_FOR_WORKERS();
 
 	/* create the same mempool simultaneously on all threads */
 	for (i = 0; i < MAX_ITER_ONCE; i++) {
@@ -232,7 +233,7 @@ hash_create_free(__rte_unused void *arg)
 		.socket_id = 0,
 	};
 
-	WAIT_SYNCHRO_FOR_SLAVES();
+	WAIT_SYNCHRO_FOR_WORKERS();
 
 	/* create the same hash simultaneously on all threads */
 	hash_params.name = "fr_test_once";
@@ -296,7 +297,7 @@ fbk_create_free(__rte_unused void *arg)
 		.init_val = RTE_FBK_HASH_INIT_VAL_DEFAULT,
 	};
 
-	WAIT_SYNCHRO_FOR_SLAVES();
+	WAIT_SYNCHRO_FOR_WORKERS();
 
 	/* create the same fbk hash table simultaneously on all threads */
 	fbk_params.name = "fr_test_once";
@@ -359,7 +360,7 @@ lpm_create_free(__rte_unused void *arg)
 	char lpm_name[MAX_STRING_SIZE];
 	int i;
 
-	WAIT_SYNCHRO_FOR_SLAVES();
+	WAIT_SYNCHRO_FOR_WORKERS();
 
 	/* create the same lpm simultaneously on all threads */
 	for (i = 0; i < MAX_ITER_ONCE; i++) {
@@ -430,7 +431,7 @@ launch_test(struct test_case *pt_case)
 	rte_atomic32_set(&obj_count, 0);
 	rte_atomic32_set(&synchro, 0);
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (cores == 1)
 			break;
 		cores--;
@@ -443,7 +444,7 @@ launch_test(struct test_case *pt_case)
 		ret = -1;
 
 	cores = cores_save;
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (cores == 1)
 			break;
 		cores--;
app/test/test_hash_multiwriter.c +2 -2
index 46ab45f82a99..5c8adcb3667c 100644
@@ -64,7 +64,7 @@ test_hash_multiwriter_worker(void *arg)
 
 	/*
 	 * Calculate offset for entries based on the position of the
-	 * logical core, from the master core (not counting not enabled cores)
+	 * logical core, from the initial core (not counting not enabled cores)
 	 */
 	offset = pos_core * tbl_multiwriter_test_params.nb_tsx_insertion;
 
@@ -194,7 +194,7 @@ test_hash_multiwriter(void)
 
 	/* Fire all threads. */
 	rte_eal_mp_remote_launch(test_hash_multiwriter_worker,
-				 enabled_core_ids, CALL_MASTER);
+				 enabled_core_ids, CALL_INITIAL);
 	rte_eal_mp_wait_lcore();
 
 	count = rte_hash_count(handle);
app/test/test_hash_readwrite.c +19 -19
index 73333dff1392..9d3ffdc06abe 100644
@@ -25,7 +25,7 @@
 #define NUM_TEST 3
 unsigned int core_cnt[NUM_TEST] = {2, 4, 8};
 
-unsigned int slave_core_ids[RTE_MAX_LCORE];
+unsigned int worker_core_ids[RTE_MAX_LCORE];
 struct perf {
 	uint32_t single_read;
 	uint32_t single_write;
@@ -65,7 +65,7 @@ test_hash_readwrite_worker(__rte_unused void *arg)
 	ret = rte_malloc(NULL, sizeof(int) *
 				tbl_rw_test_param.num_insert, 0);
 	for (i = 0; i < rte_lcore_count(); i++) {
-		if (slave_core_ids[i] == lcore_id)
+		if (worker_core_ids[i] == lcore_id)
 			break;
 	}
 	offset = tbl_rw_test_param.num_insert * i;
@@ -206,7 +206,7 @@ test_hash_readwrite_functional(int use_htm, int use_rw_lf, int use_ext)
 	uint32_t duplicated_keys = 0;
 	uint32_t lost_keys = 0;
 	int use_jhash = 1;
-	int slave_cnt = rte_lcore_count() - 1;
+	int worker_cnt = rte_lcore_count() - 1;
 	uint32_t tot_insert = 0;
 
 	rte_atomic64_init(&gcycles);
@@ -224,11 +224,11 @@ test_hash_readwrite_functional(int use_htm, int use_rw_lf, int use_ext)
 		tot_insert = TOTAL_INSERT;
 
 	tbl_rw_test_param.num_insert =
-		tot_insert / slave_cnt;
+		tot_insert / worker_cnt;
 
 	tbl_rw_test_param.rounded_tot_insert =
 		tbl_rw_test_param.num_insert
-		* slave_cnt;
+		* worker_cnt;
 
 	printf("\nHTM = %d, RW-LF = %d, EXT-Table = %d\n",
 		use_htm, use_rw_lf, use_ext);
@@ -236,7 +236,7 @@ test_hash_readwrite_functional(int use_htm, int use_rw_lf, int use_ext)
 
 	/* Fire all threads. */
 	rte_eal_mp_remote_launch(test_hash_readwrite_worker,
-				 NULL, SKIP_MASTER);
+				 NULL, SKIP_INITIAL);
 	rte_eal_mp_wait_lcore();
 
 	while (rte_hash_iterate(tbl_rw_test_param.h, &next_key,
@@ -330,7 +330,7 @@ test_rw_writer(void *arg)
 	uint64_t offset;
 
 	for (i = 0; i < rte_lcore_count(); i++) {
-		if (slave_core_ids[i] == lcore_id)
+		if (worker_core_ids[i] == lcore_id)
 			break;
 	}
 
@@ -433,8 +433,8 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm,
 	perf_results->single_read = end / i;
 
 	for (n = 0; n < NUM_TEST; n++) {
-		unsigned int tot_slave_lcore = rte_lcore_count() - 1;
-		if (tot_slave_lcore < core_cnt[n] * 2)
+		unsigned int tot_worker_lcore = rte_lcore_count() - 1;
+		if (tot_worker_lcore < core_cnt[n] * 2)
 			goto finish;
 
 		rte_atomic64_clear(&greads);
@@ -467,7 +467,7 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm,
 		for (i = 0; i < core_cnt[n]; i++)
 			rte_eal_remote_launch(test_rw_reader,
 					(void *)(uintptr_t)read_cnt,
-					slave_core_ids[i]);
+					worker_core_ids[i]);
 
 		rte_eal_mp_wait_lcore();
 
@@ -476,7 +476,7 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm,
 		for (; i < core_cnt[n] * 2; i++)
 			rte_eal_remote_launch(test_rw_writer,
 					(void *)((uintptr_t)start_coreid),
-					slave_core_ids[i]);
+					worker_core_ids[i]);
 
 		rte_eal_mp_wait_lcore();
 
@@ -521,20 +521,20 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm,
 			for (i = core_cnt[n]; i < core_cnt[n] * 2; i++)
 				rte_eal_remote_launch(test_rw_writer,
 					(void *)((uintptr_t)start_coreid),
-					slave_core_ids[i]);
+					worker_core_ids[i]);
 			for (i = 0; i < core_cnt[n]; i++)
 				rte_eal_remote_launch(test_rw_reader,
 					(void *)(uintptr_t)read_cnt,
-					slave_core_ids[i]);
+					worker_core_ids[i]);
 		} else {
 			for (i = 0; i < core_cnt[n]; i++)
 				rte_eal_remote_launch(test_rw_reader,
 					(void *)(uintptr_t)read_cnt,
-					slave_core_ids[i]);
+					worker_core_ids[i]);
 			for (; i < core_cnt[n] * 2; i++)
 				rte_eal_remote_launch(test_rw_writer,
 					(void *)((uintptr_t)start_coreid),
-					slave_core_ids[i]);
+					worker_core_ids[i]);
 		}
 
 		rte_eal_mp_wait_lcore();
@@ -626,8 +626,8 @@ test_hash_rw_perf_main(void)
 		return TEST_SKIPPED;
 	}
 
-	RTE_LCORE_FOREACH_SLAVE(core_id) {
-		slave_core_ids[i] = core_id;
+	RTE_LCORE_FOREACH_WORKER(core_id) {
+		worker_core_ids[i] = core_id;
 		i++;
 	}
 
@@ -710,8 +710,8 @@ test_hash_rw_func_main(void)
 		return TEST_SKIPPED;
 	}
 
-	RTE_LCORE_FOREACH_SLAVE(core_id) {
-		slave_core_ids[i] = core_id;
+	RTE_LCORE_FOREACH_WORKER(core_id) {
+		worker_core_ids[i] = core_id;
 		i++;
 	}
 
app/test/test_kni.c +8 -8
index e47ab36e0231..ad2116d8556c 100644
@@ -85,7 +85,7 @@ static struct rte_kni_ops kni_ops = {
 	.config_promiscusity = NULL,
 };
 
-static unsigned lcore_master, lcore_ingress, lcore_egress;
+static unsigned int lcore_initial, lcore_ingress, lcore_egress;
 static struct rte_kni *test_kni_ctx;
 static struct test_kni_stats stats;
 
@@ -202,7 +202,7 @@ test_kni_link_change(void)
  * supported by KNI kernel module. The ingress lcore will allocate mbufs and
  * transmit them to kernel space; while the egress lcore will receive the mbufs
  * from kernel space and free them.
- * On the master lcore, several commands will be run to check handling the
+ * On the initial lcore, several commands will be run to check handling the
  * kernel requests. And it will finally set the flag to exit the KNI
  * transmitting/receiving to/from the kernel space.
  *
@@ -217,7 +217,7 @@ test_kni_loop(__rte_unused void *arg)
 	const unsigned lcore_id = rte_lcore_id();
 	struct rte_mbuf *pkts_burst[PKT_BURST_SZ];
 
-	if (lcore_id == lcore_master) {
+	if (lcore_id == lcore_initial) {
 		rte_delay_ms(KNI_TIMEOUT_MS);
 		/* tests of handling kernel request */
 		if (system(IFCONFIG TEST_KNI_PORT" up") == -1)
@@ -276,12 +276,12 @@ test_kni_allocate_lcores(void)
 {
 	unsigned i, count = 0;
 
-	lcore_master = rte_get_master_lcore();
-	printf("master lcore: %u\n", lcore_master);
+	lcore_initial = rte_get_initial_lcore();
+	printf("initial lcore: %u\n", lcore_initial);
 	for (i = 0; i < RTE_MAX_LCORE; i++) {
 		if (count >=2 )
 			break;
-		if (rte_lcore_is_enabled(i) && i != lcore_master) {
+		if (rte_lcore_is_enabled(i) && i != lcore_initial) {
 			count ++;
 			if (count == 1)
 				lcore_ingress = i;
@@ -487,8 +487,8 @@ test_kni_processing(uint16_t port_id, struct rte_mempool *mp)
 	if (ret != 0)
 		goto fail_kni;
 
-	rte_eal_mp_remote_launch(test_kni_loop, NULL, CALL_MASTER);
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	rte_eal_mp_remote_launch(test_kni_loop, NULL, CALL_INITIAL);
+	RTE_LCORE_FOREACH_WORKER(i) {
 		if (rte_eal_wait_lcore(i) < 0) {
 			ret = -1;
 			goto fail_kni;
app/test/test_malloc.c +6 -6
index 71b3cfdde5cf..758e6194a852 100644
@@ -1007,11 +1007,11 @@ test_malloc(void)
 	else printf("test_realloc() passed\n");
 
 	/*----------------------------*/
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		rte_eal_remote_launch(test_align_overlap_per_lcore, NULL, lcore_id);
 	}
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			ret = -1;
 	}
@@ -1022,11 +1022,11 @@ test_malloc(void)
 	else printf("test_align_overlap_per_lcore() passed\n");
 
 	/*----------------------------*/
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		rte_eal_remote_launch(test_reordered_free_per_lcore, NULL, lcore_id);
 	}
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			ret = -1;
 	}
@@ -1037,11 +1037,11 @@ test_malloc(void)
 	else printf("test_reordered_free_per_lcore() passed\n");
 
 	/*----------------------------*/
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		rte_eal_remote_launch(test_random_alloc_free, NULL, lcore_id);
 	}
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			ret = -1;
 	}
app/test/test_mbuf.c +18 -18
index 06e44f0a79f8..38ce915b7a10 100644
@@ -72,7 +72,7 @@
 
 #ifdef RTE_MBUF_REFCNT_ATOMIC
 
-static volatile uint32_t refcnt_stop_slaves;
+static volatile uint32_t refcnt_stop_workers;
 static unsigned refcnt_lcore[RTE_MAX_LCORE];
 
 #endif
@@ -1000,7 +1000,7 @@ test_pktmbuf_free_segment(struct rte_mempool *pktmbuf_pool)
 #ifdef RTE_MBUF_REFCNT_ATOMIC
 
 static int
-test_refcnt_slave(void *arg)
+test_refcnt_worker(void *arg)
 {
 	unsigned lcore, free;
 	void *mp = 0;
@@ -1010,7 +1010,7 @@ test_refcnt_slave(void *arg)
 	printf("%s started at lcore %u\n", __func__, lcore);
 
 	free = 0;
-	while (refcnt_stop_slaves == 0) {
+	while (refcnt_stop_workers == 0) {
 		if (rte_ring_dequeue(refcnt_mbuf_ring, &mp) == 0) {
 			free++;
 			rte_pktmbuf_free(mp);
@@ -1038,7 +1038,7 @@ test_refcnt_iter(unsigned int lcore, unsigned int iter,
 	/* For each mbuf in the pool:
 	 * - allocate mbuf,
 	 * - increment it's reference up to N+1,
-	 * - enqueue it N times into the ring for slave cores to free.
+	 * - enqueue it N times into the ring for worker cores to free.
 	 */
 	for (i = 0, n = rte_mempool_avail_count(refcnt_pool);
 	    i != n && (m = rte_pktmbuf_alloc(refcnt_pool)) != NULL;
@@ -1062,7 +1062,7 @@ test_refcnt_iter(unsigned int lcore, unsigned int iter,
 		rte_panic("(lcore=%u, iter=%u): was able to allocate only "
 		          "%u from %u mbufs\n", lcore, iter, i, n);
 
-	/* wait till slave lcores  will consume all mbufs */
+	/* wait till worker lcores  will consume all mbufs */
 	while (!rte_ring_empty(refcnt_mbuf_ring))
 		;
 
@@ -1083,8 +1083,8 @@ test_refcnt_iter(unsigned int lcore, unsigned int iter,
 }
 
 static int
-test_refcnt_master(struct rte_mempool *refcnt_pool,
-		   struct rte_ring *refcnt_mbuf_ring)
+test_refcnt_main(struct rte_mempool *refcnt_pool,
+		 struct rte_ring *refcnt_mbuf_ring)
 {
 	unsigned i, lcore;
 
@@ -1094,7 +1094,7 @@ test_refcnt_master(struct rte_mempool *refcnt_pool,
 	for (i = 0; i != REFCNT_MAX_ITER; i++)
 		test_refcnt_iter(lcore, i, refcnt_pool, refcnt_mbuf_ring);
 
-	refcnt_stop_slaves = 1;
+	refcnt_stop_workers = 1;
 	rte_wmb();
 
 	printf("%s finished at lcore %u\n", __func__, lcore);
@@ -1107,7 +1107,7 @@ static int
 test_refcnt_mbuf(void)
 {
 #ifdef RTE_MBUF_REFCNT_ATOMIC
-	unsigned int master, slave, tref;
+	unsigned int initial, worker, tref;
 	int ret = -1;
 	struct rte_mempool *refcnt_pool = NULL;
 	struct rte_ring *refcnt_mbuf_ring = NULL;
@@ -1139,26 +1139,26 @@ test_refcnt_mbuf(void)
 		goto err;
 	}
 
-	refcnt_stop_slaves = 0;
+	refcnt_stop_workers = 0;
 	memset(refcnt_lcore, 0, sizeof (refcnt_lcore));
 
-	rte_eal_mp_remote_launch(test_refcnt_slave, refcnt_mbuf_ring,
-				 SKIP_MASTER);
+	rte_eal_mp_remote_launch(test_refcnt_worker, refcnt_mbuf_ring,
+				 SKIP_INITIAL);
 
-	test_refcnt_master(refcnt_pool, refcnt_mbuf_ring);
+	test_refcnt_main(refcnt_pool, refcnt_mbuf_ring);
 
 	rte_eal_mp_wait_lcore();
 
 	/* check that we porcessed all references */
 	tref = 0;
-	master = rte_get_master_lcore();
+	initial = rte_get_initial_lcore();
 
-	RTE_LCORE_FOREACH_SLAVE(slave)
-		tref += refcnt_lcore[slave];
+	RTE_LCORE_FOREACH_WORKER(worker)
+		tref += refcnt_lcore[worker];
 
-	if (tref != refcnt_lcore[master])
+	if (tref != refcnt_lcore[initial])
 		rte_panic("referenced mbufs: %u, freed mbufs: %u\n",
-		          tref, refcnt_lcore[master]);
+			  tref, refcnt_lcore[initial]);
 
 	rte_mempool_dump(stdout, refcnt_pool);
 	rte_ring_dump(stdout, refcnt_mbuf_ring);
app/test/test_mcslock.c +14 -14
index ddccaafa9242..9cd9da19dd72 100644
@@ -28,7 +28,7 @@
  * These tests are derived from spin lock test cases.
  *
  * - The functional test takes all of these locks and launches the
- *   ''test_mcslock_per_core()'' function on each core (except the master).
+ *   ''test_mcslock_per_core()'' function on each core (except the initial).
  *
  *   - The function takes the global lock, display something, then releases
  *     the global lock on each core.
@@ -123,9 +123,9 @@ test_mcslock_perf(void)
 	printf("\nTest with lock on %u cores...\n", (rte_lcore_count()));
 
 	rte_atomic32_set(&synchro, 0);
-	rte_eal_mp_remote_launch(load_loop_fn, &lock, SKIP_MASTER);
+	rte_eal_mp_remote_launch(load_loop_fn, &lock, SKIP_INITIAL);
 
-	/* start synchro and launch test on master */
+	/* start synchro and launch test on initial lcore */
 	rte_atomic32_set(&synchro, 1);
 	load_loop_fn(&lock);
 
@@ -154,8 +154,8 @@ test_mcslock_try(__rte_unused void *arg)
 	rte_mcslock_t ml_me     = RTE_PER_LCORE(_ml_me);
 	rte_mcslock_t ml_try_me = RTE_PER_LCORE(_ml_try_me);
 
-	/* Locked ml_try in the master lcore, so it should fail
-	 * when trying to lock it in the slave lcore.
+	/* Locked ml_try in the initial lcore, so it should fail
+	 * when trying to lock it in the worker lcore.
 	 */
 	if (rte_mcslock_trylock(&p_ml_try, &ml_try_me) == 0) {
 		rte_mcslock_lock(&p_ml, &ml_me);
@@ -185,20 +185,20 @@ test_mcslock(void)
 	 * Test mcs lock & unlock on each core
 	 */
 
-	/* slave cores should be waiting: print it */
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	/* worker cores should be waiting: print it */
+	RTE_LCORE_FOREACH_WORKER(i) {
 		printf("lcore %d state: %d\n", i,
 				(int) rte_eal_get_lcore_state(i));
 	}
 
 	rte_mcslock_lock(&p_ml, &ml_me);
 
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 		rte_eal_remote_launch(test_mcslock_per_core, NULL, i);
 	}
 
-	/* slave cores should be busy: print it */
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	/* worker cores should be busy: print it */
+	RTE_LCORE_FOREACH_WORKER(i) {
 		printf("lcore %d state: %d\n", i,
 				(int) rte_eal_get_lcore_state(i));
 	}
@@ -210,19 +210,19 @@ test_mcslock(void)
 	/*
 	 * Test if it could return immediately from try-locking a locked object.
 	 * Here it will lock the mcs lock object first, then launch all the
-	 * slave lcores to trylock the same mcs lock object.
-	 * All the slave lcores should give up try-locking a locked object and
+	 * worker lcores to trylock the same mcs lock object.
+	 * All the worker lcores should give up try-locking a locked object and
 	 * return immediately, and then increase the "count" initialized with
 	 * zero by one per times.
 	 * We can check if the "count" is finally equal to the number of all
-	 * slave lcores to see if the behavior of try-locking a locked
+	 * worker lcores to see if the behavior of try-locking a locked
 	 * mcslock object is correct.
 	 */
 	if (rte_mcslock_trylock(&p_ml_try, &ml_try_me) == 0)
 		return -1;
 
 	count = 0;
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 		rte_eal_remote_launch(test_mcslock_try, NULL, i);
 	}
 	rte_eal_mp_wait_lcore();
app/test/test_mempool_perf.c +5 -5
index 60bda8aadbe8..383f3928f2c1 100644
@@ -143,8 +143,8 @@ per_lcore_mempool_test(void *arg)
 
 	stats[lcore_id].enq_count = 0;
 
-	/* wait synchro for slaves */
-	if (lcore_id != rte_get_master_lcore())
+	/* wait synchro for workers */
+	if (lcore_id != rte_get_initial_lcore())
 		while (rte_atomic32_read(&synchro) == 0);
 
 	start_cycles = rte_get_timer_cycles();
@@ -214,7 +214,7 @@ launch_cores(struct rte_mempool *mp, unsigned int cores)
 		return -1;
 	}
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (cores == 1)
 			break;
 		cores--;
@@ -222,13 +222,13 @@ launch_cores(struct rte_mempool *mp, unsigned int cores)
 				      mp, lcore_id);
 	}
 
-	/* start synchro and launch test on master */
+	/* start synchro and launch test on initial lcore */
 	rte_atomic32_set(&synchro, 1);
 
 	ret = per_lcore_mempool_test(mp);
 
 	cores = cores_save;
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (cores == 1)
 			break;
 		cores--;
app/test/test_mp_secondary.c +1 -1
index ac15ddbf2009..2cc1586fcde0 100644
@@ -94,7 +94,7 @@ run_secondary_instances(void)
 #endif
 
 	snprintf(coremask, sizeof(coremask), "%x", \
-			(1 << rte_get_master_lcore()));
+			(1 << rte_get_initial_lcore()));
 
 	ret |= launch_proc(argv1);
 	ret |= launch_proc(argv2);
app/test/test_pdump.c +1 -1
index 6a1180bcb78e..d2d2df7a8016 100644
@@ -184,7 +184,7 @@ run_pdump_server_tests(void)
 	};
 
 	snprintf(coremask, sizeof(coremask), "%x",
-		 (1 << rte_get_master_lcore()));
+		 (1 << rte_get_initial_lcore()));
 
 	ret = test_pdump_init();
 	ret |= launch_p(argv1);
app/test/test_per_lcore.c +7 -7
index fcd00212f1eb..ff91a3cf5b2b 100644
@@ -73,31 +73,31 @@ test_per_lcore(void)
 	unsigned lcore_id;
 	int ret;
 
-	rte_eal_mp_remote_launch(assign_vars, NULL, SKIP_MASTER);
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	rte_eal_mp_remote_launch(assign_vars, NULL, SKIP_INITIAL);
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
 
-	rte_eal_mp_remote_launch(display_vars, NULL, SKIP_MASTER);
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	rte_eal_mp_remote_launch(display_vars, NULL, SKIP_INITIAL);
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
 
 	/* test if it could do remote launch twice at the same time or not */
-	ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_MASTER);
+	ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_INITIAL);
 	if (ret < 0) {
 		printf("It fails to do remote launch but it should able to do\n");
 		return -1;
 	}
 	/* it should not be able to launch a lcore which is running */
-	ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_MASTER);
+	ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_INITIAL);
 	if (ret == 0) {
 		printf("It does remote launch successfully but it should not at this time\n");
 		return -1;
 	}
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			return -1;
 	}
app/test/test_pmd_perf.c +10 -10
index 352cd47156ba..efe0814f175e 100644
@@ -278,7 +278,7 @@ alloc_lcore(uint16_t socketid)
 	for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
 		if (LCORE_AVAIL != lcore_conf[lcore_id].status ||
 		    lcore_conf[lcore_id].socketid != socketid ||
-		    lcore_id == rte_get_master_lcore())
+		    lcore_id == rte_get_initial_lcore())
 			continue;
 		lcore_conf[lcore_id].status = LCORE_USED;
 		lcore_conf[lcore_id].nb_ports = 0;
@@ -664,7 +664,7 @@ exec_burst(uint32_t flags, int lcore)
 static int
 test_pmd_perf(void)
 {
-	uint16_t nb_ports, num, nb_lcores, slave_id = (uint16_t)-1;
+	uint16_t nb_ports, num, nb_lcores, worker_id = (uint16_t)-1;
 	uint16_t nb_rxd = MAX_TRAFFIC_BURST;
 	uint16_t nb_txd = MAX_TRAFFIC_BURST;
 	uint16_t portid;
@@ -702,13 +702,13 @@ test_pmd_perf(void)
 	RTE_ETH_FOREACH_DEV(portid) {
 		if (socketid == -1) {
 			socketid = rte_eth_dev_socket_id(portid);
-			slave_id = alloc_lcore(socketid);
-			if (slave_id == (uint16_t)-1) {
+			worker_id = alloc_lcore(socketid);
+			if (worker_id == (uint16_t)-1) {
 				printf("No avail lcore to run test\n");
 				return -1;
 			}
 			printf("Performance test runs on lcore %u socket %u\n",
-			       slave_id, socketid);
+			       worker_id, socketid);
 		}
 
 		if (socketid != rte_eth_dev_socket_id(portid)) {
@@ -765,8 +765,8 @@ test_pmd_perf(void)
 				 "rte_eth_promiscuous_enable: err=%s, port=%d\n",
 				 rte_strerror(-ret), portid);
 
-		lcore_conf[slave_id].portlist[num++] = portid;
-		lcore_conf[slave_id].nb_ports++;
+		lcore_conf[worker_id].portlist[num++] = portid;
+		lcore_conf[worker_id].nb_ports++;
 	}
 	check_all_ports_link_status(nb_ports, RTE_PORT_ALL);
 
@@ -791,13 +791,13 @@ test_pmd_perf(void)
 		if (NULL == do_measure)
 			do_measure = measure_rxtx;
 
-		rte_eal_remote_launch(main_loop, NULL, slave_id);
+		rte_eal_remote_launch(main_loop, NULL, worker_id);
 
-		if (rte_eal_wait_lcore(slave_id) < 0)
+		if (rte_eal_wait_lcore(worker_id) < 0)
 			return -1;
 	} else if (sc_flag == SC_BURST_POLL_FIRST ||
 		   sc_flag == SC_BURST_XMIT_FIRST)
-		if (exec_burst(sc_flag, slave_id) < 0)
+		if (exec_burst(sc_flag, worker_id) < 0)
 			return -1;
 
 	/* port tear down */
app/test/test_rcu_qsbr.c +1 -1
index 0a9e5ecd1a44..7ae66e4dfb76 100644
@@ -1327,7 +1327,7 @@ test_rcu_qsbr_main(void)
 	}
 
 	num_cores = 0;
-	RTE_LCORE_FOREACH_SLAVE(core_id) {
+	RTE_LCORE_FOREACH_WORKER(core_id) {
 		enabled_core_ids[num_cores] = core_id;
 		num_cores++;
 	}
app/test/test_rcu_qsbr_perf.c +1 -1
index d35a6d089784..3017e71120ad 100644
@@ -625,7 +625,7 @@ test_rcu_qsbr_main(void)
 	rte_atomic64_init(&check_cycles);
 
 	num_cores = 0;
-	RTE_LCORE_FOREACH_SLAVE(core_id) {
+	RTE_LCORE_FOREACH_WORKER(core_id) {
 		enabled_core_ids[num_cores] = core_id;
 		num_cores++;
 	}
app/test/test_ring_perf.c +7 -7
index ac9bf5608daa..42d82d85bab2 100644
@@ -297,7 +297,7 @@ run_on_core_pair(struct lcore_pair *cores, struct rte_ring *r, const int esize)
 		lcore_count = 0;
 		param1.size = param2.size = bulk_sizes[i];
 		param1.r = param2.r = r;
-		if (cores->c1 == rte_get_master_lcore()) {
+		if (cores->c1 == rte_get_initial_lcore()) {
 			rte_eal_remote_launch(f2, &param2, cores->c2);
 			f1(&param1);
 			rte_eal_wait_lcore(cores->c2);
@@ -340,8 +340,8 @@ load_loop_fn_helper(struct thread_params *p, const int esize)
 	if (burst == NULL)
 		return -1;
 
-	/* wait synchro for slaves */
-	if (lcore != rte_get_master_lcore())
+	/* wait synchro for workers */
+	if (lcore != rte_get_initial_lcore())
 		while (rte_atomic32_read(&synchro) == 0)
 			rte_pause();
 
@@ -397,12 +397,12 @@ run_on_all_cores(struct rte_ring *r, const int esize)
 		param.size = bulk_sizes[i];
 		param.r = r;
 
-		/* clear synchro and start slaves */
+		/* clear synchro and start workers */
 		rte_atomic32_set(&synchro, 0);
-		if (rte_eal_mp_remote_launch(lcore_f, &param, SKIP_MASTER) < 0)
+		if (rte_eal_mp_remote_launch(lcore_f, &param, SKIP_INITIAL) < 0)
 			return -1;
 
-		/* start synchro and launch test on master */
+		/* start synchro and launch test on initial lcore */
 		rte_atomic32_set(&synchro, 1);
 		lcore_f(&param);
 
@@ -553,7 +553,7 @@ test_ring_perf_esize(const int esize)
 			goto test_fail;
 	}
 
-	printf("\n### Testing using all slave nodes ###\n");
+	printf("\n### Testing using all worker nodes ###\n");
 	if (run_on_all_cores(r, esize) < 0)
 		goto test_fail;
 
app/test/test_ring_stress_impl.h +5 -5
index 222d62bc4f4d..fab924515fc3 100644
@@ -6,7 +6,7 @@
 
 /**
  * Stress test for ring enqueue/dequeue operations.
- * Performs the following pattern on each slave worker:
+ * Performs the following pattern on each worker worker:
  * dequeue/read-write data from the dequeued objects/enqueue.
  * Serves as both functional and performance test of ring
  * enqueue/dequeue operations under high contention
@@ -348,8 +348,8 @@ test_mt1(int (*test)(void *))
 
 	memset(arg, 0, sizeof(arg));
 
-	/* launch on all slaves */
-	RTE_LCORE_FOREACH_SLAVE(lc) {
+	/* launch on all workers */
+	RTE_LCORE_FOREACH_WORKER(lc) {
 		arg[lc].rng = r;
 		arg[lc].stats = init_stat;
 		rte_eal_remote_launch(test, &arg[lc], lc);
@@ -365,12 +365,12 @@ test_mt1(int (*test)(void *))
 	wrk_cmd = WRK_CMD_STOP;
 	rte_smp_wmb();
 
-	/* wait for slaves and collect stats. */
+	/* wait for workers and collect stats. */
 	mc = rte_lcore_id();
 	arg[mc].stats = init_stat;
 
 	rc = 0;
-	RTE_LCORE_FOREACH_SLAVE(lc) {
+	RTE_LCORE_FOREACH_WORKER(lc) {
 		rc |= rte_eal_wait_lcore(lc);
 		lcore_stat_aggr(&arg[mc].stats, &arg[lc].stats);
 		if (verbose != 0)
app/test/test_rwlock.c +14 -14
index 61bee7d7c296..ea20318c4c84 100644
@@ -99,8 +99,8 @@ load_loop_fn(__rte_unused void *arg)
 	uint64_t lcount = 0;
 	const unsigned int lcore = rte_lcore_id();
 
-	/* wait synchro for slaves */
-	if (lcore != rte_get_master_lcore())
+	/* wait synchro for workers */
+	if (lcore != rte_get_initial_lcore())
 		while (rte_atomic32_read(&synchro) == 0)
 			;
 
@@ -134,12 +134,12 @@ test_rwlock_perf(void)
 
 	printf("\nRwlock Perf Test on %u cores...\n", rte_lcore_count());
 
-	/* clear synchro and start slaves */
+	/* clear synchro and start workers */
 	rte_atomic32_set(&synchro, 0);
-	if (rte_eal_mp_remote_launch(load_loop_fn, NULL, SKIP_MASTER) < 0)
+	if (rte_eal_mp_remote_launch(load_loop_fn, NULL, SKIP_INITIAL) < 0)
 		return -1;
 
-	/* start synchro and launch test on master */
+	/* start synchro and launch test on initial lcore */
 	rte_atomic32_set(&synchro, 1);
 	load_loop_fn(NULL);
 
@@ -161,7 +161,7 @@ test_rwlock_perf(void)
  * - There is a global rwlock and a table of rwlocks (one per lcore).
  *
  * - The test function takes all of these locks and launches the
- *   ``test_rwlock_per_core()`` function on each core (except the master).
+ *   ``test_rwlock_per_core()`` function on each core (except the initial).
  *
  *   - The function takes the global write lock, display something,
  *     then releases the global lock.
@@ -187,21 +187,21 @@ rwlock_test1(void)
 
 	rte_rwlock_write_lock(&sl);
 
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 		rte_rwlock_write_lock(&sl_tab[i]);
 		rte_eal_remote_launch(test_rwlock_per_core, NULL, i);
 	}
 
 	rte_rwlock_write_unlock(&sl);
 
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 		rte_rwlock_write_unlock(&sl_tab[i]);
 		rte_delay_ms(100);
 	}
 
 	rte_rwlock_write_lock(&sl);
 	/* this message should be the last message of test */
-	printf("Global write lock taken on master core %u\n", rte_lcore_id());
+	printf("Global write lock taken on initial core %u\n", rte_lcore_id());
 	rte_rwlock_write_unlock(&sl);
 
 	rte_eal_mp_wait_lcore();
@@ -462,26 +462,26 @@ try_rwlock_test_rda(void)
 	try_test_reset();
 
 	/* start read test on all avaialble lcores */
-	rte_eal_mp_remote_launch(try_read_lcore, NULL, CALL_MASTER);
+	rte_eal_mp_remote_launch(try_read_lcore, NULL, CALL_INITIAL);
 	rte_eal_mp_wait_lcore();
 
 	return process_try_lcore_stats();
 }
 
-/* all slave lcores grab RDLOCK, master one grabs WRLOCK */
+/* all worker lcores grab RDLOCK, initial  one grabs WRLOCK */
 static int
 try_rwlock_test_rds_wrm(void)
 {
 	try_test_reset();
 
-	rte_eal_mp_remote_launch(try_read_lcore, NULL, SKIP_MASTER);
+	rte_eal_mp_remote_launch(try_read_lcore, NULL, SKIP_INITIAL);
 	try_write_lcore(NULL);
 	rte_eal_mp_wait_lcore();
 
 	return process_try_lcore_stats();
 }
 
-/* master and even slave lcores grab RDLOCK, odd lcores grab WRLOCK */
+/* initial and even worker lcores grab RDLOCK, odd lcores grab WRLOCK */
 static int
 try_rwlock_test_rde_wro(void)
 {
@@ -489,7 +489,7 @@ try_rwlock_test_rde_wro(void)
 
 	try_test_reset();
 
-	mlc = rte_get_master_lcore();
+	mlc = rte_get_initial_lcore();
 
 	RTE_LCORE_FOREACH(lc) {
 		if (lc != mlc) {
app/test/test_service_cores.c +5 -5
index 981e212130bf..6b23363425c9 100644
@@ -30,7 +30,7 @@ static int
 testsuite_setup(void)
 {
 	slcore_id = rte_get_next_lcore(/* start core */ -1,
-				       /* skip master */ 1,
+				       /* skip initial */ 1,
 				       /* wrap */ 0);
 
 	return TEST_SUCCESS;
@@ -532,12 +532,12 @@ service_lcore_add_del(void)
 	TEST_ASSERT_EQUAL(1, rte_service_lcore_count(),
 			"Service core count not equal to one");
 	uint32_t slcore_1 = rte_get_next_lcore(/* start core */ -1,
-					       /* skip master */ 1,
+					       /* skip initial */ 1,
 					       /* wrap */ 0);
 	TEST_ASSERT_EQUAL(0, rte_service_lcore_add(slcore_1),
 			"Service core add did not return zero");
 	uint32_t slcore_2 = rte_get_next_lcore(/* start core */ slcore_1,
-					       /* skip master */ 1,
+					       /* skip initial */ 1,
 					       /* wrap */ 0);
 	TEST_ASSERT_EQUAL(0, rte_service_lcore_add(slcore_2),
 			"Service core add did not return zero");
@@ -583,12 +583,12 @@ service_threaded_test(int mt_safe)
 
 	/* add next 2 cores */
 	uint32_t slcore_1 = rte_get_next_lcore(/* start core */ -1,
-					       /* skip master */ 1,
+					       /* skip initial */ 1,
 					       /* wrap */ 0);
 	TEST_ASSERT_EQUAL(0, rte_service_lcore_add(slcore_1),
 			"mt safe lcore add fail");
 	uint32_t slcore_2 = rte_get_next_lcore(/* start core */ slcore_1,
-					       /* skip master */ 1,
+					       /* skip initial */ 1,
 					       /* wrap */ 0);
 	TEST_ASSERT_EQUAL(0, rte_service_lcore_add(slcore_2),
 			"mt safe lcore add fail");
app/test/test_spinlock.c +17 -17
index 842990ed3b30..87dc8a1f1eeb 100644
@@ -28,7 +28,7 @@
  * - There is a global spinlock and a table of spinlocks (one per lcore).
  *
  * - The test function takes all of these locks and launches the
- *   ``test_spinlock_per_core()`` function on each core (except the master).
+ *   ``test_spinlock_per_core()`` function on each core (except the initial).
  *
  *   - The function takes the global lock, display something, then releases
  *     the global lock.
@@ -109,8 +109,8 @@ load_loop_fn(void *func_param)
 	const int use_lock = *(int*)func_param;
 	const unsigned lcore = rte_lcore_id();
 
-	/* wait synchro for slaves */
-	if (lcore != rte_get_master_lcore())
+	/* wait synchro for workers */
+	if (lcore != rte_get_initial_lcore())
 		while (rte_atomic32_read(&synchro) == 0);
 
 	begin = rte_get_timer_cycles();
@@ -149,11 +149,11 @@ test_spinlock_perf(void)
 
 	printf("\nTest with lock on %u cores...\n", rte_lcore_count());
 
-	/* Clear synchro and start slaves */
+	/* Clear synchro and start workers */
 	rte_atomic32_set(&synchro, 0);
-	rte_eal_mp_remote_launch(load_loop_fn, &lock, SKIP_MASTER);
+	rte_eal_mp_remote_launch(load_loop_fn, &lock, SKIP_INITIAL);
 
-	/* start synchro and launch test on master */
+	/* start synchro and launch test on initial lcore */
 	rte_atomic32_set(&synchro, 1);
 	load_loop_fn(&lock);
 
@@ -200,8 +200,8 @@ test_spinlock(void)
 	int ret = 0;
 	int i;
 
-	/* slave cores should be waiting: print it */
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	/* worker cores should be waiting: print it */
+	RTE_LCORE_FOREACH_WORKER(i) {
 		printf("lcore %d state: %d\n", i,
 		       (int) rte_eal_get_lcore_state(i));
 	}
@@ -214,19 +214,19 @@ test_spinlock(void)
 
 	rte_spinlock_lock(&sl);
 
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 		rte_spinlock_lock(&sl_tab[i]);
 		rte_eal_remote_launch(test_spinlock_per_core, NULL, i);
 	}
 
-	/* slave cores should be busy: print it */
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	/* worker cores should be busy: print it */
+	RTE_LCORE_FOREACH_WORKER(i) {
 		printf("lcore %d state: %d\n", i,
 		       (int) rte_eal_get_lcore_state(i));
 	}
 	rte_spinlock_unlock(&sl);
 
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 		rte_spinlock_unlock(&sl_tab[i]);
 		rte_delay_ms(10);
 	}
@@ -245,7 +245,7 @@ test_spinlock(void)
 	} else
 		rte_spinlock_recursive_unlock(&slr);
 
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 		rte_eal_remote_launch(test_spinlock_recursive_per_core, NULL, i);
 	}
 	rte_spinlock_recursive_unlock(&slr);
@@ -253,12 +253,12 @@ test_spinlock(void)
 
 	/*
 	 * Test if it could return immediately from try-locking a locked object.
-	 * Here it will lock the spinlock object first, then launch all the slave
+	 * Here it will lock the spinlock object first, then launch all the worker
 	 * lcores to trylock the same spinlock object.
-	 * All the slave lcores should give up try-locking a locked object and
+	 * All the worker lcores should give up try-locking a locked object and
 	 * return immediately, and then increase the "count" initialized with zero
 	 * by one per times.
-	 * We can check if the "count" is finally equal to the number of all slave
+	 * We can check if the "count" is finally equal to the number of all worker
 	 * lcores to see if the behavior of try-locking a locked spinlock object
 	 * is correct.
 	 */
@@ -266,7 +266,7 @@ test_spinlock(void)
 		return -1;
 	}
 	count = 0;
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 		rte_eal_remote_launch(test_spinlock_try, NULL, i);
 	}
 	rte_eal_mp_wait_lcore();
app/test/test_stack.c +1 -1
index c8dac1f55cdc..0ef5f47874f2 100644
@@ -362,7 +362,7 @@ test_stack_multithreaded(uint32_t flags)
 
 	rte_atomic64_init(&size);
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		args[lcore_id].s = s;
 		args[lcore_id].sz = &size;
 
app/test/test_stack_perf.c +3 -3
index 3ab7267b1b72..1a49667a91fc 100644
@@ -180,7 +180,7 @@ run_on_core_pair(struct lcore_pair *cores, struct rte_stack *s,
 		args[0].sz = args[1].sz = bulk_sizes[i];
 		args[0].s = args[1].s = s;
 
-		if (cores->c1 == rte_get_master_lcore()) {
+		if (cores->c1 == rte_get_initial_lcore()) {
 			rte_eal_remote_launch(fn, &args[1], cores->c2);
 			fn(&args[0]);
 			rte_eal_wait_lcore(cores->c2);
@@ -210,7 +210,7 @@ run_on_n_cores(struct rte_stack *s, lcore_function_t fn, int n)
 
 		rte_atomic32_set(&lcore_barrier, n);
 
-		RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+		RTE_LCORE_FOREACH_WORKER(lcore_id) {
 			if (++cnt >= n)
 				break;
 
@@ -235,7 +235,7 @@ run_on_n_cores(struct rte_stack *s, lcore_function_t fn, int n)
 		avg = args[rte_lcore_id()].avg;
 
 		cnt = 0;
-		RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+		RTE_LCORE_FOREACH_WORKER(lcore_id) {
 			if (++cnt >= n)
 				break;
 			avg += args[lcore_id].avg;
app/test/test_ticketlock.c +18 -18
index 66ab3d1a0248..3b4e68af24ce 100644
@@ -28,7 +28,7 @@
  * - There is a global ticketlock and a table of ticketlocks (one per lcore).
  *
  * - The test function takes all of these locks and launches the
- *   ``test_ticketlock_per_core()`` function on each core (except the master).
+ *   ``test_ticketlock_per_core()`` function on each core (except the initial).
  *
  *   - The function takes the global lock, display something, then releases
  *     the global lock.
@@ -110,8 +110,8 @@ load_loop_fn(void *func_param)
 	const int use_lock = *(int *)func_param;
 	const unsigned int lcore = rte_lcore_id();
 
-	/* wait synchro for slaves */
-	if (lcore != rte_get_master_lcore())
+	/* wait synchro for workers */
+	if (lcore != rte_get_initial_lcore())
 		while (rte_atomic32_read(&synchro) == 0)
 			;
 
@@ -154,11 +154,11 @@ test_ticketlock_perf(void)
 	lcount = 0;
 	printf("\nTest with lock on %u cores...\n", rte_lcore_count());
 
-	/* Clear synchro and start slaves */
+	/* Clear synchro and start workers */
 	rte_atomic32_set(&synchro, 0);
-	rte_eal_mp_remote_launch(load_loop_fn, &lock, SKIP_MASTER);
+	rte_eal_mp_remote_launch(load_loop_fn, &lock, SKIP_INITIAL);
 
-	/* start synchro and launch test on master */
+	/* start synchro and launch test on initial lcore */
 	rte_atomic32_set(&synchro, 1);
 	load_loop_fn(&lock);
 
@@ -208,8 +208,8 @@ test_ticketlock(void)
 	int ret = 0;
 	int i;
 
-	/* slave cores should be waiting: print it */
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	/* worker cores should be waiting: print it */
+	RTE_LCORE_FOREACH_WORKER(i) {
 		printf("lcore %d state: %d\n", i,
 		       (int) rte_eal_get_lcore_state(i));
 	}
@@ -217,25 +217,25 @@ test_ticketlock(void)
 	rte_ticketlock_init(&tl);
 	rte_ticketlock_init(&tl_try);
 	rte_ticketlock_recursive_init(&tlr);
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 		rte_ticketlock_init(&tl_tab[i]);
 	}
 
 	rte_ticketlock_lock(&tl);
 
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 		rte_ticketlock_lock(&tl_tab[i]);
 		rte_eal_remote_launch(test_ticketlock_per_core, NULL, i);
 	}
 
-	/* slave cores should be busy: print it */
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	/* worker cores should be busy: print it */
+	RTE_LCORE_FOREACH_WORKER(i) {
 		printf("lcore %d state: %d\n", i,
 		       (int) rte_eal_get_lcore_state(i));
 	}
 	rte_ticketlock_unlock(&tl);
 
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 		rte_ticketlock_unlock(&tl_tab[i]);
 		rte_delay_ms(10);
 	}
@@ -254,7 +254,7 @@ test_ticketlock(void)
 	} else
 		rte_ticketlock_recursive_unlock(&tlr);
 
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 		rte_eal_remote_launch(test_ticketlock_recursive_per_core,
 					NULL, i);
 	}
@@ -264,19 +264,19 @@ test_ticketlock(void)
 	/*
 	 * Test if it could return immediately from try-locking a locked object.
 	 * Here it will lock the ticketlock object first, then launch all the
-	 * slave lcores to trylock the same ticketlock object.
-	 * All the slave lcores should give up try-locking a locked object and
+	 * worker lcores to trylock the same ticketlock object.
+	 * All the worker lcores should give up try-locking a locked object and
 	 * return immediately, and then increase the "count" initialized with
 	 * zero by one per times.
 	 * We can check if the "count" is finally equal to the number of all
-	 * slave lcores to see if the behavior of try-locking a locked
+	 * worker lcores to see if the behavior of try-locking a locked
 	 * ticketlock object is correct.
 	 */
 	if (rte_ticketlock_trylock(&tl_try) == 0)
 		return -1;
 
 	count = 0;
-	RTE_LCORE_FOREACH_SLAVE(i) {
+	RTE_LCORE_FOREACH_WORKER(i) {
 		rte_eal_remote_launch(test_ticketlock_try, NULL, i);
 	}
 	rte_eal_mp_wait_lcore();
app/test/test_timer.c +53 -54

285 lines not on this page · raw message

app/test/test_timer_racecond.c +14 -13
index 4fc917995415..5af661716141 100644
@@ -56,8 +56,8 @@
 static struct rte_timer timer[N_TIMERS];
 static unsigned timer_lcore_id[N_TIMERS];
 
-static unsigned master;
-static volatile unsigned stop_slaves;
+static unsigned int initial_lcore;
+static volatile unsigned stop_workers;
 
 static int reload_timer(struct rte_timer *tim);
 
@@ -95,7 +95,8 @@ reload_timer(struct rte_timer *tim)
 	    (tim - timer);
 	int ret;
 
-	ret = rte_timer_reset(tim, ticks, PERIODICAL, master, timer_cb, NULL);
+	ret = rte_timer_reset(tim, ticks, PERIODICAL,
+			      initial_lcore, timer_cb, NULL);
 	if (ret != 0) {
 		rte_log(RTE_LOG_DEBUG, timer_logtype_test,
 			"- core %u failed to reset timer %" PRIuPTR " (OK)\n",
@@ -106,7 +107,7 @@ reload_timer(struct rte_timer *tim)
 }
 
 static int
-slave_main_loop(__rte_unused void *arg)
+worker_main_loop(__rte_unused void *arg)
 {
 	unsigned lcore_id = rte_lcore_id();
 	unsigned i;
@@ -115,7 +116,7 @@ slave_main_loop(__rte_unused void *arg)
 
 	printf("Starting main loop on core %u\n", lcore_id);
 
-	while (!stop_slaves) {
+	while (!stop_workers) {
 		/* Wait until the timer manager is running.
 		 * We know it's running when we see timer[0] NOT pending.
 		 */
@@ -152,7 +153,7 @@ test_timer_racecond(void)
 	unsigned lcore_id;
 	unsigned i;
 
-	master = lcore_id = rte_lcore_id();
+	initial_lcore = lcore_id = rte_lcore_id();
 	hz = rte_get_timer_hz();
 
 	/* init and start timers */
@@ -161,8 +162,8 @@ test_timer_racecond(void)
 		ret = reload_timer(&timer[i]);
 		TEST_ASSERT(ret == 0, "reload_timer failed");
 
-		/* Distribute timers to slaves.
-		 * Note that we assign timer[0] to the master.
+		/* Distribute timers to workers.
+		 * Note that we assign timer[0] to the initial lcore.
 		 */
 		timer_lcore_id[i] = lcore_id;
 		lcore_id = rte_get_next_lcore(lcore_id, 1, 1);
@@ -172,11 +173,11 @@ test_timer_racecond(void)
 	cur_time = rte_get_timer_cycles();
 	end_time = cur_time + (hz * TEST_DURATION_S);
 
-	/* start slave cores */
-	stop_slaves = 0;
+	/* start worker cores */
+	stop_workers = 0;
 	printf("Start timer manage race condition test (%u seconds)\n",
 			TEST_DURATION_S);
-	rte_eal_mp_remote_launch(slave_main_loop, NULL, SKIP_MASTER);
+	rte_eal_mp_remote_launch(worker_main_loop, NULL, SKIP_INITIAL);
 
 	while (diff >= 0) {
 		/* run the timers */
@@ -189,9 +190,9 @@ test_timer_racecond(void)
 		diff = end_time - cur_time;
 	}
 
-	/* stop slave cores */
+	/* stop worker cores */
 	printf("Stopping timer manage race condition test\n");
-	stop_slaves = 1;
+	stop_workers = 1;
 	rte_eal_mp_wait_lcore();
 
 	/* stop timers */
app/test/test_timer_secondary.c +1 -1
index 7a3bc873b359..86f187280120 100644
@@ -141,7 +141,7 @@ test_timer_secondary(void)
 		unsigned int *mgr_lcorep = &test_info->mgr_lcore;
 		unsigned int *sec_lcorep = &test_info->sec_lcore;
 
-		*mstr_lcorep = rte_get_master_lcore();
+		*mstr_lcorep = rte_get_initial_lcore();
 		*mgr_lcorep = rte_get_next_lcore(*mstr_lcorep, 1, 1);
 		*sec_lcorep = rte_get_next_lcore(*mgr_lcorep, 1, 1);
 
app/test/test_trace_perf.c +2 -2
index 50c7381b77e7..e1ad8e6f555c 100644
@@ -132,7 +132,7 @@ run_test(const char *str, lcore_function_t f, struct test_data *data, size_t sz)
 
 	memset(data, 0, sz);
 	data->nb_workers = rte_lcore_count() - 1;
-	RTE_LCORE_FOREACH_SLAVE(id)
+	RTE_LCORE_FOREACH_WORKER(id)
 		rte_eal_remote_launch(f, &data->ldata[worker++], id);
 
 	wait_till_workers_are_ready(data);
@@ -140,7 +140,7 @@ run_test(const char *str, lcore_function_t f, struct test_data *data, size_t sz)
 	measure_perf(str, data);
 	signal_workers_to_finish(data);
 
-	RTE_LCORE_FOREACH_SLAVE(id)
+	RTE_LCORE_FOREACH_WORKER(id)
 		rte_eal_wait_lcore(id);
 }
 
Signature · 1 line
2.26.2
#113 lore raw

Re: [dpdk-dev] [PATCH v4 20/27] app/test: replace refernces to master/slave

Quoted 4 lines · Stephen Hemminger

Use initial and worker when referring to lcores

---

You've changed the name of the test in test_eal_flags.c, but missed the update in meson.build to the new test name.

Also, you missed updating app/test/test_lpm_perf.c.

<snip>

Quoted 33 lines
app/test/test_service_cores.c +3 -4
index 981e212130bf..6b23363425c9 100644
@@ -30,7 +30,7 @@ static int
  testsuite_setup(void)
  {
  	slcore_id = rte_get_next_lcore(/* start core */ -1,
-				       /* skip master */ 1,
+				       /* skip initial */ 1,
  				       /* wrap */ 0);
 
  	return TEST_SUCCESS;
@@ -532,12 +532,12 @@ service_lcore_add_del(void)
  	TEST_ASSERT_EQUAL(1, rte_service_lcore_count(),
  			"Service core count not equal to one");
  	uint32_t slcore_1 = rte_get_next_lcore(/* start core */ -1,
-					       /* skip master */ 1,
+					       /* skip initial */ 1,
  					       /* wrap */ 0);
  	TEST_ASSERT_EQUAL(0, rte_service_lcore_add(slcore_1),
  			"Service core add did not return zero");
  	uint32_t slcore_2 = rte_get_next_lcore(/* start core */ slcore_1,
-					       /* skip master */ 1,
+					       /* skip initial */ 1,
  					       /* wrap */ 0);
  	TEST_ASSERT_EQUAL(0, rte_service_lcore_add(slcore_2),
  			"Service core add did not return zero");
@@ -583,12 +583,12 @@ service_threaded_test(int mt_safe)
 
  	/* add next 2 cores */
  	uint32_t slcore_1 = rte_get_next_lcore(/* start core */ -1,
-					       /* skip master */ 1,

app/test/test_service_cores.c service_threaded_test(int mt_safe) · line 594

Quoted 10 lines
app/test/test_service_cores.c +2 -1
+					       /* skip initial */ 1,
  					       /* wrap */ 0);
  	TEST_ASSERT_EQUAL(0, rte_service_lcore_add(slcore_1),
  			"mt safe lcore add fail");
  	uint32_t slcore_2 = rte_get_next_lcore(/* start core */ slcore_1,
-					       /* skip master */ 1,
+					       /* skip initial */ 1,
  					       /* wrap */ 0);
  	TEST_ASSERT_EQUAL(0, rte_service_lcore_add(slcore_2),
  			"mt safe lcore add fail");

There are two more instances @ lines 926 and 929.

Signature · 2 lines
Thanks,
Anatoly
#114 lore raw

PATCH v4 21/27 doc: fix incorrect reference to master process

In reply to Stephen Hemminger

Correct terminolgy here is primary process.
This is a bug in original doc.

Fixes fc1f2750a3ec ("doc: programmers guide")
---
 doc/guides/prog_guide/thread_safety_dpdk_functions.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
doc/guides/prog_guide/thread_safety_dpdk_functions.rst +2 -2
index 0f539db2b869..5618e25e47fb 100644
@@ -61,8 +61,8 @@ rather than subsequently in the forwarding threads.
 However, the DPDK performs checks to ensure that libraries are only initialized once.
 If initialization is attempted more than once, an error is returned.
 
-In the multi-process case, the configuration information of shared memory will only be initialized by the master process.
-Thereafter, both master and secondary processes can allocate/release any objects of memory that finally rely on rte_malloc or memzones.
+In the multi-process case, the configuration information of shared memory will only be initialized by the primary process.
+Thereafter, both primary and secondary processes can allocate/release any objects of memory that finally rely on rte_malloc or memzones.
 
 Interrupt Thread
 ----------------
Signature · 1 line
2.26.2
#116 lore raw

PATCH v4 22/27 doc: update references to master/slave lcore in documentation

In reply to Stephen Hemminger

New terms are initial and worker lcores.

---
 doc/guides/contributing/coding_style.rst            |  2 +-
 doc/guides/faq/faq.rst                              |  6 +++---
 doc/guides/howto/debug_troubleshoot.rst             |  2 +-
 doc/guides/linux_gsg/eal_args.include.rst           |  4 ++--
 doc/guides/nics/bnxt.rst                            |  2 +-
 doc/guides/nics/fail_safe.rst                       |  3 ---
 doc/guides/prog_guide/env_abstraction_layer.rst     |  6 +++---
 doc/guides/prog_guide/event_ethernet_rx_adapter.rst |  2 +-
 doc/guides/prog_guide/glossary.rst                  |  8 ++++----
 doc/guides/rel_notes/release_20_08.rst              |  7 ++++++-
 doc/guides/sample_app_ug/bbdev_app.rst              |  2 +-
 doc/guides/sample_app_ug/ethtool.rst                |  4 ++--
 doc/guides/sample_app_ug/hello_world.rst            |  8 ++++----
 doc/guides/sample_app_ug/ioat.rst                   | 12 ++++++------
 doc/guides/sample_app_ug/ip_pipeline.rst            |  4 ++--
 doc/guides/sample_app_ug/keep_alive.rst             |  2 +-
 doc/guides/sample_app_ug/l2_forward_event.rst       |  4 ++--
 .../sample_app_ug/l2_forward_real_virtual.rst       |  4 ++--
 doc/guides/sample_app_ug/l3_forward_graph.rst       |  6 +++---
 doc/guides/sample_app_ug/l3_forward_power_man.rst   |  2 +-
 doc/guides/sample_app_ug/link_status_intr.rst       |  4 ++--
 doc/guides/sample_app_ug/multi_process.rst          |  6 +++---
 doc/guides/sample_app_ug/packet_ordering.rst        |  8 ++++----
 doc/guides/sample_app_ug/performance_thread.rst     |  6 +++---
 doc/guides/sample_app_ug/qos_scheduler.rst          |  4 ++--
 doc/guides/sample_app_ug/timer.rst                  | 13 +++++++------
 doc/guides/testpmd_app_ug/run_app.rst               |  2 +-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst         |  2 +-
 28 files changed, 69 insertions(+), 66 deletions(-)
doc/guides/contributing/coding_style.rst +1 -1
index 4efde93f6af0..321d54438f7d 100644
@@ -334,7 +334,7 @@ For example:
 	typedef int (lcore_function_t)(void *);
 
 	/* launch a function of lcore_function_t type */
-	int rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned slave_id);
+	int rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned id);
 
 
 C Indentation
doc/guides/faq/faq.rst +3 -3
index f19c1389b6af..cb5f35923d64 100644
@@ -42,13 +42,13 @@ I am running a 32-bit DPDK application on a NUMA system, and sometimes the appli
 If your system has a lot (>1 GB size) of hugepage memory, not all of it will be allocated.
 Due to hugepages typically being allocated on a local NUMA node, the hugepages allocation the application gets during the initialization depends on which
 NUMA node it is running on (the EAL does not affinitize cores until much later in the initialization process).
-Sometimes, the Linux OS runs the DPDK application on a core that is located on a different NUMA node from DPDK master core and
+Sometimes, the Linux OS runs the DPDK application on a core that is located on a different NUMA node from DPDK initial core and
 therefore all the hugepages are allocated on the wrong socket.
 
 To avoid this scenario, either lower the amount of hugepage memory available to 1 GB size (or less), or run the application with taskset
-affinitizing the application to a would-be master core.
+affinitizing the application to a would-be initial core.
 
-For example, if your EAL coremask is 0xff0, the master core will usually be the first core in the coremask (0x10); this is what you have to supply to taskset::
+For example, if your EAL coremask is 0xff0, the initial core will usually be the first core in the coremask (0x10); this is what you have to supply to taskset::
 
    taskset 0x10 ./l2fwd -l 4-11 -n 2
 
doc/guides/howto/debug_troubleshoot.rst +1 -1
index cef016b2fef4..fdeaabe62206 100644
@@ -311,7 +311,7 @@ Custom worker function :numref:`dtg_distributor_worker`.
      SERVICE. Check performance functions are mapped to run on the cores.
 
    * For high-performance execution logic ensure running it on correct NUMA
-     and non-master core.
+     and worker core.
 
    * Analyze run logic with ``rte_dump_stack``, ``rte_dump_registers`` and
      ``rte_memdump`` for more insights.
doc/guides/linux_gsg/eal_args.include.rst +2 -2
index 0fe44579689b..ca7508fb423e 100644
@@ -33,9 +33,9 @@ Lcore-related options
     At a given instance only one core option ``--lcores``, ``-l`` or ``-c`` can
     be used.
 
-*   ``--master-lcore <core ID>``
+*   ``--initial-lcore <core ID>``
 
-    Core ID that is used as master.
+    Core ID that is used as initial lcore.
 
 *   ``-s <service core mask>``
 
doc/guides/nics/bnxt.rst +1 -1
index a53cdad21d34..6a7314a91627 100644
@@ -385,7 +385,7 @@ The application enables multiple TX and RX queues when it is started.
 
 .. code-block:: console
 
-    testpmd -l 1,3,5 --master-lcore 1 --txq=2 –rxq=2 --nb-cores=2
+    testpmd -l 1,3,5 --initial-lcore 1 --txq=2 –rxq=2 --nb-cores=2
 
 **TSS**
 
doc/guides/nics/fail_safe.rst +0 -3
index b4a92f663b17..3b15d6f0743d 100644
@@ -236,9 +236,6 @@ Upkeep round
     (brought down or up accordingly). Additionally, any sub-device marked for
     removal is cleaned-up.
 
-Slave
-    In the context of the fail-safe PMD, synonymous to sub-device.
-
 Sub-device
     A device being utilized by the fail-safe PMD.
     This is another PMD running underneath the fail-safe PMD.
doc/guides/prog_guide/env_abstraction_layer.rst +3 -3
index 48a2fec066db..463245463c52 100644
@@ -64,7 +64,7 @@ It consist of calls to the pthread library (more specifically, pthread_self(), p
 .. note::
 
     Initialization of objects, such as memory zones, rings, memory pools, lpm tables and hash tables,
-    should be done as part of the overall application initialization on the master lcore.
+    should be done as part of the overall application initialization on the initial lcore.
     The creation and initialization functions for these objects are not multi-thread safe.
     However, once initialized, the objects themselves can safely be used in multiple threads simultaneously.
 
@@ -186,7 +186,7 @@ very dependent on the memory allocation patterns of the application.
 
 Additional restrictions are present when running in 32-bit mode. In dynamic
 memory mode, by default maximum of 2 gigabytes of VA space will be preallocated,
-and all of it will be on master lcore NUMA node unless ``--socket-mem`` flag is
+and all of it will be on initial lcore NUMA node unless ``--socket-mem`` flag is
 used.
 
 In legacy mode, VA space will only be preallocated for segments that were
@@ -603,7 +603,7 @@ controlled with tools like taskset (Linux) or cpuset (FreeBSD),
 - with affinity restricted to 2-4, the Control Threads will end up on
   CPU 4.
 - with affinity restricted to 2-3, the Control Threads will end up on
-  CPU 2 (master lcore, which is the default when no CPU is available).
+  CPU 2 (initial lcore, which is the default when no CPU is available).
 
 .. _known_issue_label:
 
doc/guides/prog_guide/event_ethernet_rx_adapter.rst +1 -1
index c7dda92215ea..5d015fa2d678 100644
@@ -172,7 +172,7 @@ converts the received packets to events in the same manner as packets
 received on a polled Rx queue. The interrupt thread is affinitized to the same
 CPUs as the lcores of the Rx adapter service function, if the Rx adapter
 service function has not been mapped to any lcores, the interrupt thread
-is mapped to the master lcore.
+is mapped to the initial lcore.
 
 Rx Callback for SW Rx Adapter
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
doc/guides/prog_guide/glossary.rst +4 -4
index 21063a414729..3716efd13da2 100644
@@ -124,9 +124,9 @@ LAN
 LPM
    Longest Prefix Match
 
-master lcore
+initial lcore
    The execution unit that executes the main() function and that launches
-   other lcores.
+   other lcores. Described in older versions as master lcore.
 
 mbuf
    An mbuf is a data structure used internally to carry messages (mainly
@@ -184,8 +184,8 @@ RTE
 Rx
    Reception
 
-Slave lcore
-   Any *lcore* that is not the *master lcore*.
+Worker lcore
+   Any *lcore* that is not the *initial lcore*.
 
 Socket
    A physical CPU, that includes several *cores*.
doc/guides/rel_notes/release_20_08.rst +6 -1
index 5cbc4ce14446..ecbceb0d05e3 100644
@@ -107,6 +107,9 @@ New Features
   * Dump ``rte_flow`` memory consumption.
   * Measure packet per second forwarding.
 
+* **Renamed master lcore to initial lcore.**
+
+  The name given to the first thread in DPDK is changed from master lcore to initial lcore.
 
 Removed Items
 -------------
@@ -122,7 +125,6 @@ Removed Items
 
 * Removed ``RTE_KDRV_NONE`` based PCI device driver probing.
 
-
 API Changes
 -----------
 
@@ -143,6 +145,9 @@ API Changes
 * vhost: The API of ``rte_vhost_host_notifier_ctrl`` was changed to be per
   queue and not per device, a qid parameter was added to the arguments list.
 
+* ``rte_get_master_lcore`` was renamed to ``rte_get_initial_lcore``
+  The old function is deprecated and will be removed in future release.
+
 
 ABI Changes
 -----------
doc/guides/sample_app_ug/bbdev_app.rst +1 -1
index 405e706a46e4..5917d52ca199 100644
@@ -94,7 +94,7 @@ device gets linked to a corresponding ethernet port as whitelisted by
 the parameter -w.
 3 cores are allocated to the application, and assigned as:
 
- - core 3 is the master and used to print the stats live on screen,
+ - core 3 is the initial and used to print the stats live on screen,
 
  - core 4 is the encoding lcore performing Rx and Turbo Encode operations
 
doc/guides/sample_app_ug/ethtool.rst +2 -2
index 8f7fc6ca66c0..a4b92255c266 100644
@@ -64,8 +64,8 @@ Explanation
 -----------
 
 The sample program has two parts: A background `packet reflector`_
-that runs on a slave core, and a foreground `Ethtool Shell`_ that
-runs on the master core. These are described below.
+that runs on a worker core, and a foreground `Ethtool Shell`_ that
+runs on the initial core. These are described below.
 
 Packet Reflector
 ~~~~~~~~~~~~~~~~
doc/guides/sample_app_ug/hello_world.rst +4 -4
index 46f997a7dce3..f6740b10e385 100644
@@ -75,13 +75,13 @@ The code that launches the function on each lcore is as follows:
 
 .. code-block:: c
 
-    /* call lcore_hello() on every slave lcore */
+    /* call lcore_hello() on every worker lcore */
 
-    RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+    RTE_LCORE_FOREACH_WORKER(lcore_id) {
        rte_eal_remote_launch(lcore_hello, NULL, lcore_id);
     }
 
-    /* call it on master lcore too */
+    /* call it on initial lcore too */
 
     lcore_hello(NULL);
 
@@ -89,6 +89,6 @@ The following code is equivalent and simpler:
 
 .. code-block:: c
 
-    rte_eal_mp_remote_launch(lcore_hello, NULL, CALL_MASTER);
+    rte_eal_mp_remote_launch(lcore_hello, NULL, CALL_INITIAL);
 
 Refer to the *DPDK API Reference* for detailed information on the rte_eal_mp_remote_launch() function.
doc/guides/sample_app_ug/ioat.rst +6 -6
index bab7654b8d4d..c75b91bfa989 100644
@@ -69,13 +69,13 @@ provided parameters. The app can use up to 2 lcores: one of them receives
 incoming traffic and makes a copy of each packet. The second lcore then
 updates MAC address and sends the copy. If one lcore per port is used,
 both operations are done sequentially. For each configuration an additional
-lcore is needed since the master lcore does not handle traffic but is
+lcore is needed since the initial lcore does not handle traffic but is
 responsible for configuration, statistics printing and safe shutdown of
 all ports and devices.
 
 The application can use a maximum of 8 ports.
 
-To run the application in a Linux environment with 3 lcores (the master lcore,
+To run the application in a Linux environment with 3 lcores (the initial lcore,
 plus two forwarding cores), a single port (port 0), software copying and MAC
 updating issue the command:
 
@@ -83,7 +83,7 @@ updating issue the command:
 
     $ ./build/ioatfwd -l 0-2 -n 2 -- -p 0x1 --mac-updating -c sw
 
-To run the application in a Linux environment with 2 lcores (the master lcore,
+To run the application in a Linux environment with 2 lcores (the initial lcore,
 plus one forwarding core), 2 ports (ports 0 and 1), hardware copying and no MAC
 updating issue the command:
 
@@ -208,7 +208,7 @@ After that each port application assigns resources needed.
     cfg.nb_lcores = rte_lcore_count() - 1;
     if (cfg.nb_lcores < 1)
         rte_exit(EXIT_FAILURE,
-            "There should be at least one slave lcore.\n");
+            "There should be at least one worker lcore.\n");
 
     ret = 0;
 
@@ -310,8 +310,8 @@ If initialization is successful, memory for hardware device
 statistics is allocated.
 
 Finally ``main()`` function starts all packet handling lcores and starts
-printing stats in a loop on the master lcore. The application can be
-interrupted and closed using ``Ctrl-C``. The master lcore waits for
+printing stats in a loop on the initial lcore. The application can be
+interrupted and closed using ``Ctrl-C``. The initial lcore waits for
 all slave processes to finish, deallocates resources and exits.
 
 The processing lcores launching function are described below.
doc/guides/sample_app_ug/ip_pipeline.rst +2 -2
index 56014be17458..f395027b3498 100644
@@ -122,7 +122,7 @@ is displayed and the application is terminated.
 Run-time
 ~~~~~~~~
 
-The master thread is creating and managing all the application objects based on CLI input.
+The initial thread is creating and managing all the application objects based on CLI input.
 
 Each data plane thread runs one or several pipelines previously assigned to it in round-robin order. Each data plane thread
 executes two tasks in time-sharing mode:
@@ -130,7 +130,7 @@ executes two tasks in time-sharing mode:
 1. *Packet processing task*: Process bursts of input packets read from the pipeline input ports.
 
 2. *Message handling task*: Periodically, the data plane thread pauses the packet processing task and polls for request
-   messages send by the master thread. Examples: add/remove pipeline to/from current data plane thread, add/delete rules
+   messages send by the initial thread. Examples: add/remove pipeline to/from current data plane thread, add/delete rules
    to/from given table of a specific pipeline owned by the current data plane thread, read statistics, etc.
 
 Examples
doc/guides/sample_app_ug/keep_alive.rst +1 -1
index 865ba69e5c47..bca5df8ba934 100644
@@ -16,7 +16,7 @@ Overview
 --------
 
 The application demonstrates how to protect against 'silent outages'
-on packet processing cores. A Keep Alive Monitor Agent Core (master)
+on packet processing cores. A Keep Alive Monitor Agent Core (initial)
 monitors the state of packet processing cores (worker cores) by
 dispatching pings at a regular time interval (default is 5ms) and
 monitoring the state of the cores. Cores states are: Alive, MIA, Dead
doc/guides/sample_app_ug/l2_forward_event.rst +2 -2
index d536eee819d0..f384420cf1f0 100644
@@ -630,8 +630,8 @@ not many packets to send, however it improves performance:
 
                         /* if timer has reached its timeout */
                         if (unlikely(timer_tsc >= timer_period)) {
-                                /* do this only on master core */
-                                if (lcore_id == rte_get_master_lcore()) {
+                                /* do this only on initial core */
+                                if (lcore_id == rte_get_initial_lcore()) {
                                         print_stats();
                                         /* reset the timer */
                                         timer_tsc = 0;
doc/guides/sample_app_ug/l2_forward_real_virtual.rst +2 -2
index 671d0c7c19d4..615a55c36db9 100644
@@ -440,9 +440,9 @@ however it improves performance:
             /* if timer has reached its timeout */
 
             if (unlikely(timer_tsc >= (uint64_t) timer_period)) {
-                /* do this only on master core */
+                /* do this only on initial core */
 
-                if (lcore_id == rte_get_master_lcore()) {
+                if (lcore_id == rte_get_initial_lcore()) {
                     print_stats();
 
                     /* reset the timer */
doc/guides/sample_app_ug/l3_forward_graph.rst +3 -3
index df50827bab86..4ac96fc0c2f7 100644
@@ -22,7 +22,7 @@ Run-time path is main thing that differs from L3 forwarding sample application.
 Difference is that forwarding logic starting from Rx, followed by LPM lookup,
 TTL update and finally Tx is implemented inside graph nodes. These nodes are
 interconnected in graph framework. Application main loop needs to walk over
-graph using ``rte_graph_walk()`` with graph objects created one per slave lcore.
+graph using ``rte_graph_walk()`` with graph objects created one per worker lcore.
 
 The lookup method is as per implementation of ``ip4_lookup`` graph node.
 The ID of the output interface for the input packet is the next hop returned by
@@ -265,7 +265,7 @@ headers will be provided run-time using ``rte_node_ip4_route_add()`` and
     Since currently ``ip4_lookup`` and ``ip4_rewrite`` nodes don't support
     lock-less mechanisms(RCU, etc) to add run-time forwarding data like route and
     rewrite data, forwarding data is added before packet processing loop is
-    launched on slave lcore.
+    launched on worker lcore.
 
 .. code-block:: c
 
@@ -297,7 +297,7 @@ Packet Forwarding using Graph Walk
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Now that all the device configurations are done, graph creations are done and
-forwarding data is updated with nodes, slave lcores will be launched with graph
+forwarding data is updated with nodes, worker lcores will be launched with graph
 main loop. Graph main loop is very simple in the sense that it needs to
 continuously call a non-blocking API ``rte_graph_walk()`` with it's lcore
 specific graph object that was already created.
doc/guides/sample_app_ug/l3_forward_power_man.rst +1 -1
index 0cc6f2e62e75..f20502c41a37 100644
@@ -441,7 +441,7 @@ The telemetry mode support for ``l3fwd-power`` is a standalone mode, in this mod
 ``l3fwd-power`` does simple l3fwding along with calculating empty polls, full polls,
 and busy percentage for each forwarding core. The aggregation of these
 values of all cores is reported as application level telemetry to metric
-library for every 500ms from the master core.
+library for every 500ms from the initial core.
 
 The busy percentage is calculated by recording the poll_count
 and when the count reaches a defined value the total
doc/guides/sample_app_ug/link_status_intr.rst +2 -2
index 04c40f28540d..e31fd2cc7368 100644
@@ -401,9 +401,9 @@ However, it improves performance:
             /* if timer has reached its timeout */
 
             if (unlikely(timer_tsc >= (uint64_t) timer_period)) {
-                /* do this only on master core */
+                /* do this only on initial core */
 
-                if (lcore_id == rte_get_master_lcore()) {
+                if (lcore_id == rte_get_initial_lcore()) {
                     print_stats();
 
                     /* reset the timer */
doc/guides/sample_app_ug/multi_process.rst +3 -3
index f2a79a639763..51b8db5cf75a 100644
@@ -66,7 +66,7 @@ The process should start successfully and display a command prompt as follows:
 
     EAL: check igb_uio module
     EAL: check module finished
-    EAL: Master core 0 is ready (tid=54e41820)
+    EAL: Initial core 0 is ready (tid=54e41820)
     EAL: Core 1 is ready (tid=53b32700)
 
     Starting core 1
@@ -92,7 +92,7 @@ At any stage, either process can be terminated using the quit command.
 
 .. code-block:: console
 
-   EAL: Master core 10 is ready (tid=b5f89820)           EAL: Master core 8 is ready (tid=864a3820)
+   EAL: Initial core 10 is ready (tid=b5f89820)           EAL: Initial core 8 is ready (tid=864a3820)
    EAL: Core 11 is ready (tid=84ffe700)                  EAL: Core 9 is ready (tid=85995700)
    Starting core 11                                      Starting core 9
    simple_mp > send hello_secondary                      simple_mp > core 9: Received 'hello_secondary'
@@ -273,7 +273,7 @@ In addition to the EAL parameters, the application- specific parameters are:
 
 .. note::
 
-    In the server process, a single thread, the master thread, that is, the lowest numbered lcore in the coremask/corelist, performs all packet I/O.
+    In the server process, a single thread, the initial thread, that is, the lowest numbered lcore in the coremask/corelist, performs all packet I/O.
     If a coremask/corelist is specified with more than a single lcore bit set in it,
     an additional lcore will be used for a thread to periodically print packet count statistics.
 
doc/guides/sample_app_ug/packet_ordering.rst +4 -4
index 1c8ee5d04071..e82938bd7c9c 100644
@@ -12,14 +12,14 @@ Overview
 
 The application uses at least three CPU cores:
 
-* RX core (maser core) receives traffic from the NIC ports and feeds Worker
+* RX core (initial core) receives traffic from the NIC ports and feeds Worker
   cores with traffic through SW queues.
 
-* Worker core (slave core) basically do some light work on the packet.
+* Worker cores basically do some light work on the packet.
   Currently it modifies the output port of the packet for configurations with
   more than one port enabled.
 
-* TX Core (slave core) receives traffic from Worker cores through software queues,
+* TX Core receives traffic from Worker cores through software queues,
   inserts out-of-order packets into reorder buffer, extracts ordered packets
   from the reorder buffer and sends them to the NIC ports for transmission.
 
@@ -46,7 +46,7 @@ The application execution command line is:
     ./packet_ordering [EAL options] -- -p PORTMASK [--disable-reorder] [--insight-worker]
 
 The -c EAL CPU_COREMASK option has to contain at least 3 CPU cores.
-The first CPU core in the core mask is the master core and would be assigned to
+The first CPU core in the core mask is the initial core and would be assigned to
 RX core, the last to TX core and the rest to Worker cores.
 
 The PORTMASK parameter must contain either 1 or even enabled port numbers.
doc/guides/sample_app_ug/performance_thread.rst +3 -3
index b04d0ba444af..29105f9708eb 100644
@@ -280,8 +280,8 @@ functionality into different threads, and the pairs of RX and TX threads are
 interconnected via software rings.
 
 On initialization an L-thread scheduler is started on every EAL thread. On all
-but the master EAL thread only a dummy L-thread is initially started.
-The L-thread started on the master EAL thread then spawns other L-threads on
+but the initial EAL thread only a dummy L-thread is initially started.
+The L-thread started on the initial EAL thread then spawns other L-threads on
 different L-thread schedulers according the command line parameters.
 
 The RX threads poll the network interface queues and post received packets
@@ -1217,5 +1217,5 @@ Setting ``LTHREAD_DIAG`` also enables counting of statistics about cache and
 queue usage, and these statistics can be displayed by calling the function
 ``lthread_diag_stats_display()``. This function also performs a consistency
 check on the caches and queues. The function should only be called from the
-master EAL thread after all slave threads have stopped and returned to the C
+initial EAL thread after all worker threads have stopped and returned to the C
 main program, otherwise the consistency check will fail.
doc/guides/sample_app_ug/qos_scheduler.rst +2 -2
index b5010657a7d8..345ecbb5905d 100644
@@ -71,7 +71,7 @@ Optional application parameters include:
     In this mode, the application shows a command line that can be used for obtaining statistics while
     scheduling is taking place (see interactive mode below for more information).
 
-*   --mst n: Master core index (the default value is 1).
+*   --mst n: Initial core index (the default value is 1).
 
 *   --rsz "A, B, C": Ring sizes:
 
@@ -329,7 +329,7 @@ Another example with 2 packet flow configurations using different ports but shar
 Note that independent cores for the packet flow configurations for each of the RX, WT and TX thread are also supported,
 providing flexibility to balance the work.
 
-The EAL coremask/corelist is constrained to contain the default mastercore 1 and the RX, WT and TX cores only.
+The EAL coremask/corelist is constrained to contain the default initial lcore 1 and the RX, WT and TX cores only.
 
 Explanation
 -----------
doc/guides/sample_app_ug/timer.rst +7 -6
index 98d762d2388c..59a8ab11e9b6 100644
@@ -49,17 +49,18 @@ In addition to EAL initialization, the timer subsystem must be initialized, by c
     rte_timer_subsystem_init();
 
 After timer creation (see the next paragraph),
-the main loop is executed on each slave lcore using the well-known rte_eal_remote_launch() and also on the master.
+the main loop is executed on each worker lcore using the well-known rte_eal_remote_launch() and
+also on the initial lcore.
 
 .. code-block:: c
 
-    /* call lcore_mainloop() on every slave lcore  */
+    /* call lcore_mainloop() on every worker lcore  */
 
-    RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+    RTE_LCORE_FOREACH_WORKER(lcore_id) {
         rte_eal_remote_launch(lcore_mainloop, NULL, lcore_id);
     }
 
-    /* call it on master lcore too */
+    /* call it on initial lcore too */
 
     (void) lcore_mainloop(NULL);
 
@@ -105,7 +106,7 @@ This call to rte_timer_init() is necessary before doing any other operation on t
 
 Then, the two timers are configured:
 
-*   The first timer (timer0) is loaded on the master lcore and expires every second.
+*   The first timer (timer0) is loaded on the initial lcore and expires every second.
     Since the PERIODICAL flag is provided, the timer is reloaded automatically by the timer subsystem.
     The callback function is timer0_cb().
 
@@ -115,7 +116,7 @@ Then, the two timers are configured:
 
 .. code-block:: c
 
-    /* load timer0, every second, on master lcore, reloaded automatically */
+    /* load timer0, every second, on initial lcore, reloaded automatically */
 
     hz = rte_get_hpet_hz();
 
doc/guides/testpmd_app_ug/run_app.rst +1 -1
index f169604752b8..7d6b81de7f46 100644
@@ -71,7 +71,7 @@ The command line options are:
 *   ``--coremask=0xXX``
 
     Set the hexadecimal bitmask of the cores running the packet forwarding test.
-    The master lcore is reserved for command line parsing only and cannot be masked on for packet forwarding.
+    The initial lcore is reserved for command line parsing only and cannot be masked on for packet forwarding.
 
 *   ``--portmask=0xXX``
 
doc/guides/testpmd_app_ug/testpmd_funcs.rst +1 -1
index a808b6a308f2..7d4db1140092 100644
@@ -692,7 +692,7 @@ This is equivalent to the ``--coremask`` command-line option.
 
 .. note::
 
-   The master lcore is reserved for command line parsing only and cannot be masked on for packet forwarding.
+   The initial lcore is reserved for command line parsing only and cannot be masked on for packet forwarding.
 
 set portmask
 ~~~~~~~~~~~~
Signature · 1 line
2.26.2
#117 lore raw

Re: [dpdk-dev] [PATCH v4 22/27] doc: update references to master/slave lcore in documentation

Quoted 4 lines · Stephen Hemminger

New terms are initial and worker lcores.

---

<snip>

doc/guides/rel_notes/release_20_08.rst Removed Items · line 125

Quoted 11 lines
doc/guides/rel_notes/release_20_08.rst +3 -1
+* **Renamed master lcore to initial lcore.**
+
+  The name given to the first thread in DPDK is changed from master lcore to initial lcore.
 
  Removed Items
  -------------
@@ -122,7 +125,6 @@ Removed Items
 
  * Removed ``RTE_KDRV_NONE`` based PCI device driver probing.
 
-

Accidental whitespace change?

<snip>

doc/guides/sample_app_ug/ioat.rst If initialization is successful, memory for hardware device · line 315

Quoted 9 lines
doc/guides/sample_app_ug/ioat.rst +2 -2
@@ -310,8 +310,8 @@ If initialization is successful, memory for hardware device
  statistics is allocated.
 
  Finally ``main()`` function starts all packet handling lcores and starts
-printing stats in a loop on the master lcore. The application can be
-interrupted and closed using ``Ctrl-C``. The master lcore waits for
+printing stats in a loop on the initial lcore. The application can be
+interrupted and closed using ``Ctrl-C``. The initial lcore waits for
  all slave processes to finish, deallocates resources and exits.

Missed updating a line right below the changes. Also, i think worker cores were meant, not secondary processes.

<snip>

doc/guides/sample_app_ug/multi_process.rst The process should start successfully and display a command prompt as follows: · line 69

Quoted 11 lines
(quoted diff) +0 -0
                      /* reset the timer */
doc/guides/sample_app_ug/multi_process.rst +1 -1
index f2a79a639763..51b8db5cf75a 100644
@@ -66,7 +66,7 @@ The process should start successfully and display a command prompt as follows:
 
      EAL: check igb_uio module
      EAL: check module finished
-    EAL: Master core 0 is ready (tid=54e41820)
+    EAL: Initial core 0 is ready (tid=54e41820)

I believe you've missed updating a similar place (EAL logs) in quick start guide.

Signature · 2 lines
Thanks,
Anatoly
#118 lore raw

PATCH v4 23/27 app/pdump: replace references to master/slave lcore

In reply to Stephen Hemminger

Use initial and worker lcore instead.

---
 app/pdump/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/pdump/main.c +1 -1
index c38c53719e7d..1590a716a31d 100644
@@ -947,7 +947,7 @@ dump_packets(void)
 			rte_exit(EXIT_FAILURE, "failed to wait\n");
 	}
 
-	/* master core */
+	/* initial core */
 	while (!quit_signal)
 		;
 }
Signature · 1 line
2.26.2
#120 lore raw

PATCH v4 24/27 app/test-XXX: replace reference to master/slave

In reply to Stephen Hemminger

Use new terminology for lcore's

---
 app/test-acl/main.c              |  2 +-
 app/test-bbdev/test_bbdev_perf.c | 16 ++++++++--------
 app/test-compress-perf/main.c    |  8 ++++----
 app/test-crypto-perf/main.c      | 14 +++++++-------
 app/test-flow-perf/main.c        |  2 +-
 app/test-pipeline/main.c         |  4 ++--
 app/test-sad/main.c              |  4 ++--
 7 files changed, 25 insertions(+), 25 deletions(-)
app/test-acl/main.c +1 -1
index 0a5dfb621d5e..72ff26674dac 100644
@@ -1085,7 +1085,7 @@ main(int argc, char **argv)
 	if (config.trace_file != NULL)
 		tracef_init();
 
-	RTE_LCORE_FOREACH_SLAVE(lcore)
+	RTE_LCORE_FOREACH_WORKER(lcore)
 		 rte_eal_remote_launch(search_ip5tuples, NULL, lcore);
 
 	search_ip5tuples(NULL);
app/test-bbdev/test_bbdev_perf.c +8 -8
index 45c0d62acabc..fecd20f72e8a 100644
@@ -3651,14 +3651,14 @@ bler_test(struct active_device *ad,
 
 	rte_atomic16_set(&op_params->sync, SYNC_WAIT);
 
-	/* Master core is set at first entry */
+	/* Initial core is set at first entry */
 	t_params[0].dev_id = ad->dev_id;
 	t_params[0].lcore_id = rte_lcore_id();
 	t_params[0].op_params = op_params;
 	t_params[0].queue_id = ad->queue_ids[used_cores++];
 	t_params[0].iter_count = 0;
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (used_cores >= num_lcores)
 			break;
 
@@ -3675,7 +3675,7 @@ bler_test(struct active_device *ad,
 	rte_atomic16_set(&op_params->sync, SYNC_START);
 	ret = bler_function(&t_params[0]);
 
-	/* Master core is always used */
+	/* Initial core is always used */
 	for (used_cores = 1; used_cores < num_lcores; used_cores++)
 		ret |= rte_eal_wait_lcore(t_params[used_cores].lcore_id);
 
@@ -3769,14 +3769,14 @@ throughput_test(struct active_device *ad,
 
 	rte_atomic16_set(&op_params->sync, SYNC_WAIT);
 
-	/* Master core is set at first entry */
+	/* Initial core is set at first entry */
 	t_params[0].dev_id = ad->dev_id;
 	t_params[0].lcore_id = rte_lcore_id();
 	t_params[0].op_params = op_params;
 	t_params[0].queue_id = ad->queue_ids[used_cores++];
 	t_params[0].iter_count = 0;
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (used_cores >= num_lcores)
 			break;
 
@@ -3793,7 +3793,7 @@ throughput_test(struct active_device *ad,
 	rte_atomic16_set(&op_params->sync, SYNC_START);
 	ret = throughput_function(&t_params[0]);
 
-	/* Master core is always used */
+	/* Initial core is always used */
 	for (used_cores = 1; used_cores < num_lcores; used_cores++)
 		ret |= rte_eal_wait_lcore(t_params[used_cores].lcore_id);
 
@@ -3817,7 +3817,7 @@ throughput_test(struct active_device *ad,
 	/* In interrupt TC we need to wait for the interrupt callback to deqeue
 	 * all pending operations. Skip waiting for queues which reported an
 	 * error using processing_status variable.
-	 * Wait for master lcore operations.
+	 * Wait for initial lcore operations.
 	 */
 	tp = &t_params[0];
 	while ((rte_atomic16_read(&tp->nb_dequeued) <
@@ -3830,7 +3830,7 @@ throughput_test(struct active_device *ad,
 	tp->mbps /= TEST_REPETITIONS;
 	ret |= (int)rte_atomic16_read(&tp->processing_status);
 
-	/* Wait for slave lcores operations */
+	/* Wait for worker lcores operations */
 	for (used_cores = 1; used_cores < num_lcores; used_cores++) {
 		tp = &t_params[used_cores];
 
app/test-compress-perf/main.c +4 -4
index ed21605d89c2..cc9951a9b107 100644
@@ -389,7 +389,7 @@ main(int argc, char **argv)
 	i = 0;
 	uint8_t qp_id = 0, cdev_index = 0;
 
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 
 		if (i == total_nb_qps)
 			break;
@@ -413,7 +413,7 @@ main(int argc, char **argv)
 	while (test_data->level <= test_data->level_lst.max) {
 
 		i = 0;
-		RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+		RTE_LCORE_FOREACH_WORKER(lcore_id) {
 
 			if (i == total_nb_qps)
 				break;
@@ -424,7 +424,7 @@ main(int argc, char **argv)
 			i++;
 		}
 		i = 0;
-		RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+		RTE_LCORE_FOREACH_WORKER(lcore_id) {
 
 			if (i == total_nb_qps)
 				break;
@@ -449,7 +449,7 @@ main(int argc, char **argv)
 
 	case ST_DURING_TEST:
 		i = 0;
-		RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+		RTE_LCORE_FOREACH_WORKER(lcore_id) {
 			if (i == total_nb_qps)
 				break;
 
app/test-crypto-perf/main.c +7 -7
index 7bb286ccbe6c..9cab779e164c 100644
@@ -590,7 +590,7 @@ main(int argc, char **argv)
 
 	i = 0;
 	uint8_t qp_id = 0, cdev_index = 0;
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 
 		if (i == total_nb_qps)
 			break;
@@ -654,7 +654,7 @@ main(int argc, char **argv)
 				distribution_total[buffer_size_count - 1];
 
 		i = 0;
-		RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+		RTE_LCORE_FOREACH_WORKER(lcore_id) {
 
 			if (i == total_nb_qps)
 				break;
@@ -664,7 +664,7 @@ main(int argc, char **argv)
 			i++;
 		}
 		i = 0;
-		RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+		RTE_LCORE_FOREACH_WORKER(lcore_id) {
 
 			if (i == total_nb_qps)
 				break;
@@ -684,7 +684,7 @@ main(int argc, char **argv)
 
 		while (opts.test_buffer_size <= opts.max_buffer_size) {
 			i = 0;
-			RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+			RTE_LCORE_FOREACH_WORKER(lcore_id) {
 
 				if (i == total_nb_qps)
 					break;
@@ -694,7 +694,7 @@ main(int argc, char **argv)
 				i++;
 			}
 			i = 0;
-			RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+			RTE_LCORE_FOREACH_WORKER(lcore_id) {
 
 				if (i == total_nb_qps)
 					break;
@@ -718,7 +718,7 @@ main(int argc, char **argv)
 	}
 
 	i = 0;
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 
 		if (i == total_nb_qps)
 			break;
@@ -738,7 +738,7 @@ main(int argc, char **argv)
 
 err:
 	i = 0;
-	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (i == total_nb_qps)
 			break;
 
app/test-flow-perf/main.c +1 -1
index 1ae285655669..99a2e1e4ccc9 100644
@@ -1097,7 +1097,7 @@ main(int argc, char **argv)
 
 	if (enable_fwd) {
 		init_lcore_info();
-		rte_eal_mp_remote_launch(start_forwarding, NULL, CALL_MASTER);
+		rte_eal_mp_remote_launch(start_forwarding, NULL, CALL_INITIAL);
 	}
 
 	RTE_ETH_FOREACH_DEV(port) {
app/test-pipeline/main.c +2 -2
index 7f0d6d3f1862..a54c32a32d17 100644
@@ -66,8 +66,8 @@ main(int argc, char **argv)
 	app_init();
 
 	/* Launch per-lcore init on every lcore */
-	rte_eal_mp_remote_launch(app_lcore_main_loop, NULL, CALL_MASTER);
-	RTE_LCORE_FOREACH_SLAVE(lcore) {
+	rte_eal_mp_remote_launch(app_lcore_main_loop, NULL, CALL_INITIAL);
+	RTE_LCORE_FOREACH_WORKER(lcore) {
 		if (rte_eal_wait_lcore(lcore) < 0)
 			return -1;
 	}
app/test-sad/main.c +2 -2
index b01e84c570bb..38cd40ee87cf 100644
@@ -657,11 +657,11 @@ main(int argc, char **argv)
 
 	add_rules(sad, 10);
 	if (config.parallel_lookup)
-		rte_eal_mp_remote_launch(lookup, sad, SKIP_MASTER);
+		rte_eal_mp_remote_launch(lookup, sad, SKIP_INITIAL);
 
 	lookup(sad);
 	if (config.parallel_lookup)
-		RTE_LCORE_FOREACH_SLAVE(lcore_id)
+		RTE_LCORE_FOREACH_WORKER(lcore_id)
 			if (rte_eal_wait_lcore(lcore_id) < 0)
 				return -1;
 
Signature · 1 line
2.26.2
#122 lore raw

PATCH v4 25/27 eal: mark old naming as deprecated

In reply to Stephen Hemminger

Use of old RTE_LCORE_FOREACH_SLAVE and rte_get_master_lcore_id() are marked as deprecated.

All uses of these in DPDK itself is gone. This will cause warnings for applications still using them.

---
 lib/librte_eal/include/rte_launch.h | 4 ++--
 lib/librte_eal/include/rte_lcore.h  | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)
lib/librte_eal/include/rte_launch.h +2 -2
index 9b68685d99d4..8d58ca5302a7 100644
@@ -76,8 +76,8 @@ enum rte_rmt_call_initial_t {
 /**
  * Deprecated backward compatiable definitions
  */
-#define SKIP_MASTER	SKIP_INITIAL
-#define CALL_MASTER	CALL_INITIAL
+#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is deprecated\"") SKIP_INITIAL
+#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL
 
 /**
  * Launch a function on all lcores.
lib/librte_eal/include/rte_lcore.h +3 -1
index 069cb1f427b9..eaa7c0f0b67c 100644
@@ -67,6 +67,7 @@ unsigned int rte_get_initial_lcore(void);
  * @return
  *   the id of the initial lcore
  */
+__rte_deprecated
 unsigned int rte_get_master_lcore(void);
 
 /**
@@ -216,7 +217,8 @@ unsigned int rte_get_next_lcore(unsigned int i, int skip_initial, int wrap);
 /**
  * Backward compatibility
  */
-#define RTE_LCORE_FOREACH_SLAVE(x)		\
+#define RTE_LCORE_FOREACH_SLAVE(x)					\
+	_Pragma("GCC warning \"'RTE_LCORE_FOREACH_SLAVE' macro is deprecated\"") \
 	RTE_LCORE_FOREACH_WORKER(x)
 
 
Signature · 1 line
2.26.2
#123 lore raw

Re: [dpdk-dev] [PATCH v4 25/27] eal: mark old naming as deprecated

Quoted 17 lines · Stephen Hemminger

Use of old RTE_LCORE_FOREACH_SLAVE and rte_get_master_lcore_id() are marked as deprecated.

All uses of these in DPDK itself is gone. This will cause warnings for applications still using them.

---
  lib/librte_eal/include/rte_launch.h | 4 ++--
  lib/librte_eal/include/rte_lcore.h  | 4 +++-
  2 files changed, 5 insertions(+), 3 deletions(-)
lib/librte_eal/include/rte_launch.h +0 -0
index 9b68685d99d4..8d58ca5302a7 100644

lib/librte_eal/include/rte_launch.h enum rte_rmt_call_initial_t { · line 80

Quoted 7 lines
lib/librte_eal/include/rte_launch.h +2 -2
@@ -76,8 +76,8 @@ enum rte_rmt_call_initial_t {
  /**
   * Deprecated backward compatiable definitions
   */
-#define SKIP_MASTER	SKIP_INITIAL
-#define CALL_MASTER	CALL_INITIAL
+#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is deprecated\"") SKIP_INITIAL
+#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL

Presumably this is a generic header, should we introduce GCC-specific things there?

Quoted 16 lines
lib/librte_eal/include/rte_launch.h +0 -0
  /**
   * Launch a function on all lcores.
lib/librte_eal/include/rte_lcore.h +1 -0
index 069cb1f427b9..eaa7c0f0b67c 100644
@@ -67,6 +67,7 @@ unsigned int rte_get_initial_lcore(void);
   * @return
   *   the id of the initial lcore
   */
+__rte_deprecated
  unsigned int rte_get_master_lcore(void);
 
  /**

lib/librte_eal/include/rte_lcore.h unsigned int rte_get_next_lcore(unsigned int i, int skip_initial, int wrap); · line 222

Quoted 7 lines
lib/librte_eal/include/rte_lcore.h +2 -1
@@ -216,7 +217,8 @@ unsigned int rte_get_next_lcore(unsigned int i, int skip_initial, int wrap);
  /**
   * Backward compatibility
   */
-#define RTE_LCORE_FOREACH_SLAVE(x)		\
+#define RTE_LCORE_FOREACH_SLAVE(x)					\
+	_Pragma("GCC warning \"'RTE_LCORE_FOREACH_SLAVE' macro is deprecated\"") \
  	RTE_LCORE_FOREACH_WORKER(x)

Same as above.

Quoted 3 lines
Signature · 2 lines
Thanks,
Anatoly
#124 lore raw

Re: [dpdk-dev] [PATCH v4 25/27] eal: mark old naming as deprecated

Quoted 7 lines · Anatoly

lib/librte_eal/include/rte_launch.h enum rte_rmt_call_initial_t { · line 80

Quoted 4 lines
lib/librte_eal/include/rte_launch.h +2 -2
-#define SKIP_MASTER	SKIP_INITIAL
-#define CALL_MASTER	CALL_INITIAL
+#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is deprecated\"") SKIP_INITIAL
+#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL  

Presumably this is a generic header, should we introduce GCC-specific things there?

It works with Clang as well. Likely ICC but don't have that.

#125 lore raw

Re: [dpdk-dev] [PATCH v4 25/27] eal: mark old naming as deprecated

Quoted 11 lines · Stephen Hemminger
Quoted 7 lines · Anatoly

lib/librte_eal/include/rte_launch.h enum rte_rmt_call_initial_t { · line 80

Quoted 4 lines
lib/librte_eal/include/rte_launch.h +2 -2
-#define SKIP_MASTER	SKIP_INITIAL
-#define CALL_MASTER	CALL_INITIAL
+#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is deprecated\"") SKIP_INITIAL
+#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL

Presumably this is a generic header, should we introduce GCC-specific things there?

Quoted 2 lines

It works with Clang as well. Likely ICC but don't have that.

What about MSVC?

Signature · 2 lines
Thanks,
Anatoly
#126 lore raw

Re: [dpdk-dev] [PATCH v4 25/27] eal: mark old naming as deprecated

Quoted 12 lines · Anatoly
Quoted 11 lines · Stephen Hemminger
Quoted 7 lines · Anatoly

lib/librte_eal/include/rte_launch.h enum rte_rmt_call_initial_t { · line 80

Quoted 4 lines
lib/librte_eal/include/rte_launch.h +2 -2
-#define SKIP_MASTER	SKIP_INITIAL
-#define CALL_MASTER	CALL_INITIAL
+#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is deprecated\"") SKIP_INITIAL
+#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL  

Presumably this is a generic header, should we introduce GCC-specific things there?

Quoted 5 lines
Quoted 2 lines

It works with Clang as well. Likely ICC but don't have that.

What about MSVC?

_Pragma is C99 standard so MSVC know it.
MSVC should ignore any pragman it doesn't understand.

There is a better pragma for deprecating keywords in MSVC, but GCC and Clang don't understand it.

#127 lore raw

Re: [dpdk-dev] [PATCH v4 25/27] eal: mark old naming as deprecated

Quoted 18 lines · Stephen Hemminger
Quoted 15 lines · Anatoly
Quoted 13 lines · Stephen Hemminger
Quoted 7 lines · Anatoly

lib/librte_eal/include/rte_launch.h enum rte_rmt_call_initial_t { · line 80

Quoted 4 lines
lib/librte_eal/include/rte_launch.h +2 -2
-#define SKIP_MASTER	SKIP_INITIAL
-#define CALL_MASTER	CALL_INITIAL
+#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is deprecated\"") SKIP_INITIAL
+#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL

Presumably this is a generic header, should we introduce GCC-specific things there?

It works with Clang as well. Likely ICC but don't have that.

Quoted 9 lines
Quoted 2 lines

What about MSVC?

_Pragma is C99 standard so MSVC know it.
MSVC should ignore any pragman it doesn't understand.

There is a better pragma for deprecating keywords in MSVC, but GCC and Clang don't understand it.

Deprecating macros sounds like something we might want to do in the future, can't we put some macro into rte_common.h to address this? e.g. something like

#ifdef MSVC
#define rte_deprecated_macro _msvc_pragma_whatever() #else
#define rte_deprecated_macro _Pragma("GCC warning ...") #endif

and use this macro here?

Signature · 2 lines
Thanks,
Anatoly
#128 lore raw

Re: [dpdk-dev] [PATCH v4 25/27] eal: mark old naming as deprecated

Quoted 8 lines · Anatoly
Quoted 7 lines · Stephen Hemminger
Quoted 4 lines · Anatoly
Quoted 3 lines · Stephen Hemminger

On Wed, 15 Jul 2020 14:28:17 +0100
"Burakov, Anatoly" <[email protected]> wrote:

Quoted 15 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

lib/librte_eal/include/rte_launch.h enum rte_rmt_call_initial_t {

Quoted 3 lines
lib/librte_eal/include/rte_launch.h +1 -2
-#define SKIP_MASTER      SKIP_INITIAL
-#define CALL_MASTER      CALL_INITIAL
+#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is

deprecated\"") SKIP_INITIAL

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

+#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is

deprecated\"") CALL_INITIAL

Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Presumably this is a generic header, should we introduce GCC-specific things there?

It works with Clang as well. Likely ICC but don't have that.

What about MSVC?

FYI, DPDK on Windows is compiled with Clang, only linker is from MSVC. And MinGW uses GCC toolchain. Why care about MSVC here?

#129 lore raw

Re: [dpdk-dev] [PATCH v4 25/27] eal: mark old naming as deprecated

Quoted 29 lines · Dmitry Kozliuk

On Fri, Jul 17, 2020, 18:21 Burakov, Anatoly <[email protected] <mailto:[email protected]>> wrote:

    On 16-Jul-20 11:04 PM, Stephen Hemminger wrote:
     > On Thu, 16 Jul 2020 14:41:41 +0100
     > "Burakov, Anatoly" <[email protected]
    <mailto:[email protected]>> wrote:
     >
     >> On 15-Jul-20 9:29 PM, Stephen Hemminger wrote:
     >>> On Wed, 15 Jul 2020 14:28:17 +0100
     >>> "Burakov, Anatoly" <[email protected]
    <mailto:[email protected]>> wrote:
     >>>
     >>>>> -#define SKIP_MASTER      SKIP_INITIAL
     >>>>> -#define CALL_MASTER      CALL_INITIAL
     >>>>> +#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is
    deprecated\"") SKIP_INITIAL
     >>>>> +#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is
    deprecated\"") CALL_INITIAL
     >>>>
     >>>> Presumably this is a generic header, should we introduce
    GCC-specific
     >>>> things there?
     >>>
     >>> It works with Clang as well. Likely ICC but don't have that.
     >>>
     >>
     >> What about MSVC?
Quoted 1 line

FYI, DPDK on Windows is compiled with Clang, only linker is from MSVC. And MinGW uses GCC toolchain. Why care about MSVC here?

Ah, OK. I'm not too familiar with Windows port, i was assuming it uses MSVC.

Signature · 2 lines
Thanks,
Anatoly
#130 lore raw

Re: [dpdk-dev] [PATCH v4 25/27] eal: mark old naming as deprecated

Quoted 30 lines · Anatoly
Quoted 29 lines · Dmitry Kozliuk

On Fri, Jul 17, 2020, 18:21 Burakov, Anatoly <[email protected] <mailto:[email protected]>> wrote:

    On 16-Jul-20 11:04 PM, Stephen Hemminger wrote:
     > On Thu, 16 Jul 2020 14:41:41 +0100
     > "Burakov, Anatoly" <[email protected] <mailto:[email protected]>> wrote:
     >
     >> On 15-Jul-20 9:29 PM, Stephen Hemminger wrote:
     >>> On Wed, 15 Jul 2020 14:28:17 +0100
     >>> "Burakov, Anatoly" <[email protected] <mailto:[email protected]>> wrote:
     >>>
     >>>>> -#define SKIP_MASTER      SKIP_INITIAL
     >>>>> -#define CALL_MASTER      CALL_INITIAL
     >>>>> +#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is deprecated\"") SKIP_INITIAL
     >>>>> +#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL
     >>>>
     >>>> Presumably this is a generic header, should we introduce GCC-specific
     >>>> things there?
     >>>
     >>> It works with Clang as well. Likely ICC but don't have that. >>>
     >>
     >> What about MSVC?

Quoted 4 lines
Quoted 1 line

FYI, DPDK on Windows is compiled with Clang, only linker is from MSVC. And MinGW uses GCC toolchain. Why care about MSVC here?

Ah, OK. I'm not too familiar with Windows port, i was assuming it uses MSVC.

Nevertheless, i would prefer having a macro for these kinds of cases, however rare they are.

Signature · 2 lines
Thanks,
Anatoly
#131 lore raw

Re: [dpdk-dev] [PATCH v4 25/27] eal: mark old naming as deprecated

In reply to Burakov, Anatoly
Quoted 33 lines · Anatoly
Quoted 18 lines · Stephen Hemminger
Quoted 15 lines · Anatoly
Quoted 13 lines · Stephen Hemminger
Quoted 7 lines · Anatoly

lib/librte_eal/include/rte_launch.h enum rte_rmt_call_initial_t { · line 80

Quoted 4 lines
lib/librte_eal/include/rte_launch.h +2 -2
-#define SKIP_MASTER	SKIP_INITIAL
-#define CALL_MASTER	CALL_INITIAL
+#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is deprecated\"") SKIP_INITIAL
+#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL  

Presumably this is a generic header, should we introduce GCC-specific things there?

It works with Clang as well. Likely ICC but don't have that.

Quoted 9 lines
Quoted 2 lines

What about MSVC?

_Pragma is C99 standard so MSVC know it.
MSVC should ignore any pragman it doesn't understand.

There is a better pragma for deprecating keywords in MSVC, but GCC and Clang don't understand it.

Deprecating macros sounds like something we might want to do in the future, can't we put some macro into rte_common.h to address this? e.g. something like

Quoted 7 lines

#ifdef MSVC
#define rte_deprecated_macro _msvc_pragma_whatever() #else
#define rte_deprecated_macro _Pragma("GCC warning ...") #endif

and use this macro here?

It gets hard to do macro in a macro,

#132 lore raw

Re: [dpdk-dev] [PATCH v4 25/27] eal: mark old naming as deprecated

Quoted 42 lines · Stephen Hemminger
Quoted 39 lines · Anatoly
Quoted 18 lines · Stephen Hemminger
Quoted 15 lines · Anatoly
Quoted 13 lines · Stephen Hemminger
Quoted 7 lines · Anatoly

Review

Quoted 4 lines
(quoted diff) +2 -2
-#define SKIP_MASTER	SKIP_INITIAL
-#define CALL_MASTER	CALL_INITIAL
+#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is deprecated\"") SKIP_INITIAL
+#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL

Presumably this is a generic header, should we introduce GCC-specific things there?

It works with Clang as well. Likely ICC but don't have that.

Quoted 9 lines
Quoted 2 lines

What about MSVC?

_Pragma is C99 standard so MSVC know it.
MSVC should ignore any pragman it doesn't understand.

There is a better pragma for deprecating keywords in MSVC, but GCC and Clang don't understand it.

Deprecating macros sounds like something we might want to do in the future, can't we put some macro into rte_common.h to address this? e.g. something like

#ifdef MSVC
#define rte_deprecated_macro _msvc_pragma_whatever() #else
#define rte_deprecated_macro _Pragma("GCC warning ...") #endif

Quoted 4 lines
Quoted 1 line

and use this macro here?

It gets hard to do macro in a macro,

I don't have a strong opinion on this, but IMO it's certainly better than having a compiler-specific things in an API header file :)

Signature · 2 lines
Thanks,
Anatoly
#133 lore raw

Re: [dpdk-dev] [PATCH v4 25/27] eal: mark old naming as deprecated

Quoted 43 lines · Anatoly
Quoted 42 lines · Stephen Hemminger
Quoted 39 lines · Anatoly
Quoted 18 lines · Stephen Hemminger
Quoted 15 lines · Anatoly
Quoted 13 lines · Stephen Hemminger
Quoted 7 lines · Anatoly

Review

Quoted 4 lines
(quoted diff) +2 -2
-#define SKIP_MASTER	SKIP_INITIAL
-#define CALL_MASTER	CALL_INITIAL
+#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is deprecated\"") SKIP_INITIAL
+#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL  

Presumably this is a generic header, should we introduce GCC-specific things there?

It works with Clang as well. Likely ICC but don't have that.

Quoted 9 lines
Quoted 2 lines

What about MSVC?

_Pragma is C99 standard so MSVC know it.
MSVC should ignore any pragman it doesn't understand.

There is a better pragma for deprecating keywords in MSVC, but GCC and Clang don't understand it.

Deprecating macros sounds like something we might want to do in the future, can't we put some macro into rte_common.h to address this? e.g. something like

#ifdef MSVC
#define rte_deprecated_macro _msvc_pragma_whatever() #else
#define rte_deprecated_macro _Pragma("GCC warning ...") #endif

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

and use this macro here?

It gets hard to do macro in a macro,

I don't have a strong opinion on this, but IMO it's certainly better than having a compiler-specific things in an API header file :)

I was hoping for macro volunteer?

Something like:
#define RTE_DEPRECATED(foo) ...

#134 lore raw

Re: [dpdk-dev] [PATCH v4 25/27] eal: mark old naming as deprecated

Quoted 51 lines · Stephen Hemminger
Quoted 48 lines · Anatoly
Quoted 46 lines · Stephen Hemminger
Quoted 33 lines · Anatoly
Quoted 18 lines · Stephen Hemminger
Quoted 15 lines · Anatoly
Quoted 13 lines · Stephen Hemminger
Quoted 7 lines · Anatoly

Review

Quoted 4 lines
(quoted diff) +2 -2
-#define SKIP_MASTER	SKIP_INITIAL
-#define CALL_MASTER	CALL_INITIAL
+#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is deprecated\"") SKIP_INITIAL
+#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL

Presumably this is a generic header, should we introduce GCC-specific things there?

It works with Clang as well. Likely ICC but don't have that.

Quoted 9 lines
Quoted 2 lines

What about MSVC?

_Pragma is C99 standard so MSVC know it.
MSVC should ignore any pragman it doesn't understand.

There is a better pragma for deprecating keywords in MSVC, but GCC and Clang don't understand it.

Deprecating macros sounds like something we might want to do in the future, can't we put some macro into rte_common.h to address this? e.g. something like

Quoted 7 lines

#ifdef MSVC
#define rte_deprecated_macro _msvc_pragma_whatever() #else
#define rte_deprecated_macro _Pragma("GCC warning ...") #endif

and use this macro here?

It gets hard to do macro in a macro,

Quoted 9 lines
Quoted 3 lines

I don't have a strong opinion on this, but IMO it's certainly better than having a compiler-specific things in an API header file :)

I was hoping for macro volunteer?

Something like:
#define RTE_DEPRECATED(foo) ...

Oh, sure, apologies for not picking up on that :D

A bit on the ugly side, but should work:

#define __rte_deprecated_macro(val) (_Pragma("GCC warning \"'" #val "'\" is deprecated\"") (val))

To be used as:

#define NEW __rte_deprecated_macro(OLD)

(I feel there could be confusion between __rte_deprecated and RTE_DEPRECATED, so both for consistency and clarity, i believe "__rte_deprecated_macro" would be a better name - however, no strong opinion, RTE_DEPRECATED is fine by me as well)

Signature · 2 lines
Thanks,
Anatoly
#135 lore raw

Re: [dpdk-dev] [PATCH v4 25/27] eal: mark old naming as deprecated

Quoted 61 lines · Anatoly
Quoted 46 lines · Stephen Hemminger
Quoted 43 lines · Anatoly
Quoted 41 lines · Stephen Hemminger
Quoted 30 lines · Anatoly
Quoted 17 lines · Stephen Hemminger
Quoted 15 lines · Anatoly
Quoted 13 lines · Stephen Hemminger
Quoted 9 lines · Anatoly
Quoted 6 lines
(quoted diff) +1 -2
-#define SKIP_MASTER    SKIP_INITIAL
-#define CALL_MASTER    CALL_INITIAL
+#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is 

deprecated\"") SKIP_INITIAL
+#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL

Presumably this is a generic header, should we introduce GCC-specific things there?

It works with Clang as well. Likely ICC but don't have that.

Quoted 7 lines
Quoted 1 line

What about MSVC?

_Pragma is C99 standard so MSVC know it.
MSVC should ignore any pragman it doesn't understand.

There is a better pragma for deprecating keywords in MSVC, but GCC and Clang don't understand it.

Deprecating macros sounds like something we might want to do in the future, can't we put some macro into rte_common.h to address this? e.g. something like

Quoted 7 lines

#ifdef MSVC
#define rte_deprecated_macro _msvc_pragma_whatever() #else
#define rte_deprecated_macro _Pragma("GCC warning ...") #endif

and use this macro here?

It gets hard to do macro in a macro,

Quoted 9 lines
Quoted 3 lines

I don't have a strong opinion on this, but IMO it's certainly better than having a compiler-specific things in an API header file :)

I was hoping for macro volunteer?

Something like:
#define RTE_DEPRECATED(foo) ...

Oh, sure, apologies for not picking up on that :D

A bit on the ugly side, but should work:

Quoted 8 lines

#define __rte_deprecated_macro(val) (_Pragma("GCC warning \"'" #val "'\" is deprecated\"") (val))

To be used as:

#define NEW __rte_deprecated_macro(OLD)

(I feel there could be confusion between __rte_deprecated and RTE_DEPRECATED, so both for consistency and clarity, i believe "__rte_deprecated_macro" would be a better name - however, no strong opinion, RTE_DEPRECATED is fine by me as well)

Sorry, realized that i've done it the other way around :D

Perhaps this one would be better:

#define __rte_deprecated_macro(old) _Pragma("GCC warning \"'" #old "'\" is deprecated\"")

...

#define OLD __rte_deprecated_macro(OLD) NEW

Signature · 2 lines
Thanks,
Anatoly
#136 lore raw

Re: [dpdk-dev] [PATCH v4 25/27] eal: mark old naming as deprecated

In reply to Burakov, Anatoly
Quoted 69 lines · Anatoly
Quoted 51 lines · Stephen Hemminger
Quoted 48 lines · Anatoly
Quoted 46 lines · Stephen Hemminger
Quoted 33 lines · Anatoly
Quoted 18 lines · Stephen Hemminger
Quoted 15 lines · Anatoly
Quoted 13 lines · Stephen Hemminger
Quoted 7 lines · Anatoly

Review

Quoted 4 lines
(quoted diff) +2 -2
-#define SKIP_MASTER	SKIP_INITIAL
-#define CALL_MASTER	CALL_INITIAL
+#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is deprecated\"") SKIP_INITIAL
+#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL  

Presumably this is a generic header, should we introduce GCC-specific things there?

It works with Clang as well. Likely ICC but don't have that.

Quoted 9 lines
Quoted 2 lines

What about MSVC?

_Pragma is C99 standard so MSVC know it.
MSVC should ignore any pragman it doesn't understand.

There is a better pragma for deprecating keywords in MSVC, but GCC and Clang don't understand it.

Deprecating macros sounds like something we might want to do in the future, can't we put some macro into rte_common.h to address this? e.g. something like

Quoted 7 lines

#ifdef MSVC
#define rte_deprecated_macro _msvc_pragma_whatever() #else
#define rte_deprecated_macro _Pragma("GCC warning ...") #endif

and use this macro here?

It gets hard to do macro in a macro,

Quoted 9 lines
Quoted 3 lines

I don't have a strong opinion on this, but IMO it's certainly better than having a compiler-specific things in an API header file :)

I was hoping for macro volunteer?

Something like:
#define RTE_DEPRECATED(foo) ...

Oh, sure, apologies for not picking up on that :D

A bit on the ugly side, but should work:

#define __rte_deprecated_macro(val) (_Pragma("GCC warning \"'" #val "'\" is deprecated\"") (val))

Quoted 9 lines

To be used as:

#define NEW __rte_deprecated_macro(OLD)

(I feel there could be confusion between __rte_deprecated and RTE_DEPRECATED, so both for consistency and clarity, i believe "__rte_deprecated_macro" would be a better name - however, no strong opinion, RTE_DEPRECATED is fine by me as well)

I would prefer to keep to uppercase for macros. Will try it in V2

#137 lore raw

Re: [dpdk-dev] [PATCH v4 25/27] eal: mark old naming as deprecated

In reply to Burakov, Anatoly
Quoted 12 lines · Anatoly
Quoted 11 lines · Stephen Hemminger
Quoted 7 lines · Anatoly

lib/librte_eal/include/rte_launch.h enum rte_rmt_call_initial_t { · line 80

Quoted 4 lines
lib/librte_eal/include/rte_launch.h +2 -2
-#define SKIP_MASTER	SKIP_INITIAL
-#define CALL_MASTER	CALL_INITIAL
+#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is deprecated\"") SKIP_INITIAL
+#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL  

Presumably this is a generic header, should we introduce GCC-specific things there?

Quoted 5 lines
Quoted 2 lines

It works with Clang as well. Likely ICC but don't have that.

What about MSVC?

The compiler issues a warning when it finds a pragma that it doesn't recognize, and continues compilation.

#138 lore raw

PATCH v4 26/27 memif: replace master/slave with server/client

In reply to Stephen Hemminger

The names master and slave have no place inside this driver. It is really a traditional client server model, so use those names.

---
 doc/guides/nics/memif.rst         |  78 +++++++++---------
 drivers/net/memif/memif.h         |  40 +++++-----
 drivers/net/memif/memif_socket.c  |  54 ++++++-------
 drivers/net/memif/memif_socket.h  |   5 +-
 drivers/net/memif/rte_eth_memif.c | 128 +++++++++++++++---------------
 drivers/net/memif/rte_eth_memif.h |  20 ++---
 6 files changed, 163 insertions(+), 162 deletions(-)
doc/guides/nics/memif.rst +39 -39
index 9c67d7141cbe..5723ac01c7ee 100644
@@ -13,13 +13,13 @@ The created device transmits packets in a raw format. It can be used with
 Ethernet mode, IP mode, or Punt/Inject. At this moment, only Ethernet mode is
 supported in DPDK memif implementation.
 
-Memif works in two roles: master and slave. Slave connects to master over an
+Memif works in two roles: server and client. Client connects to server over an
 existing socket. It is also a producer of shared memory file and initializes
 the shared memory. Each interface can be connected to one peer interface
-at same time. The peer interface is identified by id parameter. Master
-creates the socket and listens for any slave connection requests. The socket
+at same time. The peer interface is identified by id parameter. Server
+creates the socket and listens for any client connection requests. The socket
 may already exist on the system. Be sure to remove any such sockets, if you
-are creating a master interface, or you will see an "Address already in use"
+are creating a server interface, or you will see an "Address already in use"
 error. Function ``rte_pmd_memif_remove()``, which removes memif interface,
 will also remove a listener socket, if it is not being used by any other
 interface.
@@ -31,57 +31,57 @@ net_memif1, and so on. Memif uses unix domain socket to transmit control
 messages. Each memif has a unique id per socket. This id is used to identify
 peer interface. If you are connecting multiple
 interfaces using same socket, be sure to specify unique ids ``id=0``, ``id=1``,
-etc. Note that if you assign a socket to a master interface it becomes a
-listener socket. Listener socket can not be used by a slave interface on same
+etc. Note that if you assign a socket to a server interface it becomes a
+listener socket. Listener socket can not be used by a client interface on same
 client.
 
 .. csv-table:: **Memif configuration options**
    :header: "Option", "Description", "Default", "Valid value"
 
    "id=0", "Used to identify peer interface", "0", "uint32_t"
-   "role=master", "Set memif role", "slave", "master|slave"
+   "role=server", "Set memif role", "client", "server|client"
    "bsize=1024", "Size of single packet buffer", "2048", "uint16_t"
    "rsize=11", "Log2 of ring size. If rsize is 10, actual ring size is 1024", "10", "1-14"
    "socket=/tmp/memif.sock", "Socket filename", "/tmp/memif.sock", "string len 108"
    "mac=01:23:45:ab:cd:ef", "Mac address", "01:ab:23:cd:45:ef", ""
    "secret=abc123", "Secret is an optional security option, which if specified, must be matched by peer", "", "string len 24"
-   "zero-copy=yes", "Enable/disable zero-copy slave mode. Only relevant to slave, requires '--single-file-segments' eal argument", "no", "yes|no"
+   "zero-copy=yes", "Enable/disable zero-copy client mode. Only relevant to client, requires '--single-file-segments' eal argument", "no", "yes|no"
 
 **Connection establishment**
 
 In order to create memif connection, two memif interfaces, each in separate
-process, are needed. One interface in ``master`` role and other in
-``slave`` role. It is not possible to connect two interfaces in a single
+process, are needed. One interface in ``server`` role and other in
+``client`` role. It is not possible to connect two interfaces in a single
 process. Each interface can be connected to one interface at same time,
 identified by matching id parameter.
 
 Memif driver uses unix domain socket to exchange required information between
 memif interfaces. Socket file path is specified at interface creation see
-*Memif configuration options* table above. If socket is used by ``master``
+*Memif configuration options* table above. If socket is used by ``server``
 interface, it's marked as listener socket (in scope of current process) and
 listens to connection requests from other processes. One socket can be used by
-multiple interfaces. One process can have ``slave`` and ``master`` interfaces
+multiple interfaces. One process can have ``client`` and ``server`` interfaces
 at the same time, provided each role is assigned unique socket.
 
 For detailed information on memif control messages, see: net/memif/memif.h.
 
-Slave interface attempts to make a connection on assigned socket. Process
+Client interface attempts to make a connection on assigned socket. Process
 listening on this socket will extract the connection request and create a new
 connected socket (control channel). Then it sends the 'hello' message
-(``MEMIF_MSG_TYPE_HELLO``), containing configuration boundaries. Slave interface
+(``MEMIF_MSG_TYPE_HELLO``), containing configuration boundaries. Client interface
 adjusts its configuration accordingly, and sends 'init' message
 (``MEMIF_MSG_TYPE_INIT``). This message among others contains interface id. Driver
-uses this id to find master interface, and assigns the control channel to this
+uses this id to find server interface, and assigns the control channel to this
 interface. If such interface is found, 'ack' message (``MEMIF_MSG_TYPE_ACK``) is
-sent. Slave interface sends 'add region' message (``MEMIF_MSG_TYPE_ADD_REGION``) for
-every region allocated. Master responds to each of these messages with 'ack'
-message. Same behavior applies to rings. Slave sends 'add ring' message
-(``MEMIF_MSG_TYPE_ADD_RING``) for every initialized ring. Master again responds to
-each message with 'ack' message. To finalize the connection, slave interface
+sent. Client interface sends 'add region' message (``MEMIF_MSG_TYPE_ADD_REGION``) for
+every region allocated. Server responds to each of these messages with 'ack'
+message. Same behavior applies to rings. Client sends 'add ring' message
+(``MEMIF_MSG_TYPE_ADD_RING``) for every initialized ring. Server again responds to
+each message with 'ack' message. To finalize the connection, client interface
 sends 'connect' message (``MEMIF_MSG_TYPE_CONNECT``). Upon receiving this message
-master maps regions to its address space, initializes rings and responds with
+server maps regions to its address space, initializes rings and responds with
 'connected' message (``MEMIF_MSG_TYPE_CONNECTED``). Disconnect
-(``MEMIF_MSG_TYPE_DISCONNECT``) can be sent by both master and slave interfaces at
+(``MEMIF_MSG_TYPE_DISCONNECT``) can be sent by both server and client interfaces at
 any time, due to driver error or if the interface is being deleted.
 
 Files
@@ -95,8 +95,8 @@ Shared memory
 
 **Shared memory format**
 
-Slave is producer and master is consumer. Memory regions, are mapped shared memory files,
-created by memif slave and provided to master at connection establishment.
+Client is producer and server is consumer. Memory regions, are mapped shared memory files,
+created by memif client and provided to server at connection establishment.
 Regions contain rings and buffers. Rings and buffers can also be separated into multiple
 regions. For no-zero-copy, rings and buffers are stored inside single memory
 region to reduce the number of opened files.
@@ -171,11 +171,11 @@ Files
 - net/memif/memif.h *- descriptor and ring definitions*
 - net/memif/rte_eth_memif.c *- eth_memif_rx() eth_memif_tx()*
 
-Zero-copy slave
+Zero-copy client
 ~~~~~~~~~~~~~~~
 
-Zero-copy slave can be enabled with memif configuration option 'zero-copy=yes'. This option
-is only relevant to slave and requires eal argument '--single-file-segments'.
+Zero-copy client can be enabled with memif configuration option 'zero-copy=yes'. This option
+is only relevant to client and requires eal argument '--single-file-segments'.
 This limitation is in place, because it is too expensive to identify memseg
 for each packet buffer, resulting in worse performance than with zero-copy disabled.
 With single file segments we can calculate offset from the beginning of the file
@@ -183,9 +183,9 @@ for each packet buffer.
 
 **Shared memory format**
 
-Region 0 is created by memif driver and contains rings. Slave interface exposes DPDK memory (memseg).
+Region 0 is created by memif driver and contains rings. Client interface exposes DPDK memory (memseg).
 Instead of using memfd_create() to create new shared file, existing memsegs are used.
-Master interface functions the same as with zero-copy disabled.
+Server interface functions the same as with zero-copy disabled.
 
 region 0:
 
@@ -211,24 +211,24 @@ Example: testpmd
 ----------------------------
 In this example we run two instances of testpmd application and transmit packets over memif.
 
-First create ``master`` interface::
+First create ``server`` interface::
 
-    #./build/app/testpmd -l 0-1 --proc-type=primary --file-prefix=pmd1 --vdev=net_memif,role=master -- -i
+    #./build/app/testpmd -l 0-1 --proc-type=primary --file-prefix=pmd1 --vdev=net_memif,role=server -- -i
 
-Now create ``slave`` interface (master must be already running so the slave will connect)::
+Now create ``client`` interface (server must be already running so the client will connect)::
 
     #./build/app/testpmd -l 2-3 --proc-type=primary --file-prefix=pmd2 --vdev=net_memif -- -i
 
-You can also enable ``zero-copy`` on ``slave`` interface::
+You can also enable ``zero-copy`` on ``client`` interface::
 
     #./build/app/testpmd -l 2-3 --proc-type=primary --file-prefix=pmd2 --vdev=net_memif,zero-copy=yes --single-file-segments -- -i
 
 Start forwarding packets::
 
-    Slave:
+    Client:
         testpmd> start
 
-    Master:
+    Server:
         testpmd> start tx_first
 
 Show status::
@@ -241,9 +241,9 @@ Example: testpmd and VPP
 ------------------------
 For information on how to get and run VPP please see `<https://wiki.fd.io/view/VPP>`_.
 
-Start VPP in interactive mode (should be by default). Create memif master interface in VPP::
+Start VPP in interactive mode (should be by default). Create memif server interface in VPP::
 
-    vpp# create interface memif id 0 master no-zero-copy
+    vpp# create interface memif id 0 server no-zero-copy
     vpp# set interface state memif0/0 up
     vpp# set interface ip address memif0/0 192.168.1.1/24
 
@@ -259,7 +259,7 @@ Now create memif interface by running testpmd with these command line options::
 
     #./testpmd --vdev=net_memif,socket=/run/vpp/memif.sock -- -i
 
-Testpmd should now create memif slave interface and try to connect to master.
+Testpmd should now create memif client interface and try to connect to server.
 In testpmd set forward option to icmpecho and start forwarding::
 
     testpmd> set fwd icmpecho
@@ -280,7 +280,7 @@ The situation is analogous to cross connecting 2 ports of the NIC by cable.
 
 To set the loopback, just use the same socket and id with different roles::
 
-    #./testpmd --vdev=net_memif0,role=master,id=0 --vdev=net_memif1,role=slave,id=0 -- -i
+    #./testpmd --vdev=net_memif0,role=server,id=0 --vdev=net_memif1,role=client,id=0 -- -i
 
 Then start the communication::
 
drivers/net/memif/memif.h +20 -20
index b91230890410..cb72c692ba03 100644
@@ -12,8 +12,8 @@
 #define MEMIF_NAME_SZ		32
 
 /*
- * S2M: direction slave -> master
- * M2S: direction master -> slave
+ * C2S: direction client -> server
+ * S2C: direction server -> client
  */
 
 /*
@@ -33,8 +33,8 @@ typedef enum memif_msg_type {
 } memif_msg_type_t;
 
 typedef enum {
-	MEMIF_RING_S2M, /**< buffer ring in direction slave -> master */
-	MEMIF_RING_M2S, /**< buffer ring in direction master -> slave */
+	MEMIF_RING_C2S, /**< buffer ring in direction client -> server */
+	MEMIF_RING_S2C, /**< buffer ring in direction server -> client */
 } memif_ring_type_t;
 
 typedef enum {
@@ -56,23 +56,23 @@ typedef uint8_t memif_log2_ring_size_t;
  */
 
  /**
-  * M2S
-  * Contains master interfaces configuration.
+  * S2C
+  * Contains server interfaces configuration.
   */
 typedef struct __rte_packed {
 	uint8_t name[MEMIF_NAME_SZ]; /**< Client app name. In this case DPDK version */
 	memif_version_t min_version; /**< lowest supported memif version */
 	memif_version_t max_version; /**< highest supported memif version */
 	memif_region_index_t max_region; /**< maximum num of regions */
-	memif_ring_index_t max_m2s_ring; /**< maximum num of M2S ring */
-	memif_ring_index_t max_s2m_ring; /**< maximum num of S2M rings */
+	memif_ring_index_t max_s2c_ring; /**< maximum num of S2C ring */
+	memif_ring_index_t max_c2s_ring; /**< maximum num of C2S rings */
 	memif_log2_ring_size_t max_log2_ring_size; /**< maximum ring size (as log2) */
 } memif_msg_hello_t;
 
 /**
- * S2M
+ * C2S
  * Contains information required to identify interface
- * to which the slave wants to connect.
+ * to which the client wants to connect.
  */
 typedef struct __rte_packed {
 	memif_version_t version;		/**< memif version */
@@ -83,8 +83,8 @@ typedef struct __rte_packed {
 } memif_msg_init_t;
 
 /**
- * S2M
- * Request master to add new shared memory region to master interface.
+ * C2S
+ * Request server to add new shared memory region to server interface.
  * Shared files file descriptor is passed in cmsghdr.
  */
 typedef struct __rte_packed {
@@ -93,12 +93,12 @@ typedef struct __rte_packed {
 } memif_msg_add_region_t;
 
 /**
- * S2M
- * Request master to add new ring to master interface.
+ * C2S
+ * Request server to add new ring to server interface.
  */
 typedef struct __rte_packed {
 	uint16_t flags;				/**< flags */
-#define MEMIF_MSG_ADD_RING_FLAG_S2M 1		/**< ring is in S2M direction */
+#define MEMIF_MSG_ADD_RING_FLAG_C2S 1		/**< ring is in C2S direction */
 	memif_ring_index_t index;		/**< ring index */
 	memif_region_index_t region; /**< region index on which this ring is located */
 	memif_region_offset_t offset;		/**< buffer start offset */
@@ -107,23 +107,23 @@ typedef struct __rte_packed {
 } memif_msg_add_ring_t;
 
 /**
- * S2M
+ * C2S
  * Finalize connection establishment.
  */
 typedef struct __rte_packed {
-	uint8_t if_name[MEMIF_NAME_SZ];		/**< slave interface name */
+	uint8_t if_name[MEMIF_NAME_SZ];		/**< client interface name */
 } memif_msg_connect_t;
 
 /**
- * M2S
+ * S2C
  * Finalize connection establishment.
  */
 typedef struct __rte_packed {
-	uint8_t if_name[MEMIF_NAME_SZ];		/**< master interface name */
+	uint8_t if_name[MEMIF_NAME_SZ];		/**< server interface name */
 } memif_msg_connected_t;
 
 /**
- * S2M & M2S
+ * C2S & S2C
  * Disconnect interfaces.
  */
 typedef struct __rte_packed {
drivers/net/memif/memif_socket.c +27 -27

146 lines not on this page · raw message

drivers/net/memif/memif_socket.h +3 -2
index 5c49ec24ecbc..b9b8a151782f 100644
@@ -60,7 +60,8 @@ void memif_disconnect(struct rte_eth_dev *dev);
  *   - On success, zero.
  *   - On failure, a negative value.
  */
-int memif_connect_master(struct rte_eth_dev *dev);
+int memif_connect_server(struct rte_eth_dev *dev);
+
 
 /**
  * If device is properly configured, send connection request.
@@ -71,7 +72,7 @@ int memif_connect_master(struct rte_eth_dev *dev);
  *   - On success, zero.
  *   - On failure, a negative value.
  */
-int memif_connect_slave(struct rte_eth_dev *dev);
+int memif_connect_client(struct rte_eth_dev *dev);
 
 struct memif_socket_dev_list_elt {
 	TAILQ_ENTRY(memif_socket_dev_list_elt) next;
drivers/net/memif/rte_eth_memif.c +64 -64

372 lines not on this page · raw message

drivers/net/memif/rte_eth_memif.h +10 -10
index 6f45b7072c69..d45dfdd172b7 100644
@@ -36,8 +36,8 @@ extern int memif_logtype;
 		"%s(): " fmt "\n", __func__, ##args)
 
 enum memif_role_t {
-	MEMIF_ROLE_MASTER,
-	MEMIF_ROLE_SLAVE,
+	MEMIF_ROLE_SERVER,
+	MEMIF_ROLE_CLIENT,
 };
 
 struct memif_region {
@@ -64,8 +64,8 @@ struct memif_queue {
 	uint16_t last_tail;			/**< last ring tail */
 
 	struct rte_mbuf **buffers;
-	/**< Stored mbufs. Used in zero-copy tx. Slave stores transmitted
-	 * mbufs to free them once master has received them.
+	/**< Stored mbufs. Used in zero-copy tx. Client stores transmitted
+	 * mbufs to free them once server has received them.
 	 */
 
 	/* rx/tx info */
@@ -102,15 +102,15 @@ struct pmd_internals {
 
 	struct {
 		memif_log2_ring_size_t log2_ring_size; /**< log2 of ring size */
-		uint8_t num_s2m_rings;		/**< number of slave to master rings */
-		uint8_t num_m2s_rings;		/**< number of master to slave rings */
+		uint8_t num_c2s_rings;		/**< number of client to server rings */
+		uint8_t num_s2c_rings;		/**< number of server to client rings */
 		uint16_t pkt_buffer_size;	/**< buffer size */
 	} cfg;					/**< Configured parameters (max values) */
 
 	struct {
 		memif_log2_ring_size_t log2_ring_size; /**< log2 of ring size */
-		uint8_t num_s2m_rings;		/**< number of slave to master rings */
-		uint8_t num_m2s_rings;		/**< number of master to slave rings */
+		uint8_t num_c2s_rings;		/**< number of client to server rings */
+		uint8_t num_s2c_rings;		/**< number of server to client rings */
 		uint16_t pkt_buffer_size;	/**< buffer size */
 	} run;
 	/**< Parameters used in active connection */
@@ -137,7 +137,7 @@ void memif_free_regions(struct rte_eth_dev *dev);
 
 /**
  * Finalize connection establishment process. Map shared memory file
- * (master role), initialize ring queue, set link status up.
+ * (server role), initialize ring queue, set link status up.
  *
  * @param dev
  *   memif device
@@ -149,7 +149,7 @@ int memif_connect(struct rte_eth_dev *dev);
 
 /**
  * Create shared memory file and initialize ring queue.
- * Only called by slave when establishing connection
+ * Only called by client when establishing connection
  *
  * @param dev
  *   memif device
Signature · 1 line
2.26.2
Acked-by on v4 26/27
#139 lore raw

Re: [dpdk-dev] [PATCH v4 26/27] memif: replace master/slave with server/client

Quoted 5 lines · Stephen Hemminger

The names master and slave have no place inside this driver. It is really a traditional client server model, so use those names.

---

Isn't this an externally visible change? Or do we not provide any guarantees for PMD devargs working across releases?

In any case, i think a release notes mention of this would be nice to have.

Otherwise, i took a quick look, LGTM

Signature · 2 lines
Thanks,
Anatoly
#140 lore raw

Re: [dpdk-dev] [PATCH v4 26/27] memif: replace master/slave with server/client

Quoted 7 lines · Anatoly
Quoted 5 lines · Stephen Hemminger

The names master and slave have no place inside this driver. It is really a traditional client server model, so use those names.

---

Quoted 9 lines

Isn't this an externally visible change? Or do we not provide any guarantees for PMD devargs working across releases?

In any case, i think a release notes mention of this would be nice to have.

Otherwise, i took a quick look, LGTM

It does change devargs. Let me go back and put in release note, and add compatibility (nag) layer.

#141 lore raw

PATCH v4 27/27 vhost: rename SLAVE to CLIENT

In reply to Stephen Hemminger

The vhost is a client server architecture so replace the term slave with client.

---
 drivers/vdpa/ifc/ifcvf_vdpa.c          |  4 +-
 drivers/vdpa/mlx5/mlx5_vdpa.c          |  4 +-
 lib/librte_vhost/rte_vhost.h           | 16 ++---
 lib/librte_vhost/rte_vhost_version.map |  2 +-
 lib/librte_vhost/vhost.c               |  4 +-
 lib/librte_vhost/vhost.h               |  4 +-
 lib/librte_vhost/vhost_crypto.c        |  2 +-
 lib/librte_vhost/vhost_user.c          | 96 +++++++++++++-------------
 lib/librte_vhost/vhost_user.h          | 41 +++++------
 9 files changed, 87 insertions(+), 86 deletions(-)
drivers/vdpa/ifc/ifcvf_vdpa.c +2 -2
index de54dc8aab6c..6c02b99f5e44 100644
@@ -1071,8 +1071,8 @@ ifcvf_get_vdpa_features(struct rte_vdpa_device *vdev, uint64_t *features)
 
 #define VDPA_SUPPORTED_PROTOCOL_FEATURES \
 		(1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK | \
-		 1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ | \
-		 1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD | \
+		 1ULL << VHOST_USER_PROTOCOL_F_CLIENT_REQ | \
+		 1ULL << VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD | \
 		 1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER | \
 		 1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD)
 static int
drivers/vdpa/mlx5/mlx5_vdpa.c +2 -2
index dbd36ab0c95e..8fd2de9ba98f 100644
@@ -34,8 +34,8 @@
 			    (1ULL << VIRTIO_NET_F_MTU))
 
 #define MLX5_VDPA_PROTOCOL_FEATURES \
-			    ((1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ) | \
-			     (1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) | \
+			    ((1ULL << VHOST_USER_PROTOCOL_F_CLIENT_REQ) | \
+			     (1ULL << VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD) | \
 			     (1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \
 			     (1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD) | \
 			     (1ULL << VHOST_USER_PROTOCOL_F_MQ) | \
lib/librte_vhost/rte_vhost.h +8 -8
index 8a5c332c83ac..b952e6d47021 100644
@@ -74,8 +74,8 @@ extern "C" {
 #define VHOST_USER_PROTOCOL_F_NET_MTU	4
 #endif
 
-#ifndef VHOST_USER_PROTOCOL_F_SLAVE_REQ
-#define VHOST_USER_PROTOCOL_F_SLAVE_REQ	5
+#ifndef VHOST_USER_PROTOCOL_F_CLIENT_REQ
+#define VHOST_USER_PROTOCOL_F_CLIENT_REQ	5
 #endif
 
 #ifndef VHOST_USER_PROTOCOL_F_CRYPTO_SESSION
@@ -90,8 +90,8 @@ extern "C" {
 #define VHOST_USER_PROTOCOL_F_CONFIG 9
 #endif
 
-#ifndef VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD
-#define VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD 10
+#ifndef VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD
+#define VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD 10
 #endif
 
 #ifndef VHOST_USER_PROTOCOL_F_HOST_NOTIFIER
@@ -249,9 +249,9 @@ typedef enum rte_vhost_msg_result (*rte_vhost_msg_handle)(int vid, void *msg);
  * Optional vhost user message handlers.
  */
 struct rte_vhost_user_extern_ops {
-	/* Called prior to the master message handling. */
+	/* Called prior to the server message handling. */
 	rte_vhost_msg_handle pre_msg_handle;
-	/* Called after the master message handling. */
+	/* Called after the server message handling. */
 	rte_vhost_msg_handle post_msg_handle;
 };
 
@@ -1008,13 +1008,13 @@ rte_vhost_get_vdpa_device(int vid);
  * @param vid
  *  vhost device ID
  * @param need_reply
- *  wait for the master response the status of this operation
+ *  wait for the server response the status of this operation
  * @return
  *  0 on success, < 0 on failure
  */
 __rte_experimental
 int
-rte_vhost_slave_config_change(int vid, bool need_reply);
+rte_vhost_client_config_change(int vid, bool need_reply);
 
 #ifdef __cplusplus
 }
lib/librte_vhost/rte_vhost_version.map +1 -1
index 86784405a1e8..74973ce9b8ec 100644
@@ -65,7 +65,7 @@ EXPERIMENTAL {
 	rte_vhost_clr_inflight_desc_packed;
 	rte_vhost_get_vhost_ring_inflight;
 	rte_vhost_get_vring_base_from_inflight;
-	rte_vhost_slave_config_change;
+	rte_vhost_client_config_change;
 	rte_vdpa_find_device_by_name;
 	rte_vdpa_get_rte_device;
 	rte_vdpa_get_queue_num;
lib/librte_vhost/vhost.c +2 -2
index 0d822d6a3f48..3d111d714bf1 100644
@@ -632,9 +632,9 @@ vhost_new_device(void)
 	vhost_devices[i] = dev;
 	dev->vid = i;
 	dev->flags = VIRTIO_DEV_BUILTIN_VIRTIO_NET;
-	dev->slave_req_fd = -1;
+	dev->client_req_fd = -1;
 	dev->postcopy_ufd = -1;
-	rte_spinlock_init(&dev->slave_req_lock);
+	rte_spinlock_init(&dev->client_req_lock);
 
 	return i;
 }
lib/librte_vhost/vhost.h +2 -2
index 0344636997a6..a0902d1535c4 100644
@@ -356,8 +356,8 @@ struct virtio_net {
 	uint32_t		max_guest_pages;
 	struct guest_page       *guest_pages;
 
-	int			slave_req_fd;
-	rte_spinlock_t		slave_req_lock;
+	int			client_req_fd;
+	rte_spinlock_t		client_req_lock;
 
 	int			postcopy_ufd;
 	int			postcopy_listening;
lib/librte_vhost/vhost_crypto.c +1 -1
index 0f9df4059d0b..8e4fc1bf015a 100644
@@ -460,7 +460,7 @@ vhost_crypto_msg_post_handler(int vid, void *msg)
 		return RTE_VHOST_MSG_RESULT_ERR;
 	}
 
-	switch (vmsg->request.master) {
+	switch (vmsg->request.server) {
 	case VHOST_USER_CRYPTO_CREATE_SESS:
 		vhost_crypto_create_sess(vcrypto,
 				&vmsg->payload.crypto_session);
lib/librte_vhost/vhost_user.c +48 -48

304 lines not on this page · raw message

lib/librte_vhost/vhost_user.h +21 -20

65 lines not on this page · raw message

Signature · 1 line
2.26.2
#142 lore raw

Re: [dpdk-dev] [PATCH v4 27/27] vhost: rename SLAVE to CLIENT

Hi Stephen,

Thanks for working on this! The slave/master naming of vhost is defined by vhost-user spec, which is maintained by QEMU. I think if we want to change it. The spec in QEMU should first be changed, then as an implementation of the spec, we could easily change it. Also, using server/client to be the new version may cause some code confusion in vhost. Because vhost traditionally can act as a socket server or client (you can see the names in the code) and the vhost-user slave/master generally refers to vhost-user pmd/QEMU. So it may make the code hard to understand. Do you think this make sense?

Thanks!
Chenbo

Quoted 630 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Stephen Hemminger
Sent: Thursday, July 2, 2020 4:24 AM
To: [email protected]
Cc: Stephen Hemminger <[email protected]>
Subject: [dpdk-dev] [PATCH v4 27/27] vhost: rename SLAVE to CLIENT

The vhost is a client server architecture so replace the term slave with client.

---
 drivers/vdpa/ifc/ifcvf_vdpa.c          |  4 +-
 drivers/vdpa/mlx5/mlx5_vdpa.c          |  4 +-
 lib/librte_vhost/rte_vhost.h           | 16 ++---
 lib/librte_vhost/rte_vhost_version.map |  2 +-
 lib/librte_vhost/vhost.c               |  4 +-
 lib/librte_vhost/vhost.h               |  4 +-
 lib/librte_vhost/vhost_crypto.c        |  2 +-
 lib/librte_vhost/vhost_user.c          | 96 +++++++++++++-------------
 lib/librte_vhost/vhost_user.h          | 41 +++++------
 9 files changed, 87 insertions(+), 86 deletions(-)
drivers/vdpa/ifc/ifcvf_vdpa.c +2 -2
index de54dc8aab6c..6c02b99f5e44 100644
@@ -1071,8 +1071,8 @@ ifcvf_get_vdpa_features(struct rte_vdpa_device
 *vdev, uint64_t *features)
 
 #define VDPA_SUPPORTED_PROTOCOL_FEATURES \
 		(1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK | \
-		 1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ | \
-		 1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD | \
+		 1ULL << VHOST_USER_PROTOCOL_F_CLIENT_REQ | \
+		 1ULL << VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD | \
 		 1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER | \
 		 1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD)

static int

drivers/vdpa/mlx5/mlx5_vdpa.c +2 -2
index dbd36ab0c95e..8fd2de9ba98f 100644
@@ -34,8 +34,8 @@
 			    (1ULL << VIRTIO_NET_F_MTU))
 
 #define MLX5_VDPA_PROTOCOL_FEATURES \
-			    ((1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ) |
 \
-			     (1ULL <<
 VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) | \
+			    ((1ULL << VHOST_USER_PROTOCOL_F_CLIENT_REQ)
 | \
+			     (1ULL <<

VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD) | \
(1ULL <<
VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \
(1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD)
| \

drivers/vdpa/mlx5/mlx5_vdpa.c +0 -0
 			     (1ULL << VHOST_USER_PROTOCOL_F_MQ) | \
lib/librte_vhost/rte_vhost.h +8 -8
index 8a5c332c83ac..b952e6d47021 100644
@@ -74,8 +74,8 @@ extern "C" {
 #define VHOST_USER_PROTOCOL_F_NET_MTU	4
 #endif
 
-#ifndef VHOST_USER_PROTOCOL_F_SLAVE_REQ
-#define VHOST_USER_PROTOCOL_F_SLAVE_REQ	5
+#ifndef VHOST_USER_PROTOCOL_F_CLIENT_REQ
+#define VHOST_USER_PROTOCOL_F_CLIENT_REQ	5
 #endif
 
 #ifndef VHOST_USER_PROTOCOL_F_CRYPTO_SESSION
@@ -90,8 +90,8 @@ extern "C" {
 #define VHOST_USER_PROTOCOL_F_CONFIG 9
 #endif
 
-#ifndef VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD
-#define VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD 10
+#ifndef VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD
+#define VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD 10
 #endif
 
 #ifndef VHOST_USER_PROTOCOL_F_HOST_NOTIFIER
@@ -249,9 +249,9 @@ typedef enum rte_vhost_msg_result
 (*rte_vhost_msg_handle)(int vid, void *msg);
  * Optional vhost user message handlers.
  */
 struct rte_vhost_user_extern_ops {
-	/* Called prior to the master message handling. */
+	/* Called prior to the server message handling. */
 	rte_vhost_msg_handle pre_msg_handle;
-	/* Called after the master message handling. */
+	/* Called after the server message handling. */
 	rte_vhost_msg_handle post_msg_handle;
 };
@@ -1008,13 +1008,13 @@ rte_vhost_get_vdpa_device(int vid);
  * @param vid
  *  vhost device ID
  * @param need_reply
- *  wait for the master response the status of this operation
+ *  wait for the server response the status of this operation
  * @return
  *  0 on success, < 0 on failure
  */
 __rte_experimental
 int
-rte_vhost_slave_config_change(int vid, bool need_reply);
+rte_vhost_client_config_change(int vid, bool need_reply);
 
 #ifdef __cplusplus
 }
lib/librte_vhost/rte_vhost_version.map +1 -1
index 86784405a1e8..74973ce9b8ec 100644
@@ -65,7 +65,7 @@ EXPERIMENTAL {
 	rte_vhost_clr_inflight_desc_packed;
 	rte_vhost_get_vhost_ring_inflight;
 	rte_vhost_get_vring_base_from_inflight;
-	rte_vhost_slave_config_change;
+	rte_vhost_client_config_change;
 	rte_vdpa_find_device_by_name;
 	rte_vdpa_get_rte_device;
 	rte_vdpa_get_queue_num;
lib/librte_vhost/vhost.c +2 -2
index 0d822d6a3f48..3d111d714bf1 100644
@@ -632,9 +632,9 @@ vhost_new_device(void)
 	vhost_devices[i] = dev;
 	dev->vid = i;
 	dev->flags = VIRTIO_DEV_BUILTIN_VIRTIO_NET;
-	dev->slave_req_fd = -1;
+	dev->client_req_fd = -1;
 	dev->postcopy_ufd = -1;
-	rte_spinlock_init(&dev->slave_req_lock);
+	rte_spinlock_init(&dev->client_req_lock);
 
 	return i;
 }
lib/librte_vhost/vhost.h +2 -2
index 0344636997a6..a0902d1535c4 100644
@@ -356,8 +356,8 @@ struct virtio_net {
 	uint32_t		max_guest_pages;
 	struct guest_page       *guest_pages;
 
-	int			slave_req_fd;
-	rte_spinlock_t		slave_req_lock;
+	int			client_req_fd;
+	rte_spinlock_t		client_req_lock;
 
 	int			postcopy_ufd;
 	int			postcopy_listening;
lib/librte_vhost/vhost_crypto.c +1 -1
index 0f9df4059d0b..8e4fc1bf015a 100644
@@ -460,7 +460,7 @@ vhost_crypto_msg_post_handler(int vid, void *msg)
 		return RTE_VHOST_MSG_RESULT_ERR;
 	}
 
-	switch (vmsg->request.master) {
+	switch (vmsg->request.server) {
 	case VHOST_USER_CRYPTO_CREATE_SESS:
 		vhost_crypto_create_sess(vcrypto,
 				&vmsg->payload.crypto_session);
lib/librte_vhost/vhost_user.c +4 -4
index 6039a8fdb9cb..56da81cd1e17 100644
@@ -7,11 +7,11 @@
  * The vhost-user protocol connection is an external interface, so it must be
  * robust against invalid inputs.
  *
- * This is important because the vhost-user master is only one step removed
+ * This is important because the vhost-user server is only one step removed
  * from the guest.  Malicious guests that have escaped will then launch further
- * attacks from the vhost-user master.
+ * attacks from the vhost-user server.
  *
- * Even in deployments where guests are trusted, a bug in the vhost-user master
+ * Even in deployments where guests are trusted, a bug in the vhost-user server
  * can still cause invalid messages to be sent.  Such messages must not
  * compromise the stability of the DPDK application by causing crashes, memory
  * corruption, or other problematic behavior.
@@ -78,7 +78,7 @@ static const char *vhost_message_str[VHOST_USER_MAX]
 = {
 	[VHOST_USER_SET_VRING_ENABLE]  =
 "VHOST_USER_SET_VRING_ENABLE",
 	[VHOST_USER_SEND_RARP]  = "VHOST_USER_SEND_RARP",
 	[VHOST_USER_NET_SET_MTU]  = "VHOST_USER_NET_SET_MTU",
-	[VHOST_USER_SET_SLAVE_REQ_FD]  =
 "VHOST_USER_SET_SLAVE_REQ_FD",
+	[VHOST_USER_SET_CLIENT_REQ_FD]  =

"VHOST_USER_SET_CLIENT_REQ_FD",

lib/librte_vhost/vhost_user.c +0 -0
 	[VHOST_USER_IOTLB_MSG]  = "VHOST_USER_IOTLB_MSG",
 	[VHOST_USER_CRYPTO_CREATE_SESS] =

"VHOST_USER_CRYPTO_CREATE_SESS",
[VHOST_USER_CRYPTO_CLOSE_SESS] =
"VHOST_USER_CRYPTO_CLOSE_SESS",

lib/librte_vhost/vhost_user.c +1 -1
@@ -114,7 +114,7 @@ validate_msg_fds(struct VhostUserMsg *msg, int
 expected_fds)
 	VHOST_LOG_CONFIG(ERR,
 		" Expect %d FDs for request %s, received %d\n",
 		expected_fds,
-		vhost_message_str[msg->request.master],
+		vhost_message_str[msg->request.server],
 		msg->fd_num);
 
lib/librte_vhost/vhost_user.c +4 -4
 	close_msg_fds(msg);
@@ -215,9 +215,9 @@ vhost_backend_cleanup(struct virtio_net *dev)
 		dev->inflight_info = NULL;
 	}
 
-	if (dev->slave_req_fd >= 0) {
-		close(dev->slave_req_fd);
-		dev->slave_req_fd = -1;
+	if (dev->client_req_fd >= 0) {
+		close(dev->client_req_fd);
+		dev->client_req_fd = -1;
 	}
 
 	if (dev->postcopy_ufd >= 0) {
@@ -346,7 +346,7 @@ vhost_user_set_features(struct virtio_net **pdev, struct
 VhostUserMsg *msg,
 			return RTE_VHOST_MSG_RESULT_OK;
 
 		/*
-		 * Error out if master tries to change features while device is
+		 * Error out if server tries to change features while device is
 		 * in running state. The exception being VHOST_F_LOG_ALL,

which

lib/librte_vhost/vhost_user.c +2 -2
 		 * is enabled when the live-migration starts.
 		 */
@@ -1235,10 +1235,10 @@ vhost_user_set_mem_table(struct virtio_net
 **pdev, struct VhostUserMsg *msg,
 		if (validate_msg_fds(&ack_msg, 0) != 0)
 			goto err_mmap;
 
-		if (ack_msg.request.master != VHOST_USER_SET_MEM_TABLE)
 {
+		if (ack_msg.request.server != VHOST_USER_SET_MEM_TABLE) {
 			VHOST_LOG_CONFIG(ERR,
 				"Bad qemu ack on postcopy set-mem-table
 (%d)\n",
-				ack_msg.request.master);
+				ack_msg.request.server);
lib/librte_vhost/vhost_user.c +3 -3
 			goto err_mmap;
 		}
@@ -2049,14 +2049,14 @@ vhost_user_set_protocol_features(struct virtio_net
 **pdev,
 {
 	struct virtio_net *dev = *pdev;
 	uint64_t protocol_features = msg->payload.u64;
-	uint64_t slave_protocol_features = 0;
+	uint64_t client_protocol_features = 0;
 
 	if (validate_msg_fds(msg, 0) != 0)
 		return RTE_VHOST_MSG_RESULT_ERR;
 
 	rte_vhost_driver_get_protocol_features(dev->ifname,
-			&slave_protocol_features);
-	if (protocol_features & ~slave_protocol_features) {
+			&client_protocol_features);
+	if (protocol_features & ~client_protocol_features) {
 		VHOST_LOG_CONFIG(ERR,
 			"(%d) received invalid protocol features.\n",
lib/librte_vhost/vhost_user.c +4 -4
 			dev->vid);
@@ -2228,15 +2228,15 @@ vhost_user_set_req_fd(struct virtio_net **pdev,
 struct VhostUserMsg *msg,
 
 	if (fd < 0) {
 		VHOST_LOG_CONFIG(ERR,
-				"Invalid file descriptor for slave channel (%d)\n",
+				"Invalid file descriptor for client channel
 (%d)\n",
 				fd);
 		return RTE_VHOST_MSG_RESULT_ERR;
 	}
 
-	if (dev->slave_req_fd >= 0)
-		close(dev->slave_req_fd);
+	if (dev->client_req_fd >= 0)
+		close(dev->client_req_fd);
 
-	dev->slave_req_fd = fd;
+	dev->client_req_fd = fd;
 
lib/librte_vhost/vhost_user.c +1 -1
 	return RTE_VHOST_MSG_RESULT_OK;
 }
@@ -2472,7 +2472,7 @@ static vhost_message_handler_t
 vhost_message_handlers[VHOST_USER_MAX] = {
 	[VHOST_USER_SET_VRING_ENABLE] = vhost_user_set_vring_enable,
 	[VHOST_USER_SEND_RARP] = vhost_user_send_rarp,
 	[VHOST_USER_NET_SET_MTU] = vhost_user_net_set_mtu,
-	[VHOST_USER_SET_SLAVE_REQ_FD] = vhost_user_set_req_fd,
+	[VHOST_USER_SET_CLIENT_REQ_FD] = vhost_user_set_req_fd,
 	[VHOST_USER_IOTLB_MSG] = vhost_user_iotlb_msg,
 	[VHOST_USER_POSTCOPY_ADVISE] = vhost_user_set_postcopy_advise,
lib/librte_vhost/vhost_user.c +4 -4
 	[VHOST_USER_POSTCOPY_LISTEN] = vhost_user_set_postcopy_listen,
@@ -2541,16 +2541,16 @@ send_vhost_reply(int sockfd, struct VhostUserMsg
 *msg)
 }
 
 static int
-send_vhost_slave_message(struct virtio_net *dev, struct VhostUserMsg *msg)
+send_vhost_client_message(struct virtio_net *dev, struct VhostUserMsg *msg)
 {
 	int ret;
 
 	if (msg->flags & VHOST_USER_NEED_REPLY)
-		rte_spinlock_lock(&dev->slave_req_lock);
+		rte_spinlock_lock(&dev->client_req_lock);
 
-	ret = send_vhost_message(dev->slave_req_fd, msg);
+	ret = send_vhost_message(dev->client_req_fd, msg);
 	if (ret < 0 && (msg->flags & VHOST_USER_NEED_REPLY))
-		rte_spinlock_unlock(&dev->slave_req_lock);
+		rte_spinlock_unlock(&dev->client_req_lock);
 
 	return ret;

}

lib/librte_vhost/vhost_user.c +1 -1
@@ -2564,7 +2564,7 @@ vhost_user_check_and_alloc_queue_pair(struct
 virtio_net *dev,
 {
 	uint32_t vring_idx;
 
-	switch (msg->request.master) {
+	switch (msg->request.server) {
 	case VHOST_USER_SET_VRING_KICK:
 	case VHOST_USER_SET_VRING_CALL:
lib/librte_vhost/vhost_user.c +5 -5
 	case VHOST_USER_SET_VRING_ERR:
@@ -2667,7 +2667,7 @@ vhost_user_msg_handler(int vid, int fd)
 	}
 
 	ret = 0;
-	request = msg.request.master;
+	request = msg.request.server;
 	if (request > VHOST_USER_NONE && request < VHOST_USER_MAX &&
 			vhost_message_str[request]) {
 		if (request != VHOST_USER_IOTLB_MSG)
@@ -2710,7 +2710,7 @@ vhost_user_msg_handler(int vid, int fd)
 	case VHOST_USER_SET_VRING_ENABLE:
 	case VHOST_USER_SEND_RARP:
 	case VHOST_USER_NET_SET_MTU:
-	case VHOST_USER_SET_SLAVE_REQ_FD:
+	case VHOST_USER_SET_CLIENT_REQ_FD:
 		if (!(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED)) {
 			vhost_user_lock_all_queue_pairs(dev);
 			unlock_required = 1;
@@ -2850,7 +2850,7 @@ vhost_user_msg_handler(int vid, int fd)
 	return 0;
 }
 
-static int process_slave_message_reply(struct virtio_net *dev,
+static int process_client_message_reply(struct virtio_net *dev,
 				       const struct VhostUserMsg *msg)
 {
 	struct VhostUserMsg msg_reply;
@@ -2859,11 +2859,11 @@ static int process_slave_message_reply(struct
 virtio_net *dev,
 	if ((msg->flags & VHOST_USER_NEED_REPLY) == 0)
 		return 0;
 
-	ret = read_vhost_message(dev->slave_req_fd, &msg_reply);
+	ret = read_vhost_message(dev->client_req_fd, &msg_reply);
 	if (ret <= 0) {
 		if (ret < 0)
 			VHOST_LOG_CONFIG(ERR,
-				"vhost read slave message reply failed\n");
+				"vhost read client message reply failed\n");
 		else
 			VHOST_LOG_CONFIG(INFO,
lib/librte_vhost/vhost_user.c +2 -2
 				"vhost peer closed\n");
@@ -2872,10 +2872,10 @@ static int process_slave_message_reply(struct
 virtio_net *dev,
 	}
 
 	ret = 0;
-	if (msg_reply.request.slave != msg->request.slave) {
+	if (msg_reply.request.client != msg->request.client) {
 		VHOST_LOG_CONFIG(ERR,
 			"Received unexpected msg type (%u), expected %u\n",
-			msg_reply.request.slave, msg->request.slave);
+			msg_reply.request.client, msg->request.client);
 		ret = -1;
 		goto out;
lib/librte_vhost/vhost_user.c +2 -2
 	}
@@ -2883,7 +2883,7 @@ static int process_slave_message_reply(struct
 virtio_net *dev,
 	ret = msg_reply.payload.u64 ? -1 : 0;
 
 out:
-	rte_spinlock_unlock(&dev->slave_req_lock);
+	rte_spinlock_unlock(&dev->client_req_lock);
 	return ret;
 }
@@ -2892,7 +2892,7 @@ vhost_user_iotlb_miss(struct virtio_net *dev,
 uint64_t iova, uint8_t perm)
 {
 	int ret;
 	struct VhostUserMsg msg = {
-		.request.slave = VHOST_USER_SLAVE_IOTLB_MSG,
+		.request.client = VHOST_USER_CLIENT_IOTLB_MSG,
 		.flags = VHOST_USER_VERSION,
 		.size = sizeof(msg.payload.iotlb),
lib/librte_vhost/vhost_user.c +1 -1
 		.payload.iotlb = {
@@ -2902,7 +2902,7 @@ vhost_user_iotlb_miss(struct virtio_net *dev,
 uint64_t iova, uint8_t perm)
 		},
 	};
 
-	ret = send_vhost_message(dev->slave_req_fd, &msg);
+	ret = send_vhost_message(dev->client_req_fd, &msg);
 	if (ret < 0) {
 		VHOST_LOG_CONFIG(ERR,
lib/librte_vhost/vhost_user.c +2 -2
 				"Failed to send IOTLB miss message (%d)\n",
@@ -2914,11 +2914,11 @@ vhost_user_iotlb_miss(struct virtio_net *dev,
 uint64_t iova, uint8_t perm)
 }
 
 static int
-vhost_user_slave_config_change(struct virtio_net *dev, bool need_reply)
+vhost_user_client_config_change(struct virtio_net *dev, bool need_reply)
 {
 	int ret;
 	struct VhostUserMsg msg = {
-		.request.slave = VHOST_USER_SLAVE_CONFIG_CHANGE_MSG,
+		.request.client = VHOST_USER_CLIENT_CONFIG_CHANGE_MSG,
 		.flags = VHOST_USER_VERSION,
 		.size = 0,
lib/librte_vhost/vhost_user.c +1 -1
 	};
@@ -2926,7 +2926,7 @@ vhost_user_slave_config_change(struct virtio_net
 *dev, bool need_reply)
 	if (need_reply)
 		msg.flags |= VHOST_USER_NEED_REPLY;
 
-	ret = send_vhost_slave_message(dev, &msg);
+	ret = send_vhost_client_message(dev, &msg);
 	if (ret < 0) {
 		VHOST_LOG_CONFIG(ERR,
lib/librte_vhost/vhost_user.c +5 -5
 				"Failed to send config change (%d)\n",
@@ -2934,11 +2934,11 @@ vhost_user_slave_config_change(struct virtio_net
 *dev, bool need_reply)
 		return ret;
 	}
 
-	return process_slave_message_reply(dev, &msg);
+	return process_client_message_reply(dev, &msg);
 }
 
 int
-rte_vhost_slave_config_change(int vid, bool need_reply)
+rte_vhost_client_config_change(int vid, bool need_reply)
 {
 	struct virtio_net *dev;
@@ -2946,17 +2946,17 @@ rte_vhost_slave_config_change(int vid, bool
 need_reply)
 	if (!dev)
 		return -ENODEV;
 
-	return vhost_user_slave_config_change(dev, need_reply);
+	return vhost_user_client_config_change(dev, need_reply);
 }
 
-static int vhost_user_slave_set_vring_host_notifier(struct virtio_net *dev,
+static int vhost_user_client_set_vring_host_notifier(struct virtio_net *dev,
 						    int index, int fd,
 						    uint64_t offset,
 						    uint64_t size)
 {
 	int ret;
 	struct VhostUserMsg msg = {
-		.request.slave =
 VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG,
+		.request.client =
 VHOST_USER_CLIENT_VRING_HOST_NOTIFIER_MSG,
lib/librte_vhost/vhost_user.c +2 -2
 		.flags = VHOST_USER_VERSION | VHOST_USER_NEED_REPLY,
 		.size = sizeof(msg.payload.area),
 		.payload.area = {
@@ -2973,14 +2973,14 @@ static int
 vhost_user_slave_set_vring_host_notifier(struct virtio_net *dev,
 		msg.fd_num = 1;
 	}
 
-	ret = send_vhost_slave_message(dev, &msg);
+	ret = send_vhost_client_message(dev, &msg);
 	if (ret < 0) {
 		VHOST_LOG_CONFIG(ERR,
 			"Failed to set host notifier (%d)\n", ret);
 		return ret;
 	}
 
-	return process_slave_message_reply(dev, &msg);
+	return process_client_message_reply(dev, &msg);
 }
 

int rte_vhost_host_notifier_ctrl(int vid, uint16_t qid, bool enable)

lib/librte_vhost/vhost_user.c +0 -0
@@ -3002,9 +3002,9 @@ int rte_vhost_host_notifier_ctrl(int vid, uint16_t qid,
 bool enable)
 	if (!(dev->features & (1ULL << VIRTIO_F_VERSION_1)) ||
 	    !(dev->features & (1ULL << VHOST_USER_F_PROTOCOL_FEATURES))

||

lib/librte_vhost/vhost_user.c +1 -2
 	    !(dev->protocol_features &
-			(1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ)) ||
+			(1ULL << VHOST_USER_PROTOCOL_F_CLIENT_REQ)) ||
 	    !(dev->protocol_features &
-			(1ULL <<

VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD)) ||

lib/librte_vhost/vhost_user.c +1 -0
+			(1ULL <<

VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD)) ||

lib/librte_vhost/vhost_user.c +0 -0
 	    !(dev->protocol_features &
 			(1ULL <<

VHOST_USER_PROTOCOL_F_HOST_NOTIFIER)))

lib/librte_vhost/vhost_user.c +1 -1
 		return -ENOTSUP;
@@ -3034,7 +3034,7 @@ int rte_vhost_host_notifier_ctrl(int vid, uint16_t qid,
 bool enable)
 				goto disable;
 			}
 
-			if (vhost_user_slave_set_vring_host_notifier(dev, i,
+			if (vhost_user_client_set_vring_host_notifier(dev, i,
 					vfio_device_fd, offset, size) < 0) {
 				ret = -EFAULT;
lib/librte_vhost/vhost_user.c +1 -1
 				goto disable;
@@ -3043,7 +3043,7 @@ int rte_vhost_host_notifier_ctrl(int vid, uint16_t qid,
 bool enable)
 	} else {
 disable:
 		for (i = q_start; i <= q_last; i++) {
-			vhost_user_slave_set_vring_host_notifier(dev, i, -1,
+			vhost_user_client_set_vring_host_notifier(dev, i, -1,
 					0, 0);
 		}
lib/librte_vhost/vhost_user.c +0 -0
 	}
lib/librte_vhost/vhost_user.h +0 -7
index 1f65efa4a935..91aa8e24ea48 100644
@@ -14,16 +14,17 @@
 
 #define VHOST_MEMORY_MAX_NREGIONS 8
 
-#define VHOST_USER_PROTOCOL_FEATURES	((1ULL <<
 VHOST_USER_PROTOCOL_F_MQ) | \
-					 (1ULL <<
 VHOST_USER_PROTOCOL_F_LOG_SHMFD) |\
-					 (1ULL <<
 VHOST_USER_PROTOCOL_F_RARP) | \
-					 (1ULL <<
 VHOST_USER_PROTOCOL_F_REPLY_ACK) | \
-					 (1ULL <<
 VHOST_USER_PROTOCOL_F_NET_MTU) | \
-					 (1ULL <<
 VHOST_USER_PROTOCOL_F_SLAVE_REQ) | \
-					 (1ULL <<

VHOST_USER_PROTOCOL_F_CRYPTO_SESSION) | \

lib/librte_vhost/vhost_user.h +0 -1
-					 (1ULL <<

VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) | \

lib/librte_vhost/vhost_user.h +0 -1
-					 (1ULL <<

VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \

lib/librte_vhost/vhost_user.h +0 -1
-					 (1ULL <<

VHOST_USER_PROTOCOL_F_PAGEFAULT))

lib/librte_vhost/vhost_user.h +21 -11
+#define VHOST_USER_PROTOCOL_FEATURES				\
+	((1ULL << VHOST_USER_PROTOCOL_F_MQ) |			\
+	 (1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD) |		\
+	 (1ULL << VHOST_USER_PROTOCOL_F_RARP) |			\
+	 (1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK) |		\
+	 (1ULL << VHOST_USER_PROTOCOL_F_NET_MTU) |		\
+	 (1ULL << VHOST_USER_PROTOCOL_F_CLIENT_REQ) |		\
+	 (1ULL << VHOST_USER_PROTOCOL_F_CRYPTO_SESSION) |	\
+	 (1ULL << VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD) |	\
+	 (1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) |	\
+	 (1ULL << VHOST_USER_PROTOCOL_F_PAGEFAULT))
 
 typedef enum VhostUserRequest {
 	VHOST_USER_NONE = 0,
@@ -47,7 +48,7 @@ typedef enum VhostUserRequest {
 	VHOST_USER_SET_VRING_ENABLE = 18,
 	VHOST_USER_SEND_RARP = 19,
 	VHOST_USER_NET_SET_MTU = 20,
-	VHOST_USER_SET_SLAVE_REQ_FD = 21,
+	VHOST_USER_SET_CLIENT_REQ_FD = 21,
 	VHOST_USER_IOTLB_MSG = 22,
 	VHOST_USER_CRYPTO_CREATE_SESS = 26,
 	VHOST_USER_CRYPTO_CLOSE_SESS = 27,
@@ -59,13 +60,13 @@ typedef enum VhostUserRequest {
 	VHOST_USER_MAX = 33
 } VhostUserRequest;
 
-typedef enum VhostUserSlaveRequest {
-	VHOST_USER_SLAVE_NONE = 0,
-	VHOST_USER_SLAVE_IOTLB_MSG = 1,
-	VHOST_USER_SLAVE_CONFIG_CHANGE_MSG = 2,
-	VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG = 3,
-	VHOST_USER_SLAVE_MAX
-} VhostUserSlaveRequest;
+typedef enum VhostUserClientRequest {
+	VHOST_USER_CLIENT_NONE = 0,
+	VHOST_USER_CLIENT_IOTLB_MSG = 1,
+	VHOST_USER_CLIENT_CONFIG_CHANGE_MSG = 2,
+	VHOST_USER_CLIENT_VRING_HOST_NOTIFIER_MSG = 3,
+	VHOST_USER_CLIENT_MAX
+} VhostUserClientRequest;
 
 typedef struct VhostUserMemoryRegion {
 	uint64_t guest_phys_addr;
@@ -124,8 +125,8 @@ typedef struct VhostUserInflight {
 
 typedef struct VhostUserMsg {
 	union {
-		uint32_t master; /* a VhostUserRequest value */
-		uint32_t slave;  /* a VhostUserSlaveRequest value*/
+		uint32_t server; /* a VhostUserRequest value */
+		uint32_t client;  /* a VhostUserClientRequest value*/
 	} request;
 
 #define VHOST_USER_VERSION_MASK     0x3
--

2.26.2

#143 lore raw

Re: [dpdk-dev] [PATCH v4 27/27] vhost: rename SLAVE to CLIENT

Quoted 11 lines · Chenbo

Hi Stephen,

Thanks for working on this! The slave/master naming of vhost is defined by vhost-user spec, which is maintained by QEMU. I think if we want to change it. The spec in QEMU should first be changed, then as an implementation of the spec, we could easily change it. Also, using server/client to be the new version may cause some code confusion in vhost. Because vhost traditionally can act as a socket server or client (you can see the names in the code) and the vhost-user slave/master generally refers to vhost-user pmd/QEMU. So it may make the code hard to understand. Do you think this make sense?

I agree, we need to come up with a way of distinguishing between the vhost vs socket roles. Maybe the virtio original virtio terminiology "driver/device" could be used. Other ways to refer to the vhost pair is "frontend/backend".

Adrián

Quoted 634 lines

Thanks!
Chenbo

Quoted 630 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Stephen Hemminger
Sent: Thursday, July 2, 2020 4:24 AM
To: [email protected]
Cc: Stephen Hemminger <[email protected]>
Subject: [dpdk-dev] [PATCH v4 27/27] vhost: rename SLAVE to CLIENT

The vhost is a client server architecture so replace the term slave with client.

---
 drivers/vdpa/ifc/ifcvf_vdpa.c          |  4 +-
 drivers/vdpa/mlx5/mlx5_vdpa.c          |  4 +-
 lib/librte_vhost/rte_vhost.h           | 16 ++---
 lib/librte_vhost/rte_vhost_version.map |  2 +-
 lib/librte_vhost/vhost.c               |  4 +-
 lib/librte_vhost/vhost.h               |  4 +-
 lib/librte_vhost/vhost_crypto.c        |  2 +-
 lib/librte_vhost/vhost_user.c          | 96 +++++++++++++-------------
 lib/librte_vhost/vhost_user.h          | 41 +++++------
 9 files changed, 87 insertions(+), 86 deletions(-)
drivers/vdpa/ifc/ifcvf_vdpa.c +2 -2
index de54dc8aab6c..6c02b99f5e44 100644
@@ -1071,8 +1071,8 @@ ifcvf_get_vdpa_features(struct rte_vdpa_device
 *vdev, uint64_t *features)
 
 #define VDPA_SUPPORTED_PROTOCOL_FEATURES \
 		(1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK | \
-		 1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ | \
-		 1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD | \
+		 1ULL << VHOST_USER_PROTOCOL_F_CLIENT_REQ | \
+		 1ULL << VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD | \
 		 1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER | \
 		 1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD)

static int

drivers/vdpa/mlx5/mlx5_vdpa.c +2 -2
index dbd36ab0c95e..8fd2de9ba98f 100644
@@ -34,8 +34,8 @@
 			    (1ULL << VIRTIO_NET_F_MTU))
 
 #define MLX5_VDPA_PROTOCOL_FEATURES \
-			    ((1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ) |
 \
-			     (1ULL <<
 VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) | \
+			    ((1ULL << VHOST_USER_PROTOCOL_F_CLIENT_REQ)
 | \
+			     (1ULL <<

VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD) | \
(1ULL <<
VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \
(1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD)
| \

drivers/vdpa/mlx5/mlx5_vdpa.c +0 -0
 			     (1ULL << VHOST_USER_PROTOCOL_F_MQ) | \
lib/librte_vhost/rte_vhost.h +8 -8
index 8a5c332c83ac..b952e6d47021 100644
@@ -74,8 +74,8 @@ extern "C" {
 #define VHOST_USER_PROTOCOL_F_NET_MTU	4
 #endif
 
-#ifndef VHOST_USER_PROTOCOL_F_SLAVE_REQ
-#define VHOST_USER_PROTOCOL_F_SLAVE_REQ	5
+#ifndef VHOST_USER_PROTOCOL_F_CLIENT_REQ
+#define VHOST_USER_PROTOCOL_F_CLIENT_REQ	5
 #endif
 
 #ifndef VHOST_USER_PROTOCOL_F_CRYPTO_SESSION
@@ -90,8 +90,8 @@ extern "C" {
 #define VHOST_USER_PROTOCOL_F_CONFIG 9
 #endif
 
-#ifndef VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD
-#define VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD 10
+#ifndef VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD
+#define VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD 10
 #endif
 
 #ifndef VHOST_USER_PROTOCOL_F_HOST_NOTIFIER
@@ -249,9 +249,9 @@ typedef enum rte_vhost_msg_result
 (*rte_vhost_msg_handle)(int vid, void *msg);
  * Optional vhost user message handlers.
  */
 struct rte_vhost_user_extern_ops {
-	/* Called prior to the master message handling. */
+	/* Called prior to the server message handling. */
 	rte_vhost_msg_handle pre_msg_handle;
-	/* Called after the master message handling. */
+	/* Called after the server message handling. */
 	rte_vhost_msg_handle post_msg_handle;
 };
@@ -1008,13 +1008,13 @@ rte_vhost_get_vdpa_device(int vid);
  * @param vid
  *  vhost device ID
  * @param need_reply
- *  wait for the master response the status of this operation
+ *  wait for the server response the status of this operation
  * @return
  *  0 on success, < 0 on failure
  */
 __rte_experimental
 int
-rte_vhost_slave_config_change(int vid, bool need_reply);
+rte_vhost_client_config_change(int vid, bool need_reply);
 
 #ifdef __cplusplus
 }
lib/librte_vhost/rte_vhost_version.map +1 -1
index 86784405a1e8..74973ce9b8ec 100644
@@ -65,7 +65,7 @@ EXPERIMENTAL {
 	rte_vhost_clr_inflight_desc_packed;
 	rte_vhost_get_vhost_ring_inflight;
 	rte_vhost_get_vring_base_from_inflight;
-	rte_vhost_slave_config_change;
+	rte_vhost_client_config_change;
 	rte_vdpa_find_device_by_name;
 	rte_vdpa_get_rte_device;
 	rte_vdpa_get_queue_num;
lib/librte_vhost/vhost.c +2 -2
index 0d822d6a3f48..3d111d714bf1 100644
@@ -632,9 +632,9 @@ vhost_new_device(void)
 	vhost_devices[i] = dev;
 	dev->vid = i;
 	dev->flags = VIRTIO_DEV_BUILTIN_VIRTIO_NET;
-	dev->slave_req_fd = -1;
+	dev->client_req_fd = -1;
 	dev->postcopy_ufd = -1;
-	rte_spinlock_init(&dev->slave_req_lock);
+	rte_spinlock_init(&dev->client_req_lock);
 
 	return i;
 }
lib/librte_vhost/vhost.h +2 -2
index 0344636997a6..a0902d1535c4 100644
@@ -356,8 +356,8 @@ struct virtio_net {
 	uint32_t		max_guest_pages;
 	struct guest_page       *guest_pages;
 
-	int			slave_req_fd;
-	rte_spinlock_t		slave_req_lock;
+	int			client_req_fd;
+	rte_spinlock_t		client_req_lock;
 
 	int			postcopy_ufd;
 	int			postcopy_listening;
lib/librte_vhost/vhost_crypto.c +1 -1
index 0f9df4059d0b..8e4fc1bf015a 100644
@@ -460,7 +460,7 @@ vhost_crypto_msg_post_handler(int vid, void *msg)
 		return RTE_VHOST_MSG_RESULT_ERR;
 	}
 
-	switch (vmsg->request.master) {
+	switch (vmsg->request.server) {
 	case VHOST_USER_CRYPTO_CREATE_SESS:
 		vhost_crypto_create_sess(vcrypto,
 				&vmsg->payload.crypto_session);
lib/librte_vhost/vhost_user.c +4 -4
index 6039a8fdb9cb..56da81cd1e17 100644
@@ -7,11 +7,11 @@
  * The vhost-user protocol connection is an external interface, so it must be
  * robust against invalid inputs.
  *
- * This is important because the vhost-user master is only one step removed
+ * This is important because the vhost-user server is only one step removed
  * from the guest.  Malicious guests that have escaped will then launch further
- * attacks from the vhost-user master.
+ * attacks from the vhost-user server.
  *
- * Even in deployments where guests are trusted, a bug in the vhost-user master
+ * Even in deployments where guests are trusted, a bug in the vhost-user server
  * can still cause invalid messages to be sent.  Such messages must not
  * compromise the stability of the DPDK application by causing crashes, memory
  * corruption, or other problematic behavior.
@@ -78,7 +78,7 @@ static const char *vhost_message_str[VHOST_USER_MAX]
 = {
 	[VHOST_USER_SET_VRING_ENABLE]  =
 "VHOST_USER_SET_VRING_ENABLE",
 	[VHOST_USER_SEND_RARP]  = "VHOST_USER_SEND_RARP",
 	[VHOST_USER_NET_SET_MTU]  = "VHOST_USER_NET_SET_MTU",
-	[VHOST_USER_SET_SLAVE_REQ_FD]  =
 "VHOST_USER_SET_SLAVE_REQ_FD",
+	[VHOST_USER_SET_CLIENT_REQ_FD]  =

"VHOST_USER_SET_CLIENT_REQ_FD",

lib/librte_vhost/vhost_user.c +0 -0
 	[VHOST_USER_IOTLB_MSG]  = "VHOST_USER_IOTLB_MSG",
 	[VHOST_USER_CRYPTO_CREATE_SESS] =

"VHOST_USER_CRYPTO_CREATE_SESS",
[VHOST_USER_CRYPTO_CLOSE_SESS] =
"VHOST_USER_CRYPTO_CLOSE_SESS",

lib/librte_vhost/vhost_user.c +1 -1
@@ -114,7 +114,7 @@ validate_msg_fds(struct VhostUserMsg *msg, int
 expected_fds)
 	VHOST_LOG_CONFIG(ERR,
 		" Expect %d FDs for request %s, received %d\n",
 		expected_fds,
-		vhost_message_str[msg->request.master],
+		vhost_message_str[msg->request.server],
 		msg->fd_num);
 
lib/librte_vhost/vhost_user.c +4 -4
 	close_msg_fds(msg);
@@ -215,9 +215,9 @@ vhost_backend_cleanup(struct virtio_net *dev)
 		dev->inflight_info = NULL;
 	}
 
-	if (dev->slave_req_fd >= 0) {
-		close(dev->slave_req_fd);
-		dev->slave_req_fd = -1;
+	if (dev->client_req_fd >= 0) {
+		close(dev->client_req_fd);
+		dev->client_req_fd = -1;
 	}
 
 	if (dev->postcopy_ufd >= 0) {
@@ -346,7 +346,7 @@ vhost_user_set_features(struct virtio_net **pdev, struct
 VhostUserMsg *msg,
 			return RTE_VHOST_MSG_RESULT_OK;
 
 		/*
-		 * Error out if master tries to change features while device is
+		 * Error out if server tries to change features while device is
 		 * in running state. The exception being VHOST_F_LOG_ALL,

which

lib/librte_vhost/vhost_user.c +2 -2
 		 * is enabled when the live-migration starts.
 		 */
@@ -1235,10 +1235,10 @@ vhost_user_set_mem_table(struct virtio_net
 **pdev, struct VhostUserMsg *msg,
 		if (validate_msg_fds(&ack_msg, 0) != 0)
 			goto err_mmap;
 
-		if (ack_msg.request.master != VHOST_USER_SET_MEM_TABLE)
 {
+		if (ack_msg.request.server != VHOST_USER_SET_MEM_TABLE) {
 			VHOST_LOG_CONFIG(ERR,
 				"Bad qemu ack on postcopy set-mem-table
 (%d)\n",
-				ack_msg.request.master);
+				ack_msg.request.server);
lib/librte_vhost/vhost_user.c +3 -3
 			goto err_mmap;
 		}
@@ -2049,14 +2049,14 @@ vhost_user_set_protocol_features(struct virtio_net
 **pdev,
 {
 	struct virtio_net *dev = *pdev;
 	uint64_t protocol_features = msg->payload.u64;
-	uint64_t slave_protocol_features = 0;
+	uint64_t client_protocol_features = 0;
 
 	if (validate_msg_fds(msg, 0) != 0)
 		return RTE_VHOST_MSG_RESULT_ERR;
 
 	rte_vhost_driver_get_protocol_features(dev->ifname,
-			&slave_protocol_features);
-	if (protocol_features & ~slave_protocol_features) {
+			&client_protocol_features);
+	if (protocol_features & ~client_protocol_features) {
 		VHOST_LOG_CONFIG(ERR,
 			"(%d) received invalid protocol features.\n",
lib/librte_vhost/vhost_user.c +4 -4
 			dev->vid);
@@ -2228,15 +2228,15 @@ vhost_user_set_req_fd(struct virtio_net **pdev,
 struct VhostUserMsg *msg,
 
 	if (fd < 0) {
 		VHOST_LOG_CONFIG(ERR,
-				"Invalid file descriptor for slave channel (%d)\n",
+				"Invalid file descriptor for client channel
 (%d)\n",
 				fd);
 		return RTE_VHOST_MSG_RESULT_ERR;
 	}
 
-	if (dev->slave_req_fd >= 0)
-		close(dev->slave_req_fd);
+	if (dev->client_req_fd >= 0)
+		close(dev->client_req_fd);
 
-	dev->slave_req_fd = fd;
+	dev->client_req_fd = fd;
 
lib/librte_vhost/vhost_user.c +1 -1
 	return RTE_VHOST_MSG_RESULT_OK;
 }
@@ -2472,7 +2472,7 @@ static vhost_message_handler_t
 vhost_message_handlers[VHOST_USER_MAX] = {
 	[VHOST_USER_SET_VRING_ENABLE] = vhost_user_set_vring_enable,
 	[VHOST_USER_SEND_RARP] = vhost_user_send_rarp,
 	[VHOST_USER_NET_SET_MTU] = vhost_user_net_set_mtu,
-	[VHOST_USER_SET_SLAVE_REQ_FD] = vhost_user_set_req_fd,
+	[VHOST_USER_SET_CLIENT_REQ_FD] = vhost_user_set_req_fd,
 	[VHOST_USER_IOTLB_MSG] = vhost_user_iotlb_msg,
 	[VHOST_USER_POSTCOPY_ADVISE] = vhost_user_set_postcopy_advise,
lib/librte_vhost/vhost_user.c +4 -4
 	[VHOST_USER_POSTCOPY_LISTEN] = vhost_user_set_postcopy_listen,
@@ -2541,16 +2541,16 @@ send_vhost_reply(int sockfd, struct VhostUserMsg
 *msg)
 }
 
 static int
-send_vhost_slave_message(struct virtio_net *dev, struct VhostUserMsg *msg)
+send_vhost_client_message(struct virtio_net *dev, struct VhostUserMsg *msg)
 {
 	int ret;
 
 	if (msg->flags & VHOST_USER_NEED_REPLY)
-		rte_spinlock_lock(&dev->slave_req_lock);
+		rte_spinlock_lock(&dev->client_req_lock);
 
-	ret = send_vhost_message(dev->slave_req_fd, msg);
+	ret = send_vhost_message(dev->client_req_fd, msg);
 	if (ret < 0 && (msg->flags & VHOST_USER_NEED_REPLY))
-		rte_spinlock_unlock(&dev->slave_req_lock);
+		rte_spinlock_unlock(&dev->client_req_lock);
 
 	return ret;

}

lib/librte_vhost/vhost_user.c +1 -1
@@ -2564,7 +2564,7 @@ vhost_user_check_and_alloc_queue_pair(struct
 virtio_net *dev,
 {
 	uint32_t vring_idx;
 
-	switch (msg->request.master) {
+	switch (msg->request.server) {
 	case VHOST_USER_SET_VRING_KICK:
 	case VHOST_USER_SET_VRING_CALL:
lib/librte_vhost/vhost_user.c +5 -5
 	case VHOST_USER_SET_VRING_ERR:
@@ -2667,7 +2667,7 @@ vhost_user_msg_handler(int vid, int fd)
 	}
 
 	ret = 0;
-	request = msg.request.master;
+	request = msg.request.server;
 	if (request > VHOST_USER_NONE && request < VHOST_USER_MAX &&
 			vhost_message_str[request]) {
 		if (request != VHOST_USER_IOTLB_MSG)
@@ -2710,7 +2710,7 @@ vhost_user_msg_handler(int vid, int fd)
 	case VHOST_USER_SET_VRING_ENABLE:
 	case VHOST_USER_SEND_RARP:
 	case VHOST_USER_NET_SET_MTU:
-	case VHOST_USER_SET_SLAVE_REQ_FD:
+	case VHOST_USER_SET_CLIENT_REQ_FD:
 		if (!(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED)) {
 			vhost_user_lock_all_queue_pairs(dev);
 			unlock_required = 1;
@@ -2850,7 +2850,7 @@ vhost_user_msg_handler(int vid, int fd)
 	return 0;
 }
 
-static int process_slave_message_reply(struct virtio_net *dev,
+static int process_client_message_reply(struct virtio_net *dev,
 				       const struct VhostUserMsg *msg)
 {
 	struct VhostUserMsg msg_reply;
@@ -2859,11 +2859,11 @@ static int process_slave_message_reply(struct
 virtio_net *dev,
 	if ((msg->flags & VHOST_USER_NEED_REPLY) == 0)
 		return 0;
 
-	ret = read_vhost_message(dev->slave_req_fd, &msg_reply);
+	ret = read_vhost_message(dev->client_req_fd, &msg_reply);
 	if (ret <= 0) {
 		if (ret < 0)
 			VHOST_LOG_CONFIG(ERR,
-				"vhost read slave message reply failed\n");
+				"vhost read client message reply failed\n");
 		else
 			VHOST_LOG_CONFIG(INFO,
lib/librte_vhost/vhost_user.c +2 -2
 				"vhost peer closed\n");
@@ -2872,10 +2872,10 @@ static int process_slave_message_reply(struct
 virtio_net *dev,
 	}
 
 	ret = 0;
-	if (msg_reply.request.slave != msg->request.slave) {
+	if (msg_reply.request.client != msg->request.client) {
 		VHOST_LOG_CONFIG(ERR,
 			"Received unexpected msg type (%u), expected %u\n",
-			msg_reply.request.slave, msg->request.slave);
+			msg_reply.request.client, msg->request.client);
 		ret = -1;
 		goto out;
lib/librte_vhost/vhost_user.c +2 -2
 	}
@@ -2883,7 +2883,7 @@ static int process_slave_message_reply(struct
 virtio_net *dev,
 	ret = msg_reply.payload.u64 ? -1 : 0;
 
 out:
-	rte_spinlock_unlock(&dev->slave_req_lock);
+	rte_spinlock_unlock(&dev->client_req_lock);
 	return ret;
 }
@@ -2892,7 +2892,7 @@ vhost_user_iotlb_miss(struct virtio_net *dev,
 uint64_t iova, uint8_t perm)
 {
 	int ret;
 	struct VhostUserMsg msg = {
-		.request.slave = VHOST_USER_SLAVE_IOTLB_MSG,
+		.request.client = VHOST_USER_CLIENT_IOTLB_MSG,
 		.flags = VHOST_USER_VERSION,
 		.size = sizeof(msg.payload.iotlb),
lib/librte_vhost/vhost_user.c +1 -1
 		.payload.iotlb = {
@@ -2902,7 +2902,7 @@ vhost_user_iotlb_miss(struct virtio_net *dev,
 uint64_t iova, uint8_t perm)
 		},
 	};
 
-	ret = send_vhost_message(dev->slave_req_fd, &msg);
+	ret = send_vhost_message(dev->client_req_fd, &msg);
 	if (ret < 0) {
 		VHOST_LOG_CONFIG(ERR,
lib/librte_vhost/vhost_user.c +2 -2
 				"Failed to send IOTLB miss message (%d)\n",
@@ -2914,11 +2914,11 @@ vhost_user_iotlb_miss(struct virtio_net *dev,
 uint64_t iova, uint8_t perm)
 }
 
 static int
-vhost_user_slave_config_change(struct virtio_net *dev, bool need_reply)
+vhost_user_client_config_change(struct virtio_net *dev, bool need_reply)
 {
 	int ret;
 	struct VhostUserMsg msg = {
-		.request.slave = VHOST_USER_SLAVE_CONFIG_CHANGE_MSG,
+		.request.client = VHOST_USER_CLIENT_CONFIG_CHANGE_MSG,
 		.flags = VHOST_USER_VERSION,
 		.size = 0,
lib/librte_vhost/vhost_user.c +1 -1
 	};
@@ -2926,7 +2926,7 @@ vhost_user_slave_config_change(struct virtio_net
 *dev, bool need_reply)
 	if (need_reply)
 		msg.flags |= VHOST_USER_NEED_REPLY;
 
-	ret = send_vhost_slave_message(dev, &msg);
+	ret = send_vhost_client_message(dev, &msg);
 	if (ret < 0) {
 		VHOST_LOG_CONFIG(ERR,
lib/librte_vhost/vhost_user.c +5 -5
 				"Failed to send config change (%d)\n",
@@ -2934,11 +2934,11 @@ vhost_user_slave_config_change(struct virtio_net
 *dev, bool need_reply)
 		return ret;
 	}
 
-	return process_slave_message_reply(dev, &msg);
+	return process_client_message_reply(dev, &msg);
 }
 
 int
-rte_vhost_slave_config_change(int vid, bool need_reply)
+rte_vhost_client_config_change(int vid, bool need_reply)
 {
 	struct virtio_net *dev;
@@ -2946,17 +2946,17 @@ rte_vhost_slave_config_change(int vid, bool
 need_reply)
 	if (!dev)
 		return -ENODEV;
 
-	return vhost_user_slave_config_change(dev, need_reply);
+	return vhost_user_client_config_change(dev, need_reply);
 }
 
-static int vhost_user_slave_set_vring_host_notifier(struct virtio_net *dev,
+static int vhost_user_client_set_vring_host_notifier(struct virtio_net *dev,
 						    int index, int fd,
 						    uint64_t offset,
 						    uint64_t size)
 {
 	int ret;
 	struct VhostUserMsg msg = {
-		.request.slave =
 VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG,
+		.request.client =
 VHOST_USER_CLIENT_VRING_HOST_NOTIFIER_MSG,
lib/librte_vhost/vhost_user.c +2 -2
 		.flags = VHOST_USER_VERSION | VHOST_USER_NEED_REPLY,
 		.size = sizeof(msg.payload.area),
 		.payload.area = {
@@ -2973,14 +2973,14 @@ static int
 vhost_user_slave_set_vring_host_notifier(struct virtio_net *dev,
 		msg.fd_num = 1;
 	}
 
-	ret = send_vhost_slave_message(dev, &msg);
+	ret = send_vhost_client_message(dev, &msg);
 	if (ret < 0) {
 		VHOST_LOG_CONFIG(ERR,
 			"Failed to set host notifier (%d)\n", ret);
 		return ret;
 	}
 
-	return process_slave_message_reply(dev, &msg);
+	return process_client_message_reply(dev, &msg);
 }
 

int rte_vhost_host_notifier_ctrl(int vid, uint16_t qid, bool enable)

lib/librte_vhost/vhost_user.c +0 -0
@@ -3002,9 +3002,9 @@ int rte_vhost_host_notifier_ctrl(int vid, uint16_t qid,
 bool enable)
 	if (!(dev->features & (1ULL << VIRTIO_F_VERSION_1)) ||
 	    !(dev->features & (1ULL << VHOST_USER_F_PROTOCOL_FEATURES))

||

lib/librte_vhost/vhost_user.c +1 -2
 	    !(dev->protocol_features &
-			(1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ)) ||
+			(1ULL << VHOST_USER_PROTOCOL_F_CLIENT_REQ)) ||
 	    !(dev->protocol_features &
-			(1ULL <<

VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD)) ||

lib/librte_vhost/vhost_user.c +1 -0
+			(1ULL <<

VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD)) ||

lib/librte_vhost/vhost_user.c +0 -0
 	    !(dev->protocol_features &
 			(1ULL <<

VHOST_USER_PROTOCOL_F_HOST_NOTIFIER)))

lib/librte_vhost/vhost_user.c +1 -1
 		return -ENOTSUP;
@@ -3034,7 +3034,7 @@ int rte_vhost_host_notifier_ctrl(int vid, uint16_t qid,
 bool enable)
 				goto disable;
 			}
 
-			if (vhost_user_slave_set_vring_host_notifier(dev, i,
+			if (vhost_user_client_set_vring_host_notifier(dev, i,
 					vfio_device_fd, offset, size) < 0) {
 				ret = -EFAULT;
lib/librte_vhost/vhost_user.c +1 -1
 				goto disable;
@@ -3043,7 +3043,7 @@ int rte_vhost_host_notifier_ctrl(int vid, uint16_t qid,
 bool enable)
 	} else {
 disable:
 		for (i = q_start; i <= q_last; i++) {
-			vhost_user_slave_set_vring_host_notifier(dev, i, -1,
+			vhost_user_client_set_vring_host_notifier(dev, i, -1,
 					0, 0);
 		}
lib/librte_vhost/vhost_user.c +0 -0
 	}
lib/librte_vhost/vhost_user.h +0 -7
index 1f65efa4a935..91aa8e24ea48 100644
@@ -14,16 +14,17 @@
 
 #define VHOST_MEMORY_MAX_NREGIONS 8
 
-#define VHOST_USER_PROTOCOL_FEATURES	((1ULL <<
 VHOST_USER_PROTOCOL_F_MQ) | \
-					 (1ULL <<
 VHOST_USER_PROTOCOL_F_LOG_SHMFD) |\
-					 (1ULL <<
 VHOST_USER_PROTOCOL_F_RARP) | \
-					 (1ULL <<
 VHOST_USER_PROTOCOL_F_REPLY_ACK) | \
-					 (1ULL <<
 VHOST_USER_PROTOCOL_F_NET_MTU) | \
-					 (1ULL <<
 VHOST_USER_PROTOCOL_F_SLAVE_REQ) | \
-					 (1ULL <<

VHOST_USER_PROTOCOL_F_CRYPTO_SESSION) | \

lib/librte_vhost/vhost_user.h +0 -1
-					 (1ULL <<

VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) | \

lib/librte_vhost/vhost_user.h +0 -1
-					 (1ULL <<

VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \

lib/librte_vhost/vhost_user.h +0 -1
-					 (1ULL <<

VHOST_USER_PROTOCOL_F_PAGEFAULT))

lib/librte_vhost/vhost_user.h +21 -11
+#define VHOST_USER_PROTOCOL_FEATURES				\
+	((1ULL << VHOST_USER_PROTOCOL_F_MQ) |			\
+	 (1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD) |		\
+	 (1ULL << VHOST_USER_PROTOCOL_F_RARP) |			\
+	 (1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK) |		\
+	 (1ULL << VHOST_USER_PROTOCOL_F_NET_MTU) |		\
+	 (1ULL << VHOST_USER_PROTOCOL_F_CLIENT_REQ) |		\
+	 (1ULL << VHOST_USER_PROTOCOL_F_CRYPTO_SESSION) |	\
+	 (1ULL << VHOST_USER_PROTOCOL_F_CLIENT_SEND_FD) |	\
+	 (1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) |	\
+	 (1ULL << VHOST_USER_PROTOCOL_F_PAGEFAULT))
 
 typedef enum VhostUserRequest {
 	VHOST_USER_NONE = 0,
@@ -47,7 +48,7 @@ typedef enum VhostUserRequest {
 	VHOST_USER_SET_VRING_ENABLE = 18,
 	VHOST_USER_SEND_RARP = 19,
 	VHOST_USER_NET_SET_MTU = 20,
-	VHOST_USER_SET_SLAVE_REQ_FD = 21,
+	VHOST_USER_SET_CLIENT_REQ_FD = 21,
 	VHOST_USER_IOTLB_MSG = 22,
 	VHOST_USER_CRYPTO_CREATE_SESS = 26,
 	VHOST_USER_CRYPTO_CLOSE_SESS = 27,
@@ -59,13 +60,13 @@ typedef enum VhostUserRequest {
 	VHOST_USER_MAX = 33
 } VhostUserRequest;
 
-typedef enum VhostUserSlaveRequest {
-	VHOST_USER_SLAVE_NONE = 0,
-	VHOST_USER_SLAVE_IOTLB_MSG = 1,
-	VHOST_USER_SLAVE_CONFIG_CHANGE_MSG = 2,
-	VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG = 3,
-	VHOST_USER_SLAVE_MAX
-} VhostUserSlaveRequest;
+typedef enum VhostUserClientRequest {
+	VHOST_USER_CLIENT_NONE = 0,
+	VHOST_USER_CLIENT_IOTLB_MSG = 1,
+	VHOST_USER_CLIENT_CONFIG_CHANGE_MSG = 2,
+	VHOST_USER_CLIENT_VRING_HOST_NOTIFIER_MSG = 3,
+	VHOST_USER_CLIENT_MAX
+} VhostUserClientRequest;
 
 typedef struct VhostUserMemoryRegion {
 	uint64_t guest_phys_addr;
@@ -124,8 +125,8 @@ typedef struct VhostUserInflight {
 
 typedef struct VhostUserMsg {
 	union {
-		uint32_t master; /* a VhostUserRequest value */
-		uint32_t slave;  /* a VhostUserSlaveRequest value*/
+		uint32_t server; /* a VhostUserRequest value */
+		uint32_t client;  /* a VhostUserClientRequest value*/
 	} request;
 
 #define VHOST_USER_VERSION_MASK     0x3
--

2.26.2

Signature · 1 line
Adrián Moreno
#144 lore raw

Re: [dpdk-dev] [PATCH v4 00/27] Replace references to master and slave

In reply to Stephen Hemminger
Quoted 13 lines · Stephen Hemminger

This set of patches changes the API and conventions around referring to DPDK lcores. The first patch changes rte_get_master_lcore_id and related calls. The rest fix the DPDK to use the new naming.

Buried in the documentation set are a couple of patches where we were using incorrect naming around primary/secondary process.

This will could/should be flagged as an API policy violation since new API is jumping the queue of EXPERIMENTAL. But we can vote on the exception.

The one area left to be fixed is the bonding device.

Quoted 8 lines

v4
- fix checkpatch warnings
note: this patchset will cause some false positives
v3
- modify vhost to replace slave with client
- modify memif to replace slave with client
- fix variable names s2m becomes i2w etc.

Hi Stephen,

This patchset does not apply on the latest master. Please rebase and resend.

Signature · 2 lines
Thanks,
Anatoly
#145 lore raw

Re: [dpdk-dev] [PATCH v4 00/27] Replace references to master and slave

In reply to Stephen Hemminger
Quoted 4 lines · Stephen Hemminger

This set of patches changes the API and conventions around referring to DPDK lcores. The first patch changes rte_get_master_lcore_id and related calls. The rest fix the DPDK to use the new naming.

Quoted 9 lines

Buried in the documentation set are a couple of patches where we were using incorrect naming around primary/secondary process.

This will could/should be flagged as an API policy violation since new API is jumping the queue of EXPERIMENTAL. But we can vote on the exception.

The one area left to be fixed is the bonding device.

I am not too sure about the "initial" core term, it doesn't strike me as immediately obvious as to what "initial" core does. Perhaps "main" lcore would be more descriptive?

Signature · 2 lines
Thanks,
Anatoly
#146 lore raw

cover Inclusive language fixes and deprecation notices

In reply to Stephen Hemminger

This set annonuces the upcoming changes for 20.11 around master/slave and blacklist/whitelist. It also fixes several places in the current code where the wrong and confusing terminolgy was used.

Stephen Hemminger (6):
doc: announce deprecation of master lcore
kni: fix reference to master/slave process
doc: fix incorrect reference to master process
doc: announce deprecation blacklist/whitelist
rte_ethdev: change comment to rte_dev_eth_mac_addr_add
check_maintainers: change variable names

 devtools/check-maintainers.sh                 |  8 ++---
 .../thread_safety_dpdk_functions.rst          |  4 +--
 doc/guides/rel_notes/deprecation.rst          | 33 +++++++++++++++++++
 lib/librte_ethdev/rte_ethdev.h                |  3 +-
 lib/librte_kni/rte_kni.h                      |  2 +-
 5 files changed, 41 insertions(+), 9 deletions(-)
Signature · 1 line
2.27.0
#147 lore raw

PATCH 1/6 doc: announce deprecation of master lcore

Announce upcoming changes related to master/slave in reference to lcore.

---
 doc/guides/rel_notes/deprecation.rst | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
doc/guides/rel_notes/deprecation.rst +17 -0
index 99c98062ffc2..31a2b942fba5 100644
@@ -148,3 +148,20 @@ Deprecation Notices
   Python 2 support will be completely removed in 20.11.
   In 20.08, explicit deprecation warnings will be displayed when running
   scripts with Python 2.
+
+* eal: To be more inclusive in choice of naming, the DPDK project
+  will replace uses of master/slave in  the API's and command line arguments.
+
+  References to master/slave in relation to lcore will be renamed
+  to initial/worker.  The function ``rte_get_master_lcore()``
+  will be renamed to ``rte_get_initial_lcore()``.
+  For the 20.11, release both names will be present and the
+  old function will be marked with the deprecated tag.
+  The old function will be removed in 21.11 version.
+
+  The macros related to primary and secondary lcore will also
+  be change:  ``RTE_LCORE_FOREACH_SLAVE`` will be replaced
+  with ``RTE_LCORE_FOREACH_WORKER``.
+
+  The ``master-lcore`` argument to testpmd will be replaced
+  with ``initial-lcore``.
Signature · 1 line
2.27.0
#148 lore raw

Re: [dpdk-dev] [PATCH 20.08 1/6] doc: announce deprecation of master lcore

Quoted 19 lines · Stephen Hemminger

Announce upcoming changes related to master/slave in reference to lcore.

---
  doc/guides/rel_notes/deprecation.rst | 17 +++++++++++++++++
  1 file changed, 17 insertions(+)
doc/guides/rel_notes/deprecation.rst +3 -0
index 99c98062ffc2..31a2b942fba5 100644
@@ -148,3 +148,20 @@ Deprecation Notices
    Python 2 support will be completely removed in 20.11.
    In 20.08, explicit deprecation warnings will be displayed when running
    scripts with Python 2.
+
+* eal: To be more inclusive in choice of naming, the DPDK project
+  will replace uses of master/slave in  the API's and command line arguments.

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 163

Quoted 10 lines
doc/guides/rel_notes/deprecation.rst +10 -0
+
+  References to master/slave in relation to lcore will be renamed
+  to initial/worker.  The function ``rte_get_master_lcore()``
+  will be renamed to ``rte_get_initial_lcore()``.
+  For the 20.11, release both names will be present and the
+  old function will be marked with the deprecated tag.
+  The old function will be removed in 21.11 version.
+
+  The macros related to primary and secondary lcore will also
+  be change:  ``RTE_LCORE_FOREACH_SLAVE`` will be replaced

^^

I think this was supposed to be either "will also change" or "will also be changed", but got mashed together :)

Quoted 5 lines
doc/guides/rel_notes/deprecation.rst +4 -0
+  with ``RTE_LCORE_FOREACH_WORKER``.
+
+  The ``master-lcore`` argument to testpmd will be replaced
+  with ``initial-lcore``.
Signature · 2 lines
Thanks,
Anatoly
#149 lore raw

PATCH 2/6 kni: fix reference to master/slave process

In reply to Stephen Hemminger

In DPDK, the correct terms for process are primary/secondary. This is bugfix, not a change in terms for new release.

Fixes f2e7592c474c ("kni: fix multi-process support")
---
 lib/librte_kni/rte_kni.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_kni/rte_kni.h +1 -1
index f1bb782c68ea..855facd1a319 100644
@@ -212,7 +212,7 @@ const char *rte_kni_get_name(const struct rte_kni *kni);
 
 /**
  * Register KNI request handling for a specified port,and it can
- * be called by master process or slave process.
+ * be called by primary process or secondary process.
  *
  * @param kni
  *  pointer to struct rte_kni.
Signature · 1 line
2.27.0
#150 lore raw

PATCH 3/6 doc: fix incorrect reference to master process

In reply to Stephen Hemminger

Correct terminolgy here is primary process.
This is a bug in original doc.

Fixes fc1f2750a3ec ("doc: programmers guide")
---
 doc/guides/prog_guide/thread_safety_dpdk_functions.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
doc/guides/prog_guide/thread_safety_dpdk_functions.rst +2 -2
index 0f539db2b869..5618e25e47fb 100644
@@ -61,8 +61,8 @@ rather than subsequently in the forwarding threads.
 However, the DPDK performs checks to ensure that libraries are only initialized once.
 If initialization is attempted more than once, an error is returned.
 
-In the multi-process case, the configuration information of shared memory will only be initialized by the master process.
-Thereafter, both master and secondary processes can allocate/release any objects of memory that finally rely on rte_malloc or memzones.
+In the multi-process case, the configuration information of shared memory will only be initialized by the primary process.
+Thereafter, both primary and secondary processes can allocate/release any objects of memory that finally rely on rte_malloc or memzones.
 
 Interrupt Thread
 ----------------
Signature · 1 line
2.27.0
#152 lore raw

PATCH 4/6 doc: announce deprecation blacklist/whitelist

In reply to Stephen Hemminger

Announce upcoming changes for 20.11 around the terms blacklist and whitelist.

---
 doc/guides/rel_notes/deprecation.rst | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
doc/guides/rel_notes/deprecation.rst +16 -0
index 31a2b942fba5..b022a9f91ece 100644
@@ -165,3 +165,19 @@ Deprecation Notices
 
   The ``master-lcore`` argument to testpmd will be replaced
   with ``initial-lcore``.
+
+* eal: The terms blacklist and whitelist to describe devices used
+  by DPDK will be replaced by blocked and allowed in the 20.11 relase.
+  This will apply to command line arguments and macros.
+
+  The macros ``RTE_DEV_BLACKLISTED`` will be replaced with ``RTE_DEV_BLOCKED``
+  and ``RTE_DEV_WHITELISTED`` will be replaced with ``RTE_DEV_ALLOWED``
+
+  The old macros will be marked as deprecated in 20.11 and removed
+  in the 21.11 release.
+
+  The command line arguments to ``rte_eal_init`` will change from
+  ``-b, --pci-blacklist`` to ``-x, --exclude`` and
+  ``-w, --pci-whitelist`` to ``-i, --include``.
+  The old command line arguments will continue to be accepted in 20.11
+  but will cause a runtime error message.
Signature · 1 line
2.27.0
#153 lore raw

PATCH 5/6 rte_ethdev: change comment to rte_dev_eth_mac_addr_add

In reply to Stephen Hemminger

The comment used the term whitelist and was awkardly written. Replace it with simpler direct description of adding a new address. No code or API changes for this.

---
 lib/librte_ethdev/rte_ethdev.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
lib/librte_ethdev/rte_ethdev.h +1 -2
index 57e4a6ca58fd..cde6a9645360 100644
@@ -3387,8 +3387,7 @@ int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id,
 				struct rte_eth_pfc_conf *pfc_conf);
 
 /**
- * Add a MAC address to an internal array of addresses used to enable whitelist
- * filtering to accept packets only if the destination MAC address matches.
+ * Add a MAC address to an set of addresses used for accepting incoming packets.
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
Signature · 1 line
2.27.0
#154 lore raw

PATCH 6/6 check_maintainers: change variable names

In reply to Stephen Hemminger

Change variable names in python script: replace whitelist with include_files and blacklist with exclude_files.

---
 devtools/check-maintainers.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
devtools/check-maintainers.sh +4 -4
index 85a300f0a029..df3f740b6e84 100755
@@ -42,10 +42,10 @@ parse_fx () # <index file>
 	for line in $( (sed '/^-\+$/d' $1 ; echo) | sed 's,^$,§,') ; do
 		if echo "$line" | grep -q '^§$' ; then
 			# empty line delimit end of section
-			whitelist=$(files $flines)
-			blacklist=$(files $xlines)
-			match=$(aminusb "$whitelist" "$blacklist")
-			if [ -n "$whitelist" ] ; then
+			include_files=$(files $flines)
+			exclude_files=$(files $xlines)
+			match=$(aminusb "$include_files" "$exclude_files")
+			if [ -n "$include_files" ] ; then
 				printf "# $title "
 				maintainers=$(echo "$maintainers" | sed -r 's,.*<(.*)>.*,\1,')
 				maintainers=$(printf "$maintainers" | sed -e 's,^,<,' -e 's,$,>,')
Signature · 1 line
2.27.0
#155 lore raw

Re: [dpdk-dev] [PATCH 20.08 0/6] Inclusive language fixes and deprecation notices

In reply to Stephen Hemminger
Quoted 12 lines · On Mon, 27 Jul 2020 12:20:09 -0700 Stephen Hemminger…

This set annonuces the upcoming changes for 20.11 around master/slave and blacklist/whitelist. It also fixes several places in the current code where the wrong and confusing terminolgy was used.

Stephen Hemminger (6):
doc: announce deprecation of master lcore
kni: fix reference to master/slave process
doc: fix incorrect reference to master process
doc: announce deprecation blacklist/whitelist
rte_ethdev: change comment to rte_dev_eth_mac_addr_add
check_maintainers: change variable names

Quoted 7 lines
 devtools/check-maintainers.sh                 |  8 ++---
 .../thread_safety_dpdk_functions.rst          |  4 +--
 doc/guides/rel_notes/deprecation.rst          | 33 +++++++++++++++++++
 lib/librte_ethdev/rte_ethdev.h                |  3 +-
 lib/librte_kni/rte_kni.h                      |  2 +-
 5 files changed, 41 insertions(+), 9 deletions(-)

LOL all these patches trip the new checkpatch check for master or slave in a patch. Apparently checkpatch doesn't read.

#156 lore raw

v2 cover inclusive language fixes and deprecation notices

In reply to Stephen Hemminger

This set annonuces the upcoming changes for 20.11 around master/slave and blacklist/whitelist. It also fixes several places in the current code where the wrong and confusing terminolgy was used.

v2 - fix wording and checkpatch about whitespace

Stephen Hemminger (6):
doc: announce deprecation of master lcore
kni: fix reference to master/slave process
doc: fix incorrect reference to master process
doc: announce deprecation blacklist/whitelist
rte_ethdev: change comment to rte_dev_eth_mac_addr_add
check_maintainers: change variable names

Stephen Hemminger (6):
doc: announce deprecation of master lcore
kni: fix reference to master/slave process
doc: fix incorrect reference to master process
doc: announce deprecation blacklist/whitelist
rte_ethdev: change comment to rte_dev_eth_mac_addr_add
check_maintainers: change variable names

 devtools/check-maintainers.sh                 |  8 ++--
 .../thread_safety_dpdk_functions.rst          |  4 +-
 doc/guides/rel_notes/deprecation.rst          | 38 +++++++++++++++++++
 lib/librte_ethdev/rte_ethdev.h                |  3 +-
 lib/librte_kni/rte_kni.h                      |  2 +-
 5 files changed, 46 insertions(+), 9 deletions(-)
Signature · 1 line
2.27.0
#157 lore raw

PATCH v2 1/6 doc: announce deprecation of master lcore

Announce upcoming changes related to master/slave in reference to lcore.

---
 doc/guides/rel_notes/deprecation.rst | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
doc/guides/rel_notes/deprecation.rst +17 -0
index 99c98062ffc2..7c60779f3e68 100644
@@ -148,3 +148,20 @@ Deprecation Notices
   Python 2 support will be completely removed in 20.11.
   In 20.08, explicit deprecation warnings will be displayed when running
   scripts with Python 2.
+
+* eal: To be more inclusive in choice of naming, the DPDK project
+  will replace uses of master/slave in  the API's and command line arguments.
+
+  References to master/slave in relation to lcore will be renamed
+  to initial/worker.  The function ``rte_get_master_lcore()``
+  will be renamed to ``rte_get_initial_lcore()``.
+  For the 20.11, release both names will be present and the
+  old function will be marked with the deprecated tag.
+  The old function will be removed in 21.11 version.
+
+  The iterator for worker lcores will also change:
+  ``RTE_LCORE_FOREACH_SLAVE`` will be replaced with
+  ``RTE_LCORE_FOREACH_WORKER``.
+
+  The ``master-lcore`` argument to testpmd will be replaced
+  with ``initial-lcore``.
Signature · 1 line
2.27.0
Acked-by on v2 1/6
#158 lore raw

Re: [dpdk-dev] [PATCH v2 20.08 1/6] doc: announce deprecation of master lcore

Quoted 16 lines · Stephen Hemminger

Announce upcoming changes related to master/slave in reference to lcore.

---
 doc/guides/rel_notes/deprecation.rst | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
doc/guides/rel_notes/deprecation.rst +0 -0
index 99c98062ffc2..7c60779f3e68 100644
@@ -148,3 +148,20 @@ Deprecation Notices
   Python 2 support will be completely removed in 20.11.
   In 20.08, explicit deprecation warnings will be displayed when running
   scripts with Python 2.

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 160

Quoted 10 lines
doc/guides/rel_notes/deprecation.rst +10 -0
+
+* eal: To be more inclusive in choice of naming, the DPDK project
+  will replace uses of master/slave in  the API's and command line arguments.
+
+  References to master/slave in relation to lcore will be renamed
+  to initial/worker.  The function ``rte_get_master_lcore()``
+  will be renamed to ``rte_get_initial_lcore()``.
+  For the 20.11, release both names will be present and the
+  old function will be marked with the deprecated tag.
+  The old function will be removed in 21.11 version.

Since 20.11 is going to be ABI incompatible with previous versions anyway, can we not have the function as a macro alias for the new, allowing us to remove the old sooner without breaking any apps? Even if this is not the case, I think it might be better to change "21.11 version" to "a future release" to allow us some flexibility on when to remove them in case we can remove them sooner.

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 167

Quoted 8 lines
doc/guides/rel_notes/deprecation.rst +7 -0
+
+  The iterator for worker lcores will also change:
+  ``RTE_LCORE_FOREACH_SLAVE`` will be replaced with
+  ``RTE_LCORE_FOREACH_WORKER``.
+
+  The ``master-lcore`` argument to testpmd will be replaced
+  with ``initial-lcore``.

With the above comment.

#159 lore raw

Re: [dpdk-dev] [PATCH v2 20.08 1/6] doc: announce deprecation of master lcore

In reply to Stephen Hemminger

30/07/2020 02:57, Stephen Hemminger:

Quoted 13 lines

Announce upcoming changes related to master/slave in reference to lcore.

---
 doc/guides/rel_notes/deprecation.rst | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
doc/guides/rel_notes/deprecation.rst +0 -0
index 99c98062ffc2..7c60779f3e68 100644

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 153

Quoted 6 lines
doc/guides/rel_notes/deprecation.rst +3 -0
@@ -148,3 +148,20 @@ Deprecation Notices
   Python 2 support will be completely removed in 20.11.
   In 20.08, explicit deprecation warnings will be displayed when running
   scripts with Python 2.
+
+* eal: To be more inclusive in choice of naming, the DPDK project
+  will replace uses of master/slave in  the API's and command line arguments.

nit: double space

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 158

Quoted 5 lines
doc/guides/rel_notes/deprecation.rst +5 -0
+
+  References to master/slave in relation to lcore will be renamed
+  to initial/worker.  The function ``rte_get_master_lcore()``
+  will be renamed to ``rte_get_initial_lcore()``.
+  For the 20.11, release both names will be present and the

nit: comma misplaced

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 167

Quoted 9 lines
doc/guides/rel_notes/deprecation.rst +9 -0
+  old function will be marked with the deprecated tag.
+  The old function will be removed in 21.11 version.
+
+  The iterator for worker lcores will also change:
+  ``RTE_LCORE_FOREACH_SLAVE`` will be replaced with
+  ``RTE_LCORE_FOREACH_WORKER``.
+
+  The ``master-lcore`` argument to testpmd will be replaced
+  with ``initial-lcore``.

It doesn't say that the old argument will be kept for compatibility in 20.11.

#160 lore raw

Re: [dpdk-dev] [PATCH v2 20.08 1/6] doc: announce deprecation of master lcore

Quoted 30 lines · On Thu, 06 Aug 2020 18:49:28 +0200 Thomas Monjalon <[email protected]> wrote:

30/07/2020 02:57, Stephen Hemminger:

Quoted 13 lines

Announce upcoming changes related to master/slave in reference to lcore.

---
 doc/guides/rel_notes/deprecation.rst | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
doc/guides/rel_notes/deprecation.rst +0 -0
index 99c98062ffc2..7c60779f3e68 100644

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 153

Quoted 6 lines
doc/guides/rel_notes/deprecation.rst +3 -0
@@ -148,3 +148,20 @@ Deprecation Notices
   Python 2 support will be completely removed in 20.11.
   In 20.08, explicit deprecation warnings will be displayed when running
   scripts with Python 2.
+
+* eal: To be more inclusive in choice of naming, the DPDK project
+  will replace uses of master/slave in  the API's and command line arguments.  

nit: double space

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 158

Quoted 5 lines
doc/guides/rel_notes/deprecation.rst +5 -0
+
+  References to master/slave in relation to lcore will be renamed
+  to initial/worker.  The function ``rte_get_master_lcore()``
+  will be renamed to ``rte_get_initial_lcore()``.
+  For the 20.11, release both names will be present and the  

nit: comma misplaced

Quoted 11 lines

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 167

Quoted 9 lines
doc/guides/rel_notes/deprecation.rst +9 -0
+  old function will be marked with the deprecated tag.
+  The old function will be removed in 21.11 version.
+
+  The iterator for worker lcores will also change:
+  ``RTE_LCORE_FOREACH_SLAVE`` will be replaced with
+  ``RTE_LCORE_FOREACH_WORKER``.
+
+  The ``master-lcore`` argument to testpmd will be replaced
+  with ``initial-lcore``.  

It doesn't say that the old argument will be kept for compatibility in 20.11.

Testpmd is not part of API/ABI compatibility area so it is not a hard requirement.

#161 lore raw

Re: [dpdk-dev] [PATCH v2 20.08 1/6] doc: announce deprecation of master lcore

06/08/2020 19:00, Stephen Hemminger:

Quoted 45 lines
Quoted 30 lines · On Thu, 06 Aug 2020 18:49:28 +0200 Thomas Monjalon <[email protected]> wrote:

30/07/2020 02:57, Stephen Hemminger:

Quoted 13 lines

Announce upcoming changes related to master/slave in reference to lcore.

---
 doc/guides/rel_notes/deprecation.rst | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
doc/guides/rel_notes/deprecation.rst +0 -0
index 99c98062ffc2..7c60779f3e68 100644

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 153

Quoted 6 lines
doc/guides/rel_notes/deprecation.rst +3 -0
@@ -148,3 +148,20 @@ Deprecation Notices
   Python 2 support will be completely removed in 20.11.
   In 20.08, explicit deprecation warnings will be displayed when running
   scripts with Python 2.
+
+* eal: To be more inclusive in choice of naming, the DPDK project
+  will replace uses of master/slave in  the API's and command line arguments.  

nit: double space

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 158

Quoted 5 lines
doc/guides/rel_notes/deprecation.rst +5 -0
+
+  References to master/slave in relation to lcore will be renamed
+  to initial/worker.  The function ``rte_get_master_lcore()``
+  will be renamed to ``rte_get_initial_lcore()``.
+  For the 20.11, release both names will be present and the  

nit: comma misplaced

Quoted 11 lines

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 167

Quoted 9 lines
doc/guides/rel_notes/deprecation.rst +9 -0
+  old function will be marked with the deprecated tag.
+  The old function will be removed in 21.11 version.
+
+  The iterator for worker lcores will also change:
+  ``RTE_LCORE_FOREACH_SLAVE`` will be replaced with
+  ``RTE_LCORE_FOREACH_WORKER``.
+
+  The ``master-lcore`` argument to testpmd will be replaced
+  with ``initial-lcore``.  

It doesn't say that the old argument will be kept for compatibility in 20.11.

Quoted 2 lines

Testpmd is not part of API/ABI compatibility area so it is not a hard requirement.

Not really hard, but I would say it is annoying enough to consider maintaining compatibility in testpmd for some time.

#162 lore raw

PATCH v2 2/6 kni: fix reference to master/slave process

In reply to Stephen Hemminger

In DPDK, the correct terms for process are primary/secondary. This is bugfix, not a change in terms for new release.

Fixes f2e7592c474c ("kni: fix multi-process support")
---
 lib/librte_kni/rte_kni.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_kni/rte_kni.h +1 -1
index f1bb782c68ea..855facd1a319 100644
@@ -212,7 +212,7 @@ const char *rte_kni_get_name(const struct rte_kni *kni);
 
 /**
  * Register KNI request handling for a specified port,and it can
- * be called by master process or slave process.
+ * be called by primary process or secondary process.
  *
  * @param kni
  *  pointer to struct rte_kni.
Signature · 1 line
2.27.0
#164 lore raw

PATCH v2 3/6 doc: fix incorrect reference to master process

In reply to Stephen Hemminger

Correct terminolgy here is primary process.
This is a bug in original doc.

Fixes fc1f2750a3ec ("doc: programmers guide")
---
 doc/guides/prog_guide/thread_safety_dpdk_functions.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
doc/guides/prog_guide/thread_safety_dpdk_functions.rst +2 -2
index 0f539db2b869..5618e25e47fb 100644
@@ -61,8 +61,8 @@ rather than subsequently in the forwarding threads.
 However, the DPDK performs checks to ensure that libraries are only initialized once.
 If initialization is attempted more than once, an error is returned.
 
-In the multi-process case, the configuration information of shared memory will only be initialized by the master process.
-Thereafter, both master and secondary processes can allocate/release any objects of memory that finally rely on rte_malloc or memzones.
+In the multi-process case, the configuration information of shared memory will only be initialized by the primary process.
+Thereafter, both primary and secondary processes can allocate/release any objects of memory that finally rely on rte_malloc or memzones.
 
 Interrupt Thread
 ----------------
Signature · 1 line
2.27.0
#165 lore raw

PATCH v2 4/6 doc: announce deprecation blacklist/whitelist

In reply to Stephen Hemminger

Announce upcoming changes for 20.11.

---
 doc/guides/rel_notes/deprecation.rst | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
doc/guides/rel_notes/deprecation.rst +21 -0
index 7c60779f3e68..abfec0aeaa4b 100644
@@ -165,3 +165,24 @@ Deprecation Notices
 
   The ``master-lcore`` argument to testpmd will be replaced
   with ``initial-lcore``.
+
+* eal: The terms blacklist and whitelist to describe devices used
+  by DPDK will be replaced in the 20.11 relase.
+  This will apply to command line arguments as well as macros.
+
+  The macro ``RTE_DEV_BLACKLISTED`` will be replaced with ``RTE_DEV_EXCLUDED``
+  and ``RTE_DEV_WHITELISTED`` will be replaced with ``RTE_DEV_INCLUDED``
+  ``RTE_BUS_SCAN_BLACKLIST`` and ``RTE_BUS_SCAN_WHITELIST`` will be
+  replaced with ``RTE_BUS_SCAN_EXCLUDED`` and ``RTE_BUS_SCAN_INCLUDED``
+  respectively. Likewise ``RTE_DEVTYPE_BLACKLISTED_PCI`` and
+  ``RTE_DEVTYPE_WHITELISTED_PCI`` will be replaced with
+  ``RTE_DEVTYPE_EXCLUDED`` and ``RTE_DEVTYPE_INCLUDED``.
+
+  The old macros will be marked as deprecated in 20.11 and removed
+  in the 21.11 release.
+
+  The command line arguments to ``rte_eal_init`` will change from
+  ``-b, --pci-blacklist`` to ``-x, --exclude`` and
+  ``-w, --pci-whitelist`` to ``-i, --include``.
+  The old command line arguments will continue to be accepted in 20.11
+  but will cause a runtime error message.
Signature · 1 line
2.27.0
Acked-by on v2 4/6
#166 lore raw

Re: [dpdk-dev] [PATCH v2 20.08 4/6] doc: announce deprecation blacklist/whitelist

Quoted 21 lines · Stephen Hemminger

Announce upcoming changes for 20.11.

---
 doc/guides/rel_notes/deprecation.rst | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
doc/guides/rel_notes/deprecation.rst +6 -0
index 7c60779f3e68..abfec0aeaa4b 100644
@@ -165,3 +165,24 @@ Deprecation Notices
 
   The ``master-lcore`` argument to testpmd will be replaced
   with ``initial-lcore``.
+
+* eal: The terms blacklist and whitelist to describe devices used
+  by DPDK will be replaced in the 20.11 relase.
+  This will apply to command line arguments as well as macros.
+
+  The macro ``RTE_DEV_BLACKLISTED`` will be replaced with ``RTE_DEV_EXCLUDED``

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 183

Quoted 10 lines
doc/guides/rel_notes/deprecation.rst +10 -0
+  and ``RTE_DEV_WHITELISTED`` will be replaced with ``RTE_DEV_INCLUDED``
+  ``RTE_BUS_SCAN_BLACKLIST`` and ``RTE_BUS_SCAN_WHITELIST`` will be
+  replaced with ``RTE_BUS_SCAN_EXCLUDED`` and ``RTE_BUS_SCAN_INCLUDED``
+  respectively. Likewise ``RTE_DEVTYPE_BLACKLISTED_PCI`` and
+  ``RTE_DEVTYPE_WHITELISTED_PCI`` will be replaced with
+  ``RTE_DEVTYPE_EXCLUDED`` and ``RTE_DEVTYPE_INCLUDED``.
+
+  The old macros will be marked as deprecated in 20.11 and removed
+  in the 21.11 release.
+

Since these are macros and therefore not part of the ABI I think we can remove them sooner than 21.11. Therefore similar to the previous patch can we just use "future" relase rather than 21.11

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 188

Quoted 6 lines
doc/guides/rel_notes/deprecation.rst +5 -0
+  The command line arguments to ``rte_eal_init`` will change from
+  ``-b, --pci-blacklist`` to ``-x, --exclude`` and
+  ``-w, --pci-whitelist`` to ``-i, --include``.
+  The old command line arguments will continue to be accepted in 20.11
+  but will cause a runtime error message.

Error message, or warning message?

Overall, though

#167 lore raw

Re: [dpdk-dev] [PATCH v2 20.08 4/6] doc: announce deprecation blacklist/whitelist

Quoted 28 lines · On Thu, 30 Jul 2020 09:45:19 +0100 Bruce Richardson…
Quoted 27 lines · Stephen Hemminger

Announce upcoming changes for 20.11.

---
 doc/guides/rel_notes/deprecation.rst | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
doc/guides/rel_notes/deprecation.rst +12 -0
index 7c60779f3e68..abfec0aeaa4b 100644
@@ -165,3 +165,24 @@ Deprecation Notices
 
   The ``master-lcore`` argument to testpmd will be replaced
   with ``initial-lcore``.
+
+* eal: The terms blacklist and whitelist to describe devices used
+  by DPDK will be replaced in the 20.11 relase.
+  This will apply to command line arguments as well as macros.
+
+  The macro ``RTE_DEV_BLACKLISTED`` will be replaced with ``RTE_DEV_EXCLUDED``
+  and ``RTE_DEV_WHITELISTED`` will be replaced with ``RTE_DEV_INCLUDED``
+  ``RTE_BUS_SCAN_BLACKLIST`` and ``RTE_BUS_SCAN_WHITELIST`` will be
+  replaced with ``RTE_BUS_SCAN_EXCLUDED`` and ``RTE_BUS_SCAN_INCLUDED``
+  respectively. Likewise ``RTE_DEVTYPE_BLACKLISTED_PCI`` and
+  ``RTE_DEVTYPE_WHITELISTED_PCI`` will be replaced with
+  ``RTE_DEVTYPE_EXCLUDED`` and ``RTE_DEVTYPE_INCLUDED``.
Quoted 8 lines

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 183

Quoted 4 lines
doc/guides/rel_notes/deprecation.rst +4 -0
+
+  The old macros will be marked as deprecated in 20.11 and removed
+  in the 21.11 release.
+  

Since these are macros and therefore not part of the ABI I think we can remove them sooner than 21.11. Therefore similar to the previous patch can we just use "future" relase rather than 21.11

If these are internal, we don't need to wrap them in 21.11.

Quoted 8 lines

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 188

Quoted 6 lines
doc/guides/rel_notes/deprecation.rst +5 -0
+  The command line arguments to ``rte_eal_init`` will change from
+  ``-b, --pci-blacklist`` to ``-x, --exclude`` and
+  ``-w, --pci-whitelist`` to ``-i, --include``.
+  The old command line arguments will continue to be accepted in 20.11
+  but will cause a runtime error message.

Error message, or warning message?

Some message to standard error and keep going.

Quoted 4 lines

Overall, though

#168 lore raw

PATCH v2 5/6 rte_ethdev: change comment to rte_dev_eth_mac_addr_add

In reply to Stephen Hemminger

The comment used the term whitelist and was awkardly written. Replace it with simpler direct description of adding a new address. No code or API changes for this.

---
 lib/librte_ethdev/rte_ethdev.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
lib/librte_ethdev/rte_ethdev.h +1 -2
index 57e4a6ca58fd..cde6a9645360 100644
@@ -3387,8 +3387,7 @@ int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id,
 				struct rte_eth_pfc_conf *pfc_conf);
 
 /**
- * Add a MAC address to an internal array of addresses used to enable whitelist
- * filtering to accept packets only if the destination MAC address matches.
+ * Add a MAC address to an set of addresses used for accepting incoming packets.
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
Signature · 1 line
2.27.0
#169 lore raw

Re: [dpdk-dev] [PATCH v2 20.08 5/6] rte_ethdev: change comment to rte_dev_eth_mac_addr_add

30/07/2020 02:58, Stephen Hemminger:

Quoted 15 lines

The comment used the term whitelist and was awkardly written. Replace it with simpler direct description of adding a new address. No code or API changes for this.

---
 lib/librte_ethdev/rte_ethdev.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
lib/librte_ethdev/rte_ethdev.h +0 -0
index 57e4a6ca58fd..cde6a9645360 100644

lib/librte_ethdev/rte_ethdev.h int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id, · line 3390

Quoted 6 lines
lib/librte_ethdev/rte_ethdev.h +1 -2
@@ -3387,8 +3387,7 @@ int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id,
 				struct rte_eth_pfc_conf *pfc_conf);
 
 /**
- * Add a MAC address to an internal array of addresses used to enable whitelist
- * filtering to accept packets only if the destination MAC address matches.
+ * Add a MAC address to an set of addresses used for accepting incoming packets.

I propose this wording:

Add a MAC address to a set used for filtering incoming packets.

#170 lore raw

PATCH v2 6/6 check_maintainers: change variable names

In reply to Stephen Hemminger

Change variable names in python script: replace whitelist with include_files and blacklist with exclude_files.

---
 devtools/check-maintainers.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
devtools/check-maintainers.sh +4 -4
index 85a300f0a029..df3f740b6e84 100755
@@ -42,10 +42,10 @@ parse_fx () # <index file>
 	for line in $( (sed '/^-\+$/d' $1 ; echo) | sed 's,^$,§,') ; do
 		if echo "$line" | grep -q '^§$' ; then
 			# empty line delimit end of section
-			whitelist=$(files $flines)
-			blacklist=$(files $xlines)
-			match=$(aminusb "$whitelist" "$blacklist")
-			if [ -n "$whitelist" ] ; then
+			include_files=$(files $flines)
+			exclude_files=$(files $xlines)
+			match=$(aminusb "$include_files" "$exclude_files")
+			if [ -n "$include_files" ] ; then
 				printf "# $title "
 				maintainers=$(echo "$maintainers" | sed -r 's,.*<(.*)>.*,\1,')
 				maintainers=$(printf "$maintainers" | sed -e 's,^,<,' -e 's,$,>,')
Signature · 1 line
2.27.0
Acked-by on v2 6/6
#171 lore raw

Re: [dpdk-dev] [PATCH v2 20.08 6/6] check_maintainers: change variable names

30/07/2020 02:58, Stephen Hemminger:

Quoted 1 line

Change variable names in python script: replace whitelist

It is not a python script.

devtools/check-maintainers.sh parse_fx () # <index file> · line 48

Quoted 13 lines

with include_files and blacklist with exclude_files.

---

devtools/check-maintainers.sh +4 -4
-			whitelist=$(files $flines)
-			blacklist=$(files $xlines)
-			match=$(aminusb "$whitelist" "$blacklist")
-			if [ -n "$whitelist" ] ; then
+			include_files=$(files $flines)
+			exclude_files=$(files $xlines)
+			match=$(aminusb "$include_files" "$exclude_files")
+			if [ -n "$include_files" ] ; then

With above nit fixed,

#172 lore raw

Re: [dpdk-dev] [PATCH v2 20.08 0/6] inclusive language fixes and deprecation notices

In reply to Stephen Hemminger

30/07/2020 02:57, Stephen Hemminger:

Quoted 5 lines

This set annonuces the upcoming changes for 20.11 around master/slave and blacklist/whitelist. It also fixes several places in the current code where the wrong and confusing terminolgy was used.

v2 - fix wording and checkpatch about whitespace

We need a v3 (urgently).

Please Cc more people to get 3 acks on deprecations.
As a base for Cc, you should use --cc-cmd devtools/get-maintainer.sh

#173 lore raw

Re: [dpdk-dev] [PATCH v2 20.08 0/6] inclusive language fixes and deprecation notices

I just acked it.

Quoted 21 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Thursday, August 6, 2020 5:57 PM
To: Stephen Hemminger <[email protected]>
Cc: [email protected]; Richardson, Bruce <[email protected]>; [email protected]; Mcnamara, John <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v2 20.08 0/6] inclusive language fixes and deprecation notices

30/07/2020 02:57, Stephen Hemminger:

Quoted 5 lines

This set annonuces the upcoming changes for 20.11 around master/slave and blacklist/whitelist. It also fixes several places in the current code where the wrong and confusing terminolgy was used.

v2 - fix wording and checkpatch about whitespace

We need a v3 (urgently).

Please Cc more people to get 3 acks on deprecations.
As a base for Cc, you should use --cc-cmd devtools/get-maintainer.sh

#174 lore raw

v3 cover inclusive language fixes and deprecation notices

In reply to Stephen Hemminger

This set annonuces the upcoming changes for 20.11 around master/slave and blacklist/whitelist. It also fixes several places in the current code where the wrong and confusing terminolgy was used.

v3 - review feedback and acks
v2 - fix wording and checkpatch about whitespace

Stephen Hemminger (6):
doc: announce deprecation of master lcore
kni: fix reference to master/slave process
doc: fix incorrect reference to master process
doc: announce deprecation blacklist/whitelist
rte_ethdev: change comment to rte_dev_eth_mac_addr_add
check_maintainers: change variable names

 devtools/check-maintainers.sh                 |  8 ++--
 .../thread_safety_dpdk_functions.rst          |  4 +-
 doc/guides/rel_notes/deprecation.rst          | 43 +++++++++++++++++++
 lib/librte_ethdev/rte_ethdev.h                |  3 +-
 lib/librte_kni/rte_kni.h                      |  2 +-
 5 files changed, 51 insertions(+), 9 deletions(-)
Signature · 1 line
2.27.0
#175 lore raw

PATCH v3 1/6 doc: announce deprecation of master lcore

Announce upcoming changes related to master/slave in reference to lcore.

---
 doc/guides/rel_notes/deprecation.rst | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
doc/guides/rel_notes/deprecation.rst +20 -0
index 299e30d92184..47badff6119a 100644
@@ -252,3 +252,23 @@ Deprecation Notices
   ``make``. Given environments are too much variables for such a simple script,
   it will be removed in DPDK 20.11.
   Some useful parts may be converted into specific scripts.
+
+* eal: To be more inclusive in choice of naming, the DPDK project
+  will replace uses of master/slave in the API's and command line arguments.
+
+  References to master/slave in relation to lcore will be renamed
+  to initial/worker.  The function ``rte_get_master_lcore()``
+  will be renamed to ``rte_get_initial_lcore()``.
+  For the 20.11 release, both names will be present and the
+  old function will be marked with the deprecated tag.
+  The old function will be removed in a future version.
+
+  The iterator for worker lcores will also change:
+  ``RTE_LCORE_FOREACH_SLAVE`` will be replaced with
+  ``RTE_LCORE_FOREACH_WORKER``.
+
+  The ``master-lcore`` argument to testpmd will be replaced
+  with ``initial-lcore``. The old ``master-lcore`` argument
+  will produce a runtime notification in 20.11 release, and
+  be remove completely in a future release.
+
Signature · 1 line
2.27.0
#177 lore raw

PATCH v3 2/6 kni: fix reference to master/slave process

In reply to Stephen Hemminger

In DPDK, the correct terms for process are primary/secondary. This is bugfix, not a change in terms for new release.

Fixes f2e7592c474c ("kni: fix multi-process support")
---
 lib/librte_kni/rte_kni.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_kni/rte_kni.h +1 -1
index f1bb782c68ea..855facd1a319 100644
@@ -212,7 +212,7 @@ const char *rte_kni_get_name(const struct rte_kni *kni);
 
 /**
  * Register KNI request handling for a specified port,and it can
- * be called by master process or slave process.
+ * be called by primary process or secondary process.
  *
  * @param kni
  *  pointer to struct rte_kni.
Signature · 1 line
2.27.0
#178 lore raw

PATCH v3 3/6 doc: fix incorrect reference to master process

In reply to Stephen Hemminger

Correct terminolgy here is primary process.
This is a bug in original doc.

Fixes fc1f2750a3ec ("doc: programmers guide")
---
 doc/guides/prog_guide/thread_safety_dpdk_functions.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
doc/guides/prog_guide/thread_safety_dpdk_functions.rst +2 -2
index 0f539db2b869..5618e25e47fb 100644
@@ -61,8 +61,8 @@ rather than subsequently in the forwarding threads.
 However, the DPDK performs checks to ensure that libraries are only initialized once.
 If initialization is attempted more than once, an error is returned.
 
-In the multi-process case, the configuration information of shared memory will only be initialized by the master process.
-Thereafter, both master and secondary processes can allocate/release any objects of memory that finally rely on rte_malloc or memzones.
+In the multi-process case, the configuration information of shared memory will only be initialized by the primary process.
+Thereafter, both primary and secondary processes can allocate/release any objects of memory that finally rely on rte_malloc or memzones.
 
 Interrupt Thread
 ----------------
Signature · 1 line
2.27.0
#179 lore raw

PATCH v3 4/6 doc: announce deprecation blacklist/whitelist

In reply to Stephen Hemminger

Announce upcoming changes for 20.11.

---
 doc/guides/rel_notes/deprecation.rst | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
doc/guides/rel_notes/deprecation.rst +23 -0
index 47badff6119a..dad939a7f87e 100644
@@ -272,3 +272,26 @@ Deprecation Notices
   will produce a runtime notification in 20.11 release, and
   be remove completely in a future release.
 
+* eal: The terms blacklist and whitelist to describe devices used
+  by DPDK will be replaced in the 20.11 relase.
+  This will apply to command line arguments as well as macros.
+
+  The macro ``RTE_DEV_BLACKLISTED`` will be replaced with ``RTE_DEV_EXCLUDED``
+  and ``RTE_DEV_WHITELISTED`` will be replaced with ``RTE_DEV_INCLUDED``
+  ``RTE_BUS_SCAN_BLACKLIST`` and ``RTE_BUS_SCAN_WHITELIST`` will be
+  replaced with ``RTE_BUS_SCAN_EXCLUDED`` and ``RTE_BUS_SCAN_INCLUDED``
+  respectively. Likewise ``RTE_DEVTYPE_BLACKLISTED_PCI`` and
+  ``RTE_DEVTYPE_WHITELISTED_PCI`` will be replaced with
+  ``RTE_DEVTYPE_EXCLUDED`` and ``RTE_DEVTYPE_INCLUDED``.
+
+  The old macros will be marked as deprecated in 20.11 and any
+  usage will cause a compile warning. They will be removed in
+  a future release.
+
+  The command line arguments to ``rte_eal_init`` will change from
+  ``-b, --pci-blacklist`` to ``-x, --exclude`` and
+  ``-w, --pci-whitelist`` to ``-i, --include``.
+  The old command line arguments will continue to be accepted in 20.11
+  but will cause a runtime warning message. The old arguments will
+  be removed in a future release.
+
Signature · 1 line
2.27.0
Acked-by
#181 lore raw

Re: [dpdk-dev] [PATCH v3 20.08 4/6] doc: announce deprecation blacklist/whitelist

Quoted 9 lines · Thomas Monjalon

06/08/2020 19:19, Stephen Hemminger:

Quoted 4 lines

Announce upcoming changes for 20.11.

Good thing to update short options as well, -i and -x seems a good choice.

Signature · 1 line
Gaëtan
#182 lore raw

PATCH v3 5/6 rte_ethdev: change comment to rte_dev_eth_mac_addr_add

In reply to Stephen Hemminger

The comment used the term whitelist and was awkardly written. Replace it with simpler direct description of adding a new address. No code or API changes for this.

---
 lib/librte_ethdev/rte_ethdev.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
lib/librte_ethdev/rte_ethdev.h +1 -2
index d29930fd847e..70295d7ab7a2 100644
@@ -3379,8 +3379,7 @@ int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id,
 				struct rte_eth_pfc_conf *pfc_conf);
 
 /**
- * Add a MAC address to an internal array of addresses used to enable whitelist
- * filtering to accept packets only if the destination MAC address matches.
+ * Add a MAC address to the set used for filtering incoming packets.
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
Signature · 1 line
2.27.0
#183 lore raw

PATCH v3 6/6 check_maintainers: change variable names

In reply to Stephen Hemminger

Change variable names in the shell script.
Replace whitelist with include_files and blacklist with exclude_files.

---
 devtools/check-maintainers.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
devtools/check-maintainers.sh +4 -4
index 85a300f0a029..df3f740b6e84 100755
@@ -42,10 +42,10 @@ parse_fx () # <index file>
 	for line in $( (sed '/^-\+$/d' $1 ; echo) | sed 's,^$,§,') ; do
 		if echo "$line" | grep -q '^§$' ; then
 			# empty line delimit end of section
-			whitelist=$(files $flines)
-			blacklist=$(files $xlines)
-			match=$(aminusb "$whitelist" "$blacklist")
-			if [ -n "$whitelist" ] ; then
+			include_files=$(files $flines)
+			exclude_files=$(files $xlines)
+			match=$(aminusb "$include_files" "$exclude_files")
+			if [ -n "$include_files" ] ; then
 				printf "# $title "
 				maintainers=$(echo "$maintainers" | sed -r 's,.*<(.*)>.*,\1,')
 				maintainers=$(printf "$maintainers" | sed -e 's,^,<,' -e 's,$,>,')
Signature · 1 line
2.27.0
Acked-by on the v3 series
#184 lore raw

Re: [dpdk-dev] [PATCH v3 20.08 0/6] inclusive language fixes and deprecation notices

In reply to Stephen Hemminger
Quoted 8 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Stephen Hemminger
Sent: Thursday, August 6, 2020 6:20 PM
To: [email protected]
Cc: Stephen Hemminger <[email protected]>
Subject: [dpdk-dev] [PATCH v3 20.08 0/6] inclusive language fixes and deprecation notices

Quoted 4 lines

This set annonuces the upcoming changes for 20.11 around master/slave and blacklist/whitelist. It also fixes several places in the current code where the wrong and confusing terminolgy was used.

#185 lore raw

Re: [dpdk-dev] [PATCH v3 20.08 0/6] inclusive language fixes and deprecation notices

Quoted 6 lines
Quoted 4 lines

From: Stephen Hemminger
This set annonuces the upcoming changes for 20.11 around master/slave and blacklist/whitelist. It also fixes several places in the current code where the wrong and confusing terminolgy was used.

Applied