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 9F565A00C4; Tue, 26 Apr 2022 10:32:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3ECF742802; Tue, 26 Apr 2022 10:32:39 +0200 (CEST) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTP id 1A4024003F for ; Sat, 23 Apr 2022 06:29:50 +0200 (CEST) Received: by mail-pg1-f172.google.com with SMTP id g3so8262656pgg.3 for ; Fri, 22 Apr 2022 21:29:49 -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=DKUuGQ+4n8x8KbP9drX5VjWeLgdsf2iygtL2aLeINIc=; b=Rv5RCxIiEBkvW48EL4u7ujfWPAOPpUQ5uwm865I801KgGoR7XfisJMtj78ZSLYUcbu P89LmNjlnr4+OjqAGY9gYRO1IWte+Bg5FQVuSOrLfFr33DSeot/PhD3ojHuyHi5FZ00y rYD6wnUtfYESuP9NVKq7bAlYCBzSriODbjd6o= 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=DKUuGQ+4n8x8KbP9drX5VjWeLgdsf2iygtL2aLeINIc=; b=ugIJ5NfzitJhiOCqk25HD6lCPAftUc03zee5VMgV85t3MYZx3k8bqwlkUsM60wjEYl tDiGRiuCwetrMA9PR0QGZlUCvMGk4tUqBqArbL+jZizknJzPZEC/9wl7+JemJbgSJcss cnqDbgmkDS0hfTxG6hYAYysIwD5L/n3RntU/goGZkMnYi//5pBa3j+A65eO8Hn3Bcpcl r/C+7bQw8dJ3EwOv0Fhmw8OCKO8OZ/GEfZbJiiNDtXI6EQh4A3hgOpqjpHlsFexD3kho jLDLuAI5xUjiipn5oGAlcLSUIxDiVIvezdDPbvLurj/12Z7WikAWCje8WjLxRo3t3XDF mTSw== X-Gm-Message-State: AOAM533IfU6fb/kbDepi1t5ynysxD7XHyVjbXCRd6NqMLADNy5vp0aw9 hh2Bipw9Z8CFEoeZbqCMU1rI1Q== X-Google-Smtp-Source: ABdhPJwi+kAVsE4/K8+QHLJBCft7DXzNVjdWaqFy6Qj43Ug8m/v9wRvYsbjPNb1Kt7RMbpKFoQTdXg== X-Received: by 2002:a05:6a00:1385:b0:50a:9768:9eca with SMTP id t5-20020a056a00138500b0050a97689ecamr8113334pfg.43.1650688189299; Fri, 22 Apr 2022 21:29:49 -0700 (PDT) Received: from home-desktop.localdomain ([49.37.158.191]) by smtp.gmail.com with ESMTPSA id g6-20020a17090a714600b001d7f3bb11d7sm4056438pjs.53.2022.04.22.21.29.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 21:29:48 -0700 (PDT) From: Srikanth Kaka To: Stephen Hemminger , Long Li Cc: dev@dpdk.org, Vag Singh , Anand Thulasiram , Srikanth Kaka Subject: [PATCH v5 01/14] bus/vmbus: move independent code from Linux Date: Sat, 23 Apr 2022 09:58:36 +0530 Message-Id: <20220423042849.7718-2-srikanth.k@oneconvergence.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220423042849.7718-1-srikanth.k@oneconvergence.com> References: <20220418042915.5765-1-srikanth.k@oneconvergence.com> <20220423042849.7718-1-srikanth.k@oneconvergence.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 26 Apr 2022 10:32:34 +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/unix/vmbus_unix.h | 11 +++++++++++ drivers/bus/vmbus/unix/vmbus_unix_bus.c | 20 ++++++++++++++++++++ 4 files changed, 37 insertions(+), 12 deletions(-) create mode 100644 drivers/bus/vmbus/unix/vmbus_unix.h create mode 100644 drivers/bus/vmbus/unix/vmbus_unix_bus.c diff --git a/drivers/bus/vmbus/linux/vmbus_bus.c b/drivers/bus/vmbus/linux/vmbus_bus.c index f502783..e649537 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_unix.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 3892cbf..01ef01f 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('unix') +sources += files( + 'unix/vmbus_unix_bus.c' +) + if is_linux sources += files('linux/vmbus_bus.c', 'linux/vmbus_uio.c') diff --git a/drivers/bus/vmbus/unix/vmbus_unix.h b/drivers/bus/vmbus/unix/vmbus_unix.h new file mode 100644 index 0000000..2db9399 --- /dev/null +++ b/drivers/bus/vmbus/unix/vmbus_unix.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright (c) 2018, Microsoft Corporation. + * All Rights Reserved. + */ + +#ifndef _VMBUS_BUS_UNIX_H_ +#define _VMBUS_BUS_UNIX_H_ + +extern const rte_uuid_t vmbus_nic_uuid; + +#endif /* _VMBUS_BUS_UNIX_H_ */ diff --git a/drivers/bus/vmbus/unix/vmbus_unix_bus.c b/drivers/bus/vmbus/unix/vmbus_unix_bus.c new file mode 100644 index 0000000..f76a361 --- /dev/null +++ b/drivers/bus/vmbus/unix/vmbus_unix_bus.c @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright (c) 2018, Microsoft Corporation. + * All Rights Reserved. + */ + +#include + +#include "vmbus_unix.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 +}; -- 1.8.3.1