855d8e032a
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>