From 2e3182551259dc0ed2e140ee5201dca3c111c882 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Wed, 23 Sep 2020 21:01:28 +0000 Subject: [PATCH] event: move log_rpc contents to event library The log_rpc library serves little (if any) use in isolation. It makes more sense to just include this code in the event library. The event library already depends on and uses the log library, and it is natural to just enable these RPCs directly in that library instead. Signed-off-by: Jim Harris Change-Id: Ie39b8598ce0c06729a13d188ce00da44a996accc Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4362 Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Changpeng Liu Reviewed-by: Ben Walker --- app/iscsi_tgt/Makefile | 2 +- app/nvmf_tgt/Makefile | 2 +- app/spdk_tgt/Makefile | 2 +- app/vhost/Makefile | 2 +- lib/Makefile | 2 +- lib/event/Makefile | 2 +- lib/{log_rpc => event}/log_rpc.c | 0 lib/log_rpc/Makefile | 45 -------------------------------- lib/log_rpc/spdk_log_rpc.map | 3 --- mk/spdk.lib_deps.mk | 1 - test/app/bdev_svc/Makefile | 2 +- test/bdev/bdevperf/Makefile | 2 +- test/event/app_repeat/Makefile | 2 +- 13 files changed, 9 insertions(+), 58 deletions(-) rename lib/{log_rpc => event}/log_rpc.c (100%) delete mode 100644 lib/log_rpc/Makefile delete mode 100644 lib/log_rpc/spdk_log_rpc.map diff --git a/app/iscsi_tgt/Makefile b/app/iscsi_tgt/Makefile index 6b695d91a..f3c13ea4b 100644 --- a/app/iscsi_tgt/Makefile +++ b/app/iscsi_tgt/Makefile @@ -46,7 +46,7 @@ C_SRCS := iscsi_tgt.c SPDK_LIB_LIST = $(ALL_MODULES_LIST) SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) event_iscsi event_net event_scsi event SPDK_LIB_LIST += jsonrpc json rpc bdev_rpc bdev iscsi scsi accel trace conf -SPDK_LIB_LIST += thread util log log_rpc app_rpc net sock notify +SPDK_LIB_LIST += thread util log app_rpc net sock notify ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV)) SPDK_LIB_LIST += env_dpdk_rpc diff --git a/app/nvmf_tgt/Makefile b/app/nvmf_tgt/Makefile index 0a7796d41..54e8356ef 100644 --- a/app/nvmf_tgt/Makefile +++ b/app/nvmf_tgt/Makefile @@ -42,7 +42,7 @@ C_SRCS := nvmf_main.c SPDK_LIB_LIST = $(ALL_MODULES_LIST) SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) event_nvmf event_net SPDK_LIB_LIST += nvmf event log trace conf thread util bdev accel rpc jsonrpc json net sock -SPDK_LIB_LIST += app_rpc log_rpc bdev_rpc notify +SPDK_LIB_LIST += app_rpc bdev_rpc notify ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV)) SPDK_LIB_LIST += env_dpdk_rpc diff --git a/app/spdk_tgt/Makefile b/app/spdk_tgt/Makefile index 43583f855..ae9d9b95a 100644 --- a/app/spdk_tgt/Makefile +++ b/app/spdk_tgt/Makefile @@ -52,7 +52,7 @@ endif SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) event_iscsi event_net event_scsi event_nvmf event SPDK_LIB_LIST += nvmf trace log conf thread util bdev iscsi scsi accel rpc jsonrpc json -SPDK_LIB_LIST += app_rpc log_rpc bdev_rpc net sock notify +SPDK_LIB_LIST += app_rpc bdev_rpc net sock notify ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV)) SPDK_LIB_LIST += env_dpdk_rpc diff --git a/app/vhost/Makefile b/app/vhost/Makefile index 4bb28b20e..5a9166eb9 100644 --- a/app/vhost/Makefile +++ b/app/vhost/Makefile @@ -48,7 +48,7 @@ endif SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) event_net event_scsi event SPDK_LIB_LIST += jsonrpc json rpc bdev_rpc bdev scsi accel trace conf -SPDK_LIB_LIST += thread util log log_rpc app_rpc +SPDK_LIB_LIST += thread util log app_rpc SPDK_LIB_LIST += event_nbd nbd net sock notify ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV)) diff --git a/lib/Makefile b/lib/Makefile index 4c0c383eb..9efad8fbb 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -36,7 +36,7 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk include $(SPDK_ROOT_DIR)/mk/spdk.lib_deps.mk DIRS-y += bdev blob blobfs conf accel event json jsonrpc \ - log log_rpc lvol net rpc sock thread trace util nvme vmd nvmf scsi \ + log lvol net rpc sock thread trace util nvme vmd nvmf scsi \ ioat ut_mock iscsi notify ifeq ($(OS),Linux) DIRS-y += nbd ftl diff --git a/lib/event/Makefile b/lib/event/Makefile index 87a6209c7..cb5d79b5f 100644 --- a/lib/event/Makefile +++ b/lib/event/Makefile @@ -38,7 +38,7 @@ SO_VER := 5 SO_MINOR := 0 LIBNAME = event -C_SRCS = app.c reactor.c rpc.c subsystem.c json_config.c +C_SRCS = app.c reactor.c rpc.c subsystem.c json_config.c log_rpc.c SPDK_MAP_FILE = $(abspath $(CURDIR)/spdk_event.map) diff --git a/lib/log_rpc/log_rpc.c b/lib/event/log_rpc.c similarity index 100% rename from lib/log_rpc/log_rpc.c rename to lib/event/log_rpc.c diff --git a/lib/log_rpc/Makefile b/lib/log_rpc/Makefile deleted file mode 100644 index 2c7a78deb..000000000 --- a/lib/log_rpc/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# -# BSD LICENSE -# -# Copyright (c) Intel Corporation. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..) -include $(SPDK_ROOT_DIR)/mk/spdk.common.mk - -SO_VER := 2 -SO_MINOR := 0 - -C_SRCS = log_rpc.c -LIBNAME = log_rpc - -SPDK_MAP_FILE = $(abspath $(CURDIR)/spdk_log_rpc.map) - -include $(SPDK_ROOT_DIR)/mk/spdk.lib.mk diff --git a/lib/log_rpc/spdk_log_rpc.map b/lib/log_rpc/spdk_log_rpc.map deleted file mode 100644 index 8bee6cdd3..000000000 --- a/lib/log_rpc/spdk_log_rpc.map +++ /dev/null @@ -1,3 +0,0 @@ -{ - local: *; -}; diff --git a/mk/spdk.lib_deps.mk b/mk/spdk.lib_deps.mk index 98c03d4f9..fc51e4bc6 100644 --- a/mk/spdk.lib_deps.mk +++ b/mk/spdk.lib_deps.mk @@ -69,7 +69,6 @@ DEPDIRS-virtio := log util json thread DEPDIRS-lvol := log util blob DEPDIRS-rpc := log util json jsonrpc -DEPDIRS-log_rpc := log $(JSON_LIBS) DEPDIRS-net := log util $(JSON_LIBS) DEPDIRS-notify := log util $(JSON_LIBS) DEPDIRS-trace := log util $(JSON_LIBS) diff --git a/test/app/bdev_svc/Makefile b/test/app/bdev_svc/Makefile index 1736d57f0..ef2f6b1fc 100644 --- a/test/app/bdev_svc/Makefile +++ b/test/app/bdev_svc/Makefile @@ -42,7 +42,7 @@ C_SRCS := bdev_svc.c SPDK_LIB_LIST = $(ALL_MODULES_LIST) SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) SPDK_LIB_LIST += nvmf event log trace conf thread util bdev accel rpc jsonrpc json sock blobfs_bdev -SPDK_LIB_LIST += app_rpc log_rpc bdev_rpc notify +SPDK_LIB_LIST += app_rpc bdev_rpc notify ifeq ($(OS),Linux) SPDK_LIB_LIST += event_nbd nbd diff --git a/test/bdev/bdevperf/Makefile b/test/bdev/bdevperf/Makefile index 689d7fe10..e20a153aa 100644 --- a/test/bdev/bdevperf/Makefile +++ b/test/bdev/bdevperf/Makefile @@ -42,7 +42,7 @@ C_SRCS := bdevperf.c SPDK_LIB_LIST = $(ALL_MODULES_LIST) SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) SPDK_LIB_LIST += bdev accel event trace log conf thread util sock notify -SPDK_LIB_LIST += rpc jsonrpc json app_rpc log_rpc bdev_rpc +SPDK_LIB_LIST += rpc jsonrpc json app_rpc bdev_rpc ifeq ($(OS),Linux) SPDK_LIB_LIST += event_nbd nbd diff --git a/test/event/app_repeat/Makefile b/test/event/app_repeat/Makefile index eb5140b1c..ef3e88bdb 100644 --- a/test/event/app_repeat/Makefile +++ b/test/event/app_repeat/Makefile @@ -42,7 +42,7 @@ C_SRCS := app_repeat.c # the repeatable ones. SPDK_LIB_LIST = event_bdev event_accel event_vmd event_sock SPDK_LIB_LIST += event log trace conf thread util bdev accel rpc jsonrpc json sock vmd -SPDK_LIB_LIST += app_rpc log_rpc bdev_rpc notify +SPDK_LIB_LIST += app_rpc bdev_rpc notify SPDK_LIB_LIST += event_nbd nbd BLOCKDEV_LIST = bdev_malloc bdev_null