Spdk/lib
Shuhei Matsumoto 855d8e032a iscsi: change master_lcore to first_core for idle connection management
Currently idle iSCSI connections are managed by the master lcore,
but the master lcore is like BSP of OS and for initialization.

To manage idle iSCSI connections it is important that the core is
consistent.

Hence the first core is better than the master lcore.

In this patch the following are changed together:
- Errors of kqueue() and epoll_create1() are not related with master
  lcore. "master lcore" is removed and errno is added into the log.
- In spdk_iscsi_conn_allocate_reactor(), when cpumask is 0, 0 is
  selected as core number. 0 is not safe and first_core is used instead.

In spdk_iscsi_conn_allocate_reactor(), when first_core is used instead
of master_lcore, we may observe some contradiction in the following
code. But few changes are done in this patch.

In the current implementation we can assume the first lcore is
equal to the master lcore and the following code will be removed
in the subsequent patch.

/*
 * DPDK returns WAIT for the master lcore instead of RUNNING.
 * So we always treat the reactor on master core as RUNNING.
 */
if (i == master_lcore) {
    state = RUNNING;
} else {
    state = rte_eal_get_lcore_state(i);
}

Change-Id: I6cac06c27b289db5ea1f9452e33489286c64d2fa
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/391338
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-20 15:17:15 -05:00
..
bdev virtio: remove pollers from virtqueues 2017-12-19 13:35:52 -05:00
blob blob: allow _spdk_bs_recover to operate as a sequence completion 2017-12-19 12:41:26 -05:00
blobfs blob: change spdk_bs_iter_next parameter to spdk_blob * 2017-12-15 12:28:44 -05:00
conf conf: Remove use of perror() for strdup() failure 2017-12-15 16:13:27 -05:00
copy astyle: enforce braces around single-line statements 2017-12-11 11:19:32 -05:00
cunit include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
env_dpdk env: add spdk_mempool_create_ctor 2017-12-11 14:59:12 -05:00
event event: update the poller's period_ticks calculation 2017-12-19 18:49:16 -05:00
ioat astyle: enforce braces around single-line statements 2017-12-11 11:19:32 -05:00
iscsi iscsi: change master_lcore to first_core for idle connection management 2017-12-20 15:17:15 -05:00
json astyle: enforce braces around single-line statements 2017-12-11 11:19:32 -05:00
jsonrpc log: rename SPDK_TRACE_* to SPDK_LOG_* 2017-12-07 12:23:19 -05:00
log log: rename SPDK_TRACE_* to SPDK_LOG_* 2017-12-07 12:23:19 -05:00
lvol blob: change spdk_bs_iter_next parameter to spdk_blob * 2017-12-15 12:28:44 -05:00
nbd nbd: stop nbd if backing bdev is removed 2017-12-18 12:51:24 -05:00
net astyle: enforce braces around single-line statements 2017-12-11 11:19:32 -05:00
nvme nvme: add checks for sq_head 2017-12-19 16:45:05 -05:00
nvmf nvmf/rdma: decrement r/w counter if ibv_post_send fails 2017-12-15 16:42:51 -05:00
rocksdb astyle: enforce braces around single-line statements 2017-12-11 11:19:32 -05:00
rpc rpc: set g_jsonrpc_server to NULL on close 2017-11-28 16:20:47 -05:00
scsi scsi: remove spdk_scsi_dev_print() function 2017-12-12 18:04:20 -05:00
trace trace: replace DPDK call with SPDK env.h wrapper 2017-12-12 15:37:05 -05:00
ut_mock test/mock: add pthread_self 2017-09-19 17:15:15 -04:00
util util/crc16: add crc16 library support and unit tests 2017-12-20 15:12:26 -05:00
vhost vhost_blk: close the bdev in the hotplug callback 2017-12-19 14:54:51 -05:00
Makefile lvol: Logical volume implementation 2017-09-14 19:30:54 -04:00