Commit fe137c89 authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

env: replace master_core with main_core



This helps us remove master/slave terminology from
SPDK and is aligned with similar changes made recently
in DPDK.

While updating nvme/identify to use the new member
name, also replace g_master_core there with g_main_core.
Other nvme utility usage of "master_core" will be updated
in a later patch.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I0ec4e3e9b644bec21b3729809bf5c4d35b10837f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5351


Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 131e6171
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -15,8 +15,9 @@ The --pci-whitelist/-W command line options have been deprecated, replaced with

### env

The pci_whitelist and pci_blacklist members of struct spdk_env_opts have been
deprecated.  The new members are named pci_allowed and pci_blocked respectively.
The pci_whitelist, pci_blacklist and master_core members of struct spdk_env_opts
have been deprecated.  The new members are named pci_allowed, pci_blocked and
main_core respectively.

### nvmf

+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ Param | Long Param | Type | Default | Descript
-i       | --shm-id               | integer  |                        | @ref cmd_arg_multi_process
-m       | --cpumask              | CPU mask | 0x1                    | application @ref cpu_mask
-n       | --mem-channels         | integer  | all channels           | number of memory channels used for DPDK
-p       | --master-core          | integer  | first core in CPU mask | master (primary) core for DPDK
-p       | --main-core            | integer  | first core in CPU mask | main (primary) core for DPDK
-r       | --rpc-socket           | string   | /var/tmp/spdk.sock     | RPC listen address
-s       | --mem-size             | integer  | all hugepage memory    | @ref cmd_arg_memory_size
|        | --silence-noticelog    | flag     |                        | disable notice level logging to `stderr`
+1 −1
Original line number Diff line number Diff line
@@ -222,7 +222,7 @@ host:~# HUGEMEM=2048 ./scripts/setup.sh
~~~{.sh}
host:~# ./build/bin/vhost -S /var/tmp -s 1024 -m 0x3 &
Starting DPDK 17.11.0 initialization...
[ DPDK EAL parameters: vhost -c 3 -m 1024 --master-lcore=1 --file-prefix=spdk_pid156014 ]
[ DPDK EAL parameters: vhost -c 3 -m 1024 --main-lcore=1 --file-prefix=spdk_pid156014 ]
EAL: Detected 48 lcore(s)
EAL: Probing VFIO support...
EAL: VFIO support initialized
+6 −6
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ static int g_dpdk_mem = 0;

static bool g_dpdk_mem_single_seg = false;

static int g_master_core = 0;
static int g_main_core = 0;

static char g_core_mask[16] = "0x1";

@@ -1953,12 +1953,12 @@ parse_args(int argc, char **argv)
			}
			break;
		case 'p':
			g_master_core = spdk_strtol(optarg, 10);
			if (g_master_core < 0) {
			g_main_core = spdk_strtol(optarg, 10);
			if (g_main_core < 0) {
				fprintf(stderr, "Invalid core number\n");
				return g_master_core;
				return g_main_core;
			}
			snprintf(g_core_mask, sizeof(g_core_mask), "0x%llx", 1ULL << g_master_core);
			snprintf(g_core_mask, sizeof(g_core_mask), "0x%llx", 1ULL << g_main_core);
			break;
		case 'r':
			if (spdk_nvme_transport_id_parse(&g_trid, optarg) != 0) {
@@ -2027,7 +2027,7 @@ int main(int argc, char **argv)
	opts.shm_id = g_shm_id;
	opts.mem_size = g_dpdk_mem;
	opts.mem_channel = 1;
	opts.master_core = g_master_core;
	opts.main_core = g_main_core;
	opts.core_mask = g_core_mask;
	opts.hugepage_single_segments = g_dpdk_mem_single_seg;
	if (g_trid.trtype != SPDK_NVME_TRANSPORT_PCIE) {
+4 −1
Original line number Diff line number Diff line
@@ -76,7 +76,10 @@ struct spdk_env_opts {
	const char		*core_mask;
	int			shm_id;
	int			mem_channel;
	int			master_core;
	union {
		int			main_core;
		int			master_core __attribute__((deprecated));
	};
	int			mem_size;
	bool			no_pci;
	bool			hugepage_single_segments;
Loading