From f34fa35a523a6ded6794b81d63c4b9ebafb7335b Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Fri, 16 Aug 2019 10:46:52 -0700 Subject: [PATCH] lib/event: move rpc and subsystems dirs to module These directories fit in with the module concept we are forming inside of SPDK. Essentially modules are derivative or specialized libraries that rely on a general or core library. Change-Id: Ib40f05422f144ff8fd579f47a3867ef4412b3372 Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465455 Reviewed-by: Changpeng Liu Reviewed-by: Jim Harris Reviewed-by: Ben Walker Reviewed-by: Broadcom SPDK FC-NVMe CI Tested-by: SPDK CI Jenkins --- lib/event/Makefile | 2 - module/Makefile | 2 +- module/event/Makefile | 44 +++++++++++++++++++ {lib => module}/event/rpc/Makefile | 0 {lib => module}/event/rpc/app_rpc.c | 0 {lib => module}/event/rpc/subsystem_rpc.c | 0 {lib => module}/event/subsystems/Makefile | 0 .../event/subsystems/bdev/Makefile | 0 {lib => module}/event/subsystems/bdev/bdev.c | 0 .../event/subsystems/copy/Makefile | 0 {lib => module}/event/subsystems/copy/copy.c | 0 .../event/subsystems/iscsi/Makefile | 0 .../event/subsystems/iscsi/iscsi.c | 0 {lib => module}/event/subsystems/nbd/Makefile | 0 {lib => module}/event/subsystems/nbd/nbd.c | 0 {lib => module}/event/subsystems/net/Makefile | 0 {lib => module}/event/subsystems/net/net.c | 0 .../event/subsystems/nvmf/Makefile | 0 {lib => module}/event/subsystems/nvmf/conf.c | 0 .../event/subsystems/nvmf/event_nvmf.h | 0 .../event/subsystems/nvmf/nvmf_rpc.c | 0 .../event/subsystems/nvmf/nvmf_tgt.c | 0 .../event/subsystems/scsi/Makefile | 0 {lib => module}/event/subsystems/scsi/scsi.c | 0 .../event/subsystems/vhost/Makefile | 0 .../event/subsystems/vhost/vhost.c | 0 {lib => module}/event/subsystems/vmd/Makefile | 0 {lib => module}/event/subsystems/vmd/vmd.c | 0 .../event/subsystems/vmd/vmd_rpc.c | 0 29 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 module/event/Makefile rename {lib => module}/event/rpc/Makefile (100%) rename {lib => module}/event/rpc/app_rpc.c (100%) rename {lib => module}/event/rpc/subsystem_rpc.c (100%) rename {lib => module}/event/subsystems/Makefile (100%) rename {lib => module}/event/subsystems/bdev/Makefile (100%) rename {lib => module}/event/subsystems/bdev/bdev.c (100%) rename {lib => module}/event/subsystems/copy/Makefile (100%) rename {lib => module}/event/subsystems/copy/copy.c (100%) rename {lib => module}/event/subsystems/iscsi/Makefile (100%) rename {lib => module}/event/subsystems/iscsi/iscsi.c (100%) rename {lib => module}/event/subsystems/nbd/Makefile (100%) rename {lib => module}/event/subsystems/nbd/nbd.c (100%) rename {lib => module}/event/subsystems/net/Makefile (100%) rename {lib => module}/event/subsystems/net/net.c (100%) rename {lib => module}/event/subsystems/nvmf/Makefile (100%) rename {lib => module}/event/subsystems/nvmf/conf.c (100%) rename {lib => module}/event/subsystems/nvmf/event_nvmf.h (100%) rename {lib => module}/event/subsystems/nvmf/nvmf_rpc.c (100%) rename {lib => module}/event/subsystems/nvmf/nvmf_tgt.c (100%) rename {lib => module}/event/subsystems/scsi/Makefile (100%) rename {lib => module}/event/subsystems/scsi/scsi.c (100%) rename {lib => module}/event/subsystems/vhost/Makefile (100%) rename {lib => module}/event/subsystems/vhost/vhost.c (100%) rename {lib => module}/event/subsystems/vmd/Makefile (100%) rename {lib => module}/event/subsystems/vmd/vmd.c (100%) rename {lib => module}/event/subsystems/vmd/vmd_rpc.c (100%) diff --git a/lib/event/Makefile b/lib/event/Makefile index f80e9331ce..79a72b6499 100644 --- a/lib/event/Makefile +++ b/lib/event/Makefile @@ -37,6 +37,4 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk LIBNAME = event C_SRCS = app.c reactor.c rpc.c subsystem.c json_config.c -DIRS-y = rpc subsystems - include $(SPDK_ROOT_DIR)/mk/spdk.lib.mk diff --git a/module/Makefile b/module/Makefile index 2cbb5d05a2..5627a1955c 100644 --- a/module/Makefile +++ b/module/Makefile @@ -34,7 +34,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk -DIRS-y = bdev +DIRS-y = bdev event .PHONY: all clean $(DIRS-y) diff --git a/module/event/Makefile b/module/event/Makefile new file mode 100644 index 0000000000..f4caea64e7 --- /dev/null +++ b/module/event/Makefile @@ -0,0 +1,44 @@ +# +# 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 + +DIRS-y = subsystems rpc + +.PHONY: all clean $(DIRS-y) + +all: $(DIRS-y) +clean: $(DIRS-y) + +include $(SPDK_ROOT_DIR)/mk/spdk.subdirs.mk diff --git a/lib/event/rpc/Makefile b/module/event/rpc/Makefile similarity index 100% rename from lib/event/rpc/Makefile rename to module/event/rpc/Makefile diff --git a/lib/event/rpc/app_rpc.c b/module/event/rpc/app_rpc.c similarity index 100% rename from lib/event/rpc/app_rpc.c rename to module/event/rpc/app_rpc.c diff --git a/lib/event/rpc/subsystem_rpc.c b/module/event/rpc/subsystem_rpc.c similarity index 100% rename from lib/event/rpc/subsystem_rpc.c rename to module/event/rpc/subsystem_rpc.c diff --git a/lib/event/subsystems/Makefile b/module/event/subsystems/Makefile similarity index 100% rename from lib/event/subsystems/Makefile rename to module/event/subsystems/Makefile diff --git a/lib/event/subsystems/bdev/Makefile b/module/event/subsystems/bdev/Makefile similarity index 100% rename from lib/event/subsystems/bdev/Makefile rename to module/event/subsystems/bdev/Makefile diff --git a/lib/event/subsystems/bdev/bdev.c b/module/event/subsystems/bdev/bdev.c similarity index 100% rename from lib/event/subsystems/bdev/bdev.c rename to module/event/subsystems/bdev/bdev.c diff --git a/lib/event/subsystems/copy/Makefile b/module/event/subsystems/copy/Makefile similarity index 100% rename from lib/event/subsystems/copy/Makefile rename to module/event/subsystems/copy/Makefile diff --git a/lib/event/subsystems/copy/copy.c b/module/event/subsystems/copy/copy.c similarity index 100% rename from lib/event/subsystems/copy/copy.c rename to module/event/subsystems/copy/copy.c diff --git a/lib/event/subsystems/iscsi/Makefile b/module/event/subsystems/iscsi/Makefile similarity index 100% rename from lib/event/subsystems/iscsi/Makefile rename to module/event/subsystems/iscsi/Makefile diff --git a/lib/event/subsystems/iscsi/iscsi.c b/module/event/subsystems/iscsi/iscsi.c similarity index 100% rename from lib/event/subsystems/iscsi/iscsi.c rename to module/event/subsystems/iscsi/iscsi.c diff --git a/lib/event/subsystems/nbd/Makefile b/module/event/subsystems/nbd/Makefile similarity index 100% rename from lib/event/subsystems/nbd/Makefile rename to module/event/subsystems/nbd/Makefile diff --git a/lib/event/subsystems/nbd/nbd.c b/module/event/subsystems/nbd/nbd.c similarity index 100% rename from lib/event/subsystems/nbd/nbd.c rename to module/event/subsystems/nbd/nbd.c diff --git a/lib/event/subsystems/net/Makefile b/module/event/subsystems/net/Makefile similarity index 100% rename from lib/event/subsystems/net/Makefile rename to module/event/subsystems/net/Makefile diff --git a/lib/event/subsystems/net/net.c b/module/event/subsystems/net/net.c similarity index 100% rename from lib/event/subsystems/net/net.c rename to module/event/subsystems/net/net.c diff --git a/lib/event/subsystems/nvmf/Makefile b/module/event/subsystems/nvmf/Makefile similarity index 100% rename from lib/event/subsystems/nvmf/Makefile rename to module/event/subsystems/nvmf/Makefile diff --git a/lib/event/subsystems/nvmf/conf.c b/module/event/subsystems/nvmf/conf.c similarity index 100% rename from lib/event/subsystems/nvmf/conf.c rename to module/event/subsystems/nvmf/conf.c diff --git a/lib/event/subsystems/nvmf/event_nvmf.h b/module/event/subsystems/nvmf/event_nvmf.h similarity index 100% rename from lib/event/subsystems/nvmf/event_nvmf.h rename to module/event/subsystems/nvmf/event_nvmf.h diff --git a/lib/event/subsystems/nvmf/nvmf_rpc.c b/module/event/subsystems/nvmf/nvmf_rpc.c similarity index 100% rename from lib/event/subsystems/nvmf/nvmf_rpc.c rename to module/event/subsystems/nvmf/nvmf_rpc.c diff --git a/lib/event/subsystems/nvmf/nvmf_tgt.c b/module/event/subsystems/nvmf/nvmf_tgt.c similarity index 100% rename from lib/event/subsystems/nvmf/nvmf_tgt.c rename to module/event/subsystems/nvmf/nvmf_tgt.c diff --git a/lib/event/subsystems/scsi/Makefile b/module/event/subsystems/scsi/Makefile similarity index 100% rename from lib/event/subsystems/scsi/Makefile rename to module/event/subsystems/scsi/Makefile diff --git a/lib/event/subsystems/scsi/scsi.c b/module/event/subsystems/scsi/scsi.c similarity index 100% rename from lib/event/subsystems/scsi/scsi.c rename to module/event/subsystems/scsi/scsi.c diff --git a/lib/event/subsystems/vhost/Makefile b/module/event/subsystems/vhost/Makefile similarity index 100% rename from lib/event/subsystems/vhost/Makefile rename to module/event/subsystems/vhost/Makefile diff --git a/lib/event/subsystems/vhost/vhost.c b/module/event/subsystems/vhost/vhost.c similarity index 100% rename from lib/event/subsystems/vhost/vhost.c rename to module/event/subsystems/vhost/vhost.c diff --git a/lib/event/subsystems/vmd/Makefile b/module/event/subsystems/vmd/Makefile similarity index 100% rename from lib/event/subsystems/vmd/Makefile rename to module/event/subsystems/vmd/Makefile diff --git a/lib/event/subsystems/vmd/vmd.c b/module/event/subsystems/vmd/vmd.c similarity index 100% rename from lib/event/subsystems/vmd/vmd.c rename to module/event/subsystems/vmd/vmd.c diff --git a/lib/event/subsystems/vmd/vmd_rpc.c b/module/event/subsystems/vmd/vmd_rpc.c similarity index 100% rename from lib/event/subsystems/vmd/vmd_rpc.c rename to module/event/subsystems/vmd/vmd_rpc.c