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 41537A00C4; Tue, 26 Apr 2022 10:32:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3148E40C35; Tue, 26 Apr 2022 10:32:35 +0200 (CEST) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by mails.dpdk.org (Postfix) with ESMTP id 93AB24068E for ; Tue, 19 Apr 2022 16:52:33 +0200 (CEST) Received: by mail-lf1-f53.google.com with SMTP id p10so29812883lfa.12 for ; Tue, 19 Apr 2022 07:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oneconvergence.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TKE24nOFxMjab02ze0MRuorPV0BUGBB5IFSatMJriaY=; b=VojDjKyW10gEA7wKY1BHNyxhwZClkUB6mywCnFdDB/5jUcXT2oA4Z1/4S2eGVng4bM zf24w2KnVPjsXxKqtRxxQd/J9S8a7yyQbQsLO+SWTcKxcijDrvaw8zbkSfVf6oGR0cwQ CwR6MbbRnSOm+dG/2OLxDom3NawuIL23eTYL4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TKE24nOFxMjab02ze0MRuorPV0BUGBB5IFSatMJriaY=; b=jiJ5UEUywjFdaAB77DAKXuaWEm0oq+xTEzdsA6gX7IGOjejQ53WDVcDsSiXhvo9OOs o4yTQUKFhUoAvavYDydBXpDYXYiz0qerQGCwW8l/8UeIbRqftkeoXc/T48ZJXE+IxZBj YG/lSWwBdjy4iHEWgHI/BMklm8aHuqYYAgIaj06j/O0NE5Ghf4QIfb3nyLbNm/bpqszG /q3TGPt07e1oikactYwg35QbmS8EFxGcefSSpvDwz1nAWVCJ07tieVIUmsxjDYFYK9Q4 GIaH/cv/Xf65KKzDW4ihFrXF5yZNIhdijXSFZmx5MhruDPTfA432DxFuiTUnMOkp9Q75 YTxg== X-Gm-Message-State: AOAM533evFaSrSSjPVvsoxBrL+vfi37TKG6KP7YBHtyUq1pKJhtrIPjA yKjnxlMS1LVlgLKeTNit3TlDNqfufN/8tXU9T3FWHQ== X-Google-Smtp-Source: ABdhPJx3AzfaPjtJHhOtiBobrx2+pR2Sbd4rk8kB4k8+Hcdh3Sj1EtkDGk4n3H6Hv9fMWEhgs93S1evpa8tOe1lXW1s= X-Received: by 2002:a05:6512:1112:b0:471:b4e6:5058 with SMTP id l18-20020a056512111200b00471b4e65058mr154036lfg.546.1650379953014; Tue, 19 Apr 2022 07:52:33 -0700 (PDT) MIME-Version: 1.0 References: <20220217160613.70161-16-srikanth.k@oneconvergence.com> <20220418042915.5765-1-srikanth.k@oneconvergence.com> <20220418042915.5765-2-srikanth.k@oneconvergence.com> <20220419074947.4a737ba5@hermes.local> In-Reply-To: <20220419074947.4a737ba5@hermes.local> From: Srikanth K Date: Tue, 19 Apr 2022 20:22:19 +0530 Message-ID: Subject: Re: [PATCH v4 01/14] bus/vmbus: move independent code from Linux To: Stephen Hemminger Cc: Stephen Hemminger , Long Li , dev@dpdk.org, Vag Singh , Anand Thulasiram Content-Type: multipart/alternative; boundary="000000000000d82c7905dd0306ac" 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 --000000000000d82c7905dd0306ac Content-Type: text/plain; charset="UTF-8" Sure Stephen. I will change it to unix. On Tue, 19 Apr 2022, 8:19 pm Stephen Hemminger, wrote: > 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 > --000000000000d82c7905dd0306ac Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sure Stephen. I will change it to unix.

On Tue, 19 Apr 202= 2, 8:19 pm Stephen Hemminger, <stephen@networkplumber.org> wrote:
On Mon, 18 Apr 2022 09:59:02 +0530
Srikanth Kaka <srikanth.k@oneconvergence.com> wrote:=

> Move the OS independent code from Linux dir in-order to be used
> by FreeBSD
>
> Signed-off-by: Srikanth Kaka <srikanth.k@oneconvergence.= com>
> Signed-off-by: Vag Singh <vag.singh@oneconvergence.com>
> Signed-off-by: Anand Thulasiram <
avelu@juniper.net>
> ---
>=C2=A0 drivers/bus/vmbus/linux/vmbus_bus.c=C2=A0 =C2=A0| 13 +----------= --
>=C2=A0 drivers/bus/vmbus/meson.build=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|= =C2=A0 5 +++++
>=C2=A0 drivers/bus/vmbus/osi/vmbus_osi.h=C2=A0 =C2=A0 =C2=A0| 11 ++++++= +++++
>=C2=A0 drivers/bus/vmbus/osi/vmbus_osi_bus.c | 20 ++++++++++++++++++++<= br> >=C2=A0 4 files changed, 37 insertions(+), 12 deletions(-)
>=C2=A0 create mode 100644 drivers/bus/vmbus/osi/vmbus_osi.h
>=C2=A0 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/l= inux/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 @@
>=C2=A0
>=C2=A0 #include "eal_filesystem.h"
>=C2=A0 #include "private.h"
> +#include "vmbus_osi.h"
>=C2=A0
>=C2=A0 /** Pathname of VMBUS devices directory. */
>=C2=A0 #define SYSFS_VMBUS_DEVICES "/sys/bus/vmbus/devices" >=C2=A0
> -/*
> - * GUID associated with network devices
> - * {f8615163-df3e-46c5-913f-f2d2f965ed0e}
> - */
> -static const rte_uuid_t vmbus_nic_uuid =3D {
> -=C2=A0 =C2=A0 =C2=A00xf8, 0x61, 0x51, 0x63,
> -=C2=A0 =C2=A0 =C2=A00xdf, 0x3e,
> -=C2=A0 =C2=A0 =C2=A00x46, 0xc5,
> -=C2=A0 =C2=A0 =C2=A00x91, 0x3f,
> -=C2=A0 =C2=A0 =C2=A00xf2, 0xd2, 0xf9, 0x65, 0xed, 0xe
> -};
> -
>=C2=A0 extern struct rte_vmbus_bus rte_vmbus_bus;
>=C2=A0
>=C2=A0 /* Read sysfs file to get UUID */
> diff --git a/drivers/bus/vmbus/meson.build b/drivers/bus/vmbus/meson.b= uild
> index 3892cbf67f..cbcba44e16 100644
> --- a/drivers/bus/vmbus/meson.build
> +++ b/drivers/bus/vmbus/meson.build
> @@ -16,6 +16,11 @@ sources =3D files(
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'vmbus_common_uio.c',
>=C2=A0 )
>=C2=A0
> +includes +=3D include_directories('osi')
> +sources +=3D files(
> +=C2=A0 =C2=A0 =C2=A0'osi/vmbus_osi_bus.c'
> +)
> +
>=C2=A0 if is_linux
>=C2=A0 =C2=A0 =C2=A0 sources +=3D files('linux/vmbus_bus.c', >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '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)

=C2=A0 =C2=A0drivers/bus/vmbus/unix/vmbus.h

Or drivers/bus/vmbus/common
--000000000000d82c7905dd0306ac--