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 51B16A00C3; Tue, 19 Apr 2022 16:49:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E82C24068E; Tue, 19 Apr 2022 16:49:52 +0200 (CEST) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id ABE3740687 for ; Tue, 19 Apr 2022 16:49:51 +0200 (CEST) Received: by mail-pl1-f169.google.com with SMTP id v12so15984240plv.4 for ; Tue, 19 Apr 2022 07:49:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FeuYe0Y0gukSB01m7LbaXrB7axjcUUOnEwY+zbWikfY=; b=hjdDVouxFMHy9BW76tP/WqMCKpd4GfzK+agkkry5TMuGeeCCDhfulyxfHUs9gIqG6k /8KO+WDXe7YcK0wtwttIl8uaBYwfrScY7nzeMhVCG093Tphn7CdKY7+huodpnWkgvPYE yfNFejOBvIXCFmjTPQidKRhop5zJBwuWt6iE5zE7954IHuoboAu2QUYnCtZPZzX5aKvV RUHSdBHlpY4JIdZVxDQ7hoMo6nk9hU/PiQdqF1GVTAdziupsF6pVIMyd4fKmeGoGo6d1 d0ZCZpZRYJgz6iu0nWNemY9u3RYBdbcR/2nUhTtu0d2VHKl7e8q88xGC/OY3X0BLZevw 2lpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FeuYe0Y0gukSB01m7LbaXrB7axjcUUOnEwY+zbWikfY=; b=PAgfzvHjT8TWhAQyOrWx5RyBRykC75Qh/BcKhgBs+AyRRJD0TPAlMeLPiWpfY8qznn blzSPibEIle+en9P5PllwS0qgvGWkShRohnJq4j/Q8KzgoSsto844Gtr51J6TiwGhljh KN6ZBqoEXgDedyceUa9UX5LVDITGQ0bic2Jb1awk1/kDzwL8Fm83PhVE5Gz5rlgCdOtr qOQLvKmXGpNVyxaAKMuHN8+GjMBDGP+AYF2la7jweCpLmPmcfQHwByCxcZDlxAgvFLJd GMfKB6wwgpKIXD0FELtb34On7M8sQHJ5rUl/mbBD9Kcc8rRvwZEcVqtczW9WJ7sL2M26 K1LQ== X-Gm-Message-State: AOAM532PfbWg1rPvXzT1eOZNma3m2P9Ow2RX4R97drRU3wlQzv43/I+r e160plqVeEs0SET8BbFRHw43zw== X-Google-Smtp-Source: ABdhPJymaV79hkRBoy8c5mQx/D6wAhAQWMyCbZaWGHGG6T7nI+Rtlk5biVBBL9H5wIwgsHfCQog4kg== X-Received: by 2002:a17:902:f649:b0:156:1609:79e9 with SMTP id m9-20020a170902f64900b00156160979e9mr16077090plg.69.1650379790666; Tue, 19 Apr 2022 07:49:50 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id d16-20020a056a00245000b004f771b48736sm17615737pfj.194.2022.04.19.07.49.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 07:49:50 -0700 (PDT) Date: Tue, 19 Apr 2022 07:49:47 -0700 From: Stephen Hemminger To: Srikanth Kaka Cc: Stephen Hemminger , Long Li , dev@dpdk.org, Vag Singh , Anand Thulasiram Subject: Re: [PATCH v4 01/14] bus/vmbus: move independent code from Linux Message-ID: <20220419074947.4a737ba5@hermes.local> In-Reply-To: <20220418042915.5765-2-srikanth.k@oneconvergence.com> References: <20220217160613.70161-16-srikanth.k@oneconvergence.com> <20220418042915.5765-1-srikanth.k@oneconvergence.com> <20220418042915.5765-2-srikanth.k@oneconvergence.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Mon, 18 Apr 2022 09:59:02 +0530 Srikanth Kaka wrote: > 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 Having common code is good, we are already doing it now in DPDK EAL. But the name osi seems odd to me. Could you use unix instead (same as EAL) drivers/bus/vmbus/unix/vmbus.h Or drivers/bus/vmbus/common