DPDK patches and discussions
 help / color / mirror / Atom feed
From: Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: dev@dpdk.org, thomas@monjalon.net, ocardona@microsoft.com,
	haramakr@linux.microsoft.com, pallavi.kadam@intel.com,
	ranjit.menon@intel.com, dmitrym@microsoft.com,
	Narcisa Vasile <navasile@microsoft.com>,
	Harini Ramakrishnan <Harini.Ramakrishnan@microsoft.com>
Subject: Re: [dpdk-dev] [PATCH v2] windows/netuio: add Windows NetUIO kernel driver
Date: Wed, 9 Sep 2020 11:53:53 -0700	[thread overview]
Message-ID: <20200909185353.GA12124@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> (raw)
In-Reply-To: <20200824235344.5994cd13@sovereign>

On Mon, Aug 24, 2020 at 11:53:44PM +0300, Dmitry Kozlyuk wrote:
> On Thu, 20 Aug 2020 15:23:55 -0700, Narcisa Ana Maria Vasile wrote:
> > From: Narcisa Vasile <navasile@microsoft.com>
> > 
> > The Windows NetUIO kernel driver allows the DPDK userspace
> > application to directly access the hardware.
> > 
> > Cc: Harini Ramakrishnan <Harini.Ramakrishnan@microsoft.com>
> > Cc: Omar Cardona <ocardona@microsoft.com>
> > Signed-off-by: Narcisa Vasile <navasile@microsoft.com>
> > ---
> 
> Major questions:
> 
> 1. Does NetUIO still need to allocate and map a contiguous memory segment
> now, when DPDK has user-mode memory management?
> 
> 2. IOCTLs require to specify PCI address on each call. This is very
> inconvenient for DPDK consumers and also seems to serve no purpose.
> 
> 3. There is a need to document driver's design, preferably in commit message,
> specifically:
> 
> 3.1) DMA remapping capability in INF (AFAIK, vendors are notified);
> 3.2) manual BAR probing instead of using resource lists;
> 3.3) reason to use EvtIoInCallerContext and IO queues;
> 3.4) IOCTL format.
> 
> Also, I agree with everything Ranjit has noted already.
> 
> General suggestions to cleanup the code a bit. We can do it later if you
> wish. This also brings up the question, which code style should Windows
> kernel code for DPDK follow (off-topic for now).
> 
> * Remove boilerplate code and comments generated by VS wizard.
> * Place `_Use_decl_annotations` on definitions to make them simpler.
> * Limit line length, try using shorted variable names (e.g.
>   "netuio_contextdata" may be "context" or "ctx" with no loss).
> 

Thank you for you thorough review!

> More specific comments inline.
> 
> [snip]
> > +[Strings]
> > +SPSVCINST_ASSOCSERVICE= 0x00000002
> > +Intel = "Intel"
> > +Broadcom = "Broadcom Corporation"
> 
> IHVs are supposed to add this gradually.
> 

Thanks! I've modified the inf to remove all the vendor specific strings
but left the sections to avoid errors when generating the binary.

> > +ClassName = "Windows UIO"
> > +DiskName = "DPDK netUIO Installation Disk"
> > +netuio.DeviceDesc = "netuio Device"
> > +netuio.SVCDESC = "netuio Service"
> > +
> > +    // Build symbolic link name as <netuio_symbolic_link>_BDF  (bus/device/func)
> > +    CHAR  symbolic_link[64] = { 0 };
> > +    sprintf_s(symbolic_link, sizeof(symbolic_link), "%s_%04d%02d%02d",
> > +                            NETUIO_DEVICE_SYMBOLIC_LINK_ANSI, netuio_contextdata->addr.bus_num,
> > +                            netuio_contextdata->addr.dev_num, netuio_contextdata->addr.func_num);
> > +
> > +    ANSI_STRING ansi_symbolic_link;
> > +    RtlInitAnsiString(&ansi_symbolic_link, symbolic_link);
> > +
> > +    status = RtlAnsiStringToUnicodeString(&netuio_symbolic_link, &ansi_symbolic_link, TRUE);
> > +    if (!NT_SUCCESS(status))
> > +        return status;
> 
> Why not use Unicode directly?
> 
It looks like either way, a cast will be needed (for example, if I use wchar for symbolic_link and then
RtlInitUnicodeString()). I've left it as is, but let me know if there's an elegant solution that I didn't see.

> > +
> > +    status = WdfDeviceCreateSymbolicLink(device, &netuio_symbolic_link);
> > +
> > +    RtlFreeUnicodeString(&netuio_symbolic_link);
> > +
> > +    return status;

  reply	other threads:[~2020-09-09 18:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20 22:23 Narcisa Ana Maria Vasile
2020-08-21  1:32 ` Ranjit Menon
2020-09-09 18:58   ` Narcisa Ana Maria Vasile
2020-08-24 20:53 ` Dmitry Kozlyuk
2020-09-09 18:53   ` Narcisa Ana Maria Vasile [this message]
2020-09-13 21:39     ` Dmitry Kozlyuk
2020-09-09 18:41 ` [dpdk-dev] [PATCH v3] " Narcisa Ana Maria Vasile
2020-09-13 21:39   ` Dmitry Kozlyuk
2020-09-19  2:52   ` [dpdk-dev] [PATCH v4] " Narcisa Ana Maria Vasile
2020-09-22 21:25     ` Dmitry Kozlyuk
2020-09-22 21:36     ` Ranjit Menon
2020-10-01 22:55     ` [dpdk-dev] [PATCH v5] " Narcisa Ana Maria Vasile
2020-10-02 18:21       ` Ranjit Menon
2020-10-05 19:34         ` Narcisa Ana Maria Vasile
2020-10-14  9:29         ` Thomas Monjalon
2020-10-02 18:33       ` Dmitry Kozlyuk

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=20200909185353.GA12124@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net \
    --to=navasile@linux.microsoft.com \
    --cc=Harini.Ramakrishnan@microsoft.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=dmitrym@microsoft.com \
    --cc=haramakr@linux.microsoft.com \
    --cc=navasile@microsoft.com \
    --cc=ocardona@microsoft.com \
    --cc=pallavi.kadam@intel.com \
    --cc=ranjit.menon@intel.com \
    --cc=thomas@monjalon.net \
    /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;
as well as URLs for NNTP newsgroup(s).