From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 40938A00BE; Tue, 19 Apr 2022 11:33:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 56624427EF; Tue, 19 Apr 2022 11:33:40 +0200 (CEST) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by mails.dpdk.org (Postfix) with ESMTP id C738A40141 for ; Mon, 18 Apr 2022 06:29:32 +0200 (CEST) Received: by mail-pg1-f180.google.com with SMTP id q12so16712600pgj.13 for ; Sun, 17 Apr 2022 21:29:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oneconvergence.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DQFUKDNTgMLhOQYHYb+JTYczCqQGnkzvszIWgmBk/t8=; b=D9hhLm3UGkydvYFrInPe8CSbUll4KwJJEUIcTVEkETPPOuScQpR9EPy3dUFGDiPLdO dudRLt99KG5HFI1K45mfVyWzFnswU1a7+FBOKDnuGOTsk86E90FKBrNjh83rqho05IEQ YJUbkSNE7cultk857BXimX/d8FXw681RbIqR0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DQFUKDNTgMLhOQYHYb+JTYczCqQGnkzvszIWgmBk/t8=; b=5aCrIiVvYOJ2CPKBMM3awuqoVcqMzxY3NnwYNAuWu588fv5ACEmKTHTDtS2FfMrXkq F5SbKIeGtlneIwuZycL9WWNocMXbKuJz3EgyAIgoF38WGRUdWr8WB5+ymv5qftQxbBf4 8uBg0vwF+v89Z+QlgEM68ceGBB6GX7a2MQchn/+mnUyDlwDtwknT6IRmSIgARKJGJNsl +IqhDXz0XtqVf191yGaq2w8FjJPHvHxb7s0I6HtxbPm4eOmBuNccGivhW7Qp5Ek4tgyZ 8gjSmP8z5m2xKtsDNuqlK3nbBtfmrwCPd+ce0M8qz6vJ+WF5grx8xNnFaCdf6LmH8XYC 4fzA== X-Gm-Message-State: AOAM532JjDFyyiWD4oqgo58D2JH9KVo/I1B5Ny68qIAZXt/Z6XYw8z4E 1nLLP0MyIUKSVkFGQCrLRzi2sA== X-Google-Smtp-Source: ABdhPJxhwtPNgHd8rdvAHrcAdsQscMFRbaN8B+4/KsMx3vMUlHvaeoIYe2ckxVMPSXfPXcF+TPWvhg== X-Received: by 2002:a63:ef06:0:b0:39d:7613:7d38 with SMTP id u6-20020a63ef06000000b0039d76137d38mr8491760pgh.284.1650256172079; Sun, 17 Apr 2022 21:29:32 -0700 (PDT) Received: from srikanth-ThinkPad-T450.. ([49.37.158.191]) by smtp.gmail.com with ESMTPSA id e14-20020aa78c4e000000b00506475da4cesm10377577pfd.49.2022.04.17.21.29.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Apr 2022 21:29:31 -0700 (PDT) From: Srikanth Kaka To: Stephen Hemminger , Long Li Cc: dev@dpdk.org, Vag Singh , Anand Thulasiram , Srikanth Kaka Subject: [PATCH v4 01/14] bus/vmbus: move independent code from Linux Date: Mon, 18 Apr 2022 09:59:02 +0530 Message-Id: <20220418042915.5765-2-srikanth.k@oneconvergence.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220418042915.5765-1-srikanth.k@oneconvergence.com> References: <20220217160613.70161-16-srikanth.k@oneconvergence.com> <20220418042915.5765-1-srikanth.k@oneconvergence.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 19 Apr 2022 11:33:36 +0200 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Move the OS independent code from Linux dir in-order to be used by FreeBSD Signed-off-by: Srikanth Kaka Signed-off-by: Vag Singh Signed-off-by: Anand Thulasiram --- drivers/bus/vmbus/linux/vmbus_bus.c | 13 +------------ drivers/bus/vmbus/meson.build | 5 +++++ drivers/bus/vmbus/osi/vmbus_osi.h | 11 +++++++++++ drivers/bus/vmbus/osi/vmbus_osi_bus.c | 20 ++++++++++++++++++++ 4 files changed, 37 insertions(+), 12 deletions(-) create mode 100644 drivers/bus/vmbus/osi/vmbus_osi.h create mode 100644 drivers/bus/vmbus/osi/vmbus_osi_bus.c diff --git a/drivers/bus/vmbus/linux/vmbus_bus.c b/drivers/bus/vmbus/linux/vmbus_bus.c index f502783f7a..c9a07041a7 100644 --- a/drivers/bus/vmbus/linux/vmbus_bus.c +++ b/drivers/bus/vmbus/linux/vmbus_bus.c @@ -21,22 +21,11 @@ #include "eal_filesystem.h" #include "private.h" +#include "vmbus_osi.h" /** Pathname of VMBUS devices directory. */ #define SYSFS_VMBUS_DEVICES "/sys/bus/vmbus/devices" -/* - * GUID associated with network devices - * {f8615163-df3e-46c5-913f-f2d2f965ed0e} - */ -static const rte_uuid_t vmbus_nic_uuid = { - 0xf8, 0x61, 0x51, 0x63, - 0xdf, 0x3e, - 0x46, 0xc5, - 0x91, 0x3f, - 0xf2, 0xd2, 0xf9, 0x65, 0xed, 0xe -}; - extern struct rte_vmbus_bus rte_vmbus_bus; /* Read sysfs file to get UUID */ diff --git a/drivers/bus/vmbus/meson.build b/drivers/bus/vmbus/meson.build index 3892cbf67f..cbcba44e16 100644 --- a/drivers/bus/vmbus/meson.build +++ b/drivers/bus/vmbus/meson.build @@ -16,6 +16,11 @@ sources = files( 'vmbus_common_uio.c', ) +includes += include_directories('osi') +sources += files( + 'osi/vmbus_osi_bus.c' +) + if is_linux sources += files('linux/vmbus_bus.c', 'linux/vmbus_uio.c') diff --git a/drivers/bus/vmbus/osi/vmbus_osi.h b/drivers/bus/vmbus/osi/vmbus_osi.h new file mode 100644 index 0000000000..2db9399181 --- /dev/null +++ b/drivers/bus/vmbus/osi/vmbus_osi.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright (c) 2018, Microsoft Corporation. + * All Rights Reserved. + */ + +#ifndef _VMBUS_BUS_OSI_H_ +#define _VMBUS_BUS_OSI_H_ + +extern const rte_uuid_t vmbus_nic_uuid; + +#endif /* _VMBUS_BUS_OSI_H_ */ diff --git a/drivers/bus/vmbus/osi/vmbus_osi_bus.c b/drivers/bus/vmbus/osi/vmbus_osi_bus.c new file mode 100644 index 0000000000..8437109717 --- /dev/null +++ b/drivers/bus/vmbus/osi/vmbus_osi_bus.c @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright (c) 2018, Microsoft Corporation. + * All Rights Reserved. + */ + +#include + +#include "vmbus_osi.h" + +/* + * GUID associated with network devices + * {f8615163-df3e-46c5-913f-f2d2f965ed0e} + */ +const rte_uuid_t vmbus_nic_uuid = { + 0xf8, 0x61, 0x51, 0x63, + 0xdf, 0x3e, + 0x46, 0xc5, + 0x91, 0x3f, + 0xf2, 0xd2, 0xf9, 0x65, 0xed, 0xe +}; -- 2.30.2