From: Saurabh Singh Sengar <ssengar@microsoft.com>
To: Greg KH <gregkh@linuxfoundation.org>,
Saurabh Sengar <ssengar@linux.microsoft.com>
Cc: KY Srinivasan <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
"wei.liu@kernel.org" <wei.liu@kernel.org>,
Dexuan Cui <decui@microsoft.com>,
"Michael Kelley (LINUX)" <mikelley@microsoft.com>,
"corbet@lwn.net" <corbet@lwn.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>
Subject: RE: [EXTERNAL] Re: [PATCH v2 2/5] tools: hv: Add vmbus_bufring
Date: Tue, 20 Jun 2023 05:25:06 +0000 [thread overview]
Message-ID: <PUZP153MB07492FF43240CFD055CF268ABE5CA@PUZP153MB0749.APCP153.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <2023061430-facedown-getting-d9f7@gregkh>
> -----Original Message-----
> From: Greg KH <gregkh@linuxfoundation.org>
> Sent: Thursday, June 15, 2023 2:46 AM
> To: Saurabh Sengar <ssengar@linux.microsoft.com>
> Cc: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang
> <haiyangz@microsoft.com>; wei.liu@kernel.org; Dexuan Cui
> <decui@microsoft.com>; Michael Kelley (LINUX) <mikelley@microsoft.com>;
> corbet@lwn.net; linux-kernel@vger.kernel.org; linux-hyperv@vger.kernel.org;
> linux-doc@vger.kernel.org
> Subject: [EXTERNAL] Re: [PATCH v2 2/5] tools: hv: Add vmbus_bufring
>
> On Wed, Jun 14, 2023 at 11:15:09AM -0700, Saurabh Sengar wrote:
> > Common userspace interface for read/write from VMBus ringbuffer.
> > This implementation is open for use by any userspace driver or
> > application seeking direct control over VMBus ring buffers.
> > A significant part of this code is borrowed from DPDK.
>
> " "?
>
> Anyway, this does not explain what this is at all.
I can elaborate more in next version.
>
> And if you "borrowed" it from DPDK, that feels odd, are you sure you are
> allowed to do so?
I will confirm this internally before sending next version.
>
> > Link:
> > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> >
> ub.com%2FDPDK%2Fdpdk%2F&data=05%7C01%7Cssengar%40microsoft.com
> %7C79975
> >
> a82b7b44c67b0b508db6d1c9301%7C72f988bf86f141af91ab2d7cd011db47%7
> C1%7C0
> >
> %7C638223741757437265%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLj
> AwMDAiLCJQ
> >
> IjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata
> =100fd
> > FVed6C5lBrikWqkWwFpfH33LHF0H8fuRb0myL0%3D&reserved=0
>
> Not what a Link: tag is for, sorry.
Will fix, thanks for pointing this.
>
> >
> > Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> > ---
> > [V2]
> > - simpler sysfs path, less parsing
> >
> > tools/hv/vmbus_bufring.c | 322
> > +++++++++++++++++++++++++++++++++++++++
> > tools/hv/vmbus_bufring.h | 158 +++++++++++++++++++
> > 2 files changed, 480 insertions(+)
> > create mode 100644 tools/hv/vmbus_bufring.c create mode 100644
> > tools/hv/vmbus_bufring.h
>
> You add new files to the tools directory, yet say nothing about how to use
> them or even how to build them.
>
> Why is there a .h file for a single .c file? That seems pointless, right?
This is a header file so that any userspace application can add it. This file
Is used by fcopy application in [PATCH v2 3/5] of this patch series.
If this is confusing, shall I merge 2/5 and 3/5 ? I thought better to keep the
common library code as separate patch. Please let me know your opinion.
>
> > diff --git a/tools/hv/vmbus_bufring.c b/tools/hv/vmbus_bufring.c new
> > file mode 100644 index 000000000000..d44a06d45b03
> > --- /dev/null
> > +++ b/tools/hv/vmbus_bufring.c
> > @@ -0,0 +1,322 @@
> > +// SPDX-License-Identifier: BSD-3-Clause
> > +/*
> > + * Copyright (c) 2009-2012,2016,2023 Microsoft Corp.
> > + * Copyright (c) 2012 NetApp Inc.
> > + * Copyright (c) 2012 Citrix Inc.
> > + * All rights reserved.
>
> No copyright for the work you did?
I have added 2023 Microsoft Corp. Please let me know if I need to add
anything more.
>
> > + */
> > +
> > +#include <errno.h>
> > +#include <fcntl.h>
> > +#include <emmintrin.h>
> > +#include <linux/limits.h>
> > +#include <stdbool.h>
> > +#include <stdint.h>
> > +#include <stdio.h>
> > +#include <string.h>
> > +#include <sys/mman.h>
> > +#include <sys/uio.h>
> > +#include <unistd.h>
> > +#include "vmbus_bufring.h"
> > +
> > +#define rte_compiler_barrier() ({ asm volatile ("" : : : "memory"); })
> > +
> > +#define rte_smp_rwmb() ({ asm volatile ("" : : :
> "memory"); })
>
> These aren't in any common header file already?
I see every userspace application is maintaining their separate copy of this.
Although I can remove this duplicate define and can use only one of these.
- Saurabh
>
> thanks,
>
> greg k-h
next prev parent reply other threads:[~2023-06-20 5:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-14 18:15 [PATCH v2 0/5] UIO driver for low speed Hyper-V devices Saurabh Sengar
2023-06-14 18:15 ` [PATCH v2 1/5] uio: Add hv_vmbus_client driver Saurabh Sengar
2023-06-14 21:13 ` Greg KH
2023-06-20 5:19 ` [EXTERNAL] " Saurabh Singh Sengar
2023-06-20 7:06 ` Greg KH
2023-06-20 7:41 ` Saurabh Singh Sengar
2023-06-14 18:15 ` [PATCH v2 2/5] tools: hv: Add vmbus_bufring Saurabh Sengar
2023-06-14 21:16 ` Greg KH
2023-06-20 5:25 ` Saurabh Singh Sengar [this message]
2023-06-20 7:05 ` [EXTERNAL] " Greg KH
2023-06-22 17:47 ` Saurabh Singh Sengar
2023-06-22 18:12 ` Greg KH
2023-06-22 17:46 ` Saurabh Singh Sengar
2023-06-14 18:15 ` [PATCH v2 3/5] tools: hv: Add new fcopy application based on uio driver Saurabh Sengar
2023-06-14 21:17 ` Greg KH
2023-06-14 18:15 ` [PATCH v2 4/5] tools: hv: Remove hv_fcopy_daemon Saurabh Sengar
2023-06-14 18:15 ` [PATCH v2 5/5] Drivers: hv: Remove fcopy driver Saurabh Sengar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PUZP153MB07492FF43240CFD055CF268ABE5CA@PUZP153MB0749.APCP153.PROD.OUTLOOK.COM \
--to=ssengar@microsoft.com \
--cc=corbet@lwn.net \
--cc=decui@microsoft.com \
--cc=gregkh@linuxfoundation.org \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikelley@microsoft.com \
--cc=ssengar@linux.microsoft.com \
--cc=wei.liu@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®