RE: [PATCH net] net: mana: Fix race of mana_hwc_post_rx_wqe and new hwc response

2024-08-21 Thread Long Li
posting of rx wqe before complete(&ctx->comp_event). > > Cc: sta...@vger.kernel.org > Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network > Adapter (MANA)") > Signed-off-by: Haiyang Zhang Reviewed-by: Long Li > --- > .../net/ethe

RE: [PATCH net] net: mana: Fix RX buf alloc_size alignment and atomic op panic

2024-08-10 Thread Long Li
__napi_poll+0x138/0x250 > net_rx_action+0x148/0x330 > handle_softirqs+0x12c/0x3a0 > > Cc: sta...@vger.kernel.org > Fixes: 80f6215b450e ("net: mana: Add support for jumbo frame") > Signed-off-by: Haiyang Zhang Reviewed-by: Long Li > --- > drivers/net/ethernet

RE: [PATCH v2 net] net: mana: Fix doorbell out of order violation and avoid unnecessary doorbell rings

2024-08-09 Thread Long Li
> Subject: Re: [PATCH v2 net] net: mana: Fix doorbell out of order violation and > avoid unnecessary doorbell rings > > On Wed, Aug 07, 2024 at 04:17:06PM -0700, lon...@linuxonhyperv.com > wrote: > > From: Long Li > > > > After napi_complete_done() is c

RE: [PATCH v2 net] net: mana: Fix doorbell out of order violation and avoid unnecessary doorbell rings

2024-08-08 Thread Long Li
> Subject: Re: [PATCH v2 net] net: mana: Fix doorbell out of order violation and > avoid unnecessary doorbell rings > > On Wed, 7 Aug 2024 16:17:06 -0700 lon...@linuxonhyperv.com wrote: > > Cc: sta...@vger.kernel.org > > Fixes: e1b5683ff62e ("net: mana: Move NAPI from EQ to CQ") > > > > Reviewed-

RE: [PATCH v2 net] net: mana: Fix doorbell out of order violation and avoid unnecessary doorbell rings

2024-08-08 Thread Long Li
> > + if (w < cq->budget) { > > + mana_gd_ring_cq(gdma_queue, SET_ARM_BIT); > > + cq->work_done_since_doorbell = 0; > > + napi_complete_done(&cq->napi, w); > > + } else if (cq->work_done_since_doorbell > > > + cq->gdma_cq->queue_size / COMP_ENTRY_SIZE

RE: [PATCH net] net: mana: Fix doorbell out of order violation and avoid unnecessary doorbell rings

2024-08-07 Thread Long Li
> Subject: RE: [PATCH net] net: mana: Fix doorbell out of order violation and > avoid > unnecessary doorbell rings > > > From: lon...@linuxonhyperv.com > > Sent: Monday, August 5, 2024 4:38 PM > > [...] > > After napi_complete_done() is called, another NAPI may be running on > > another CPU and

RE: [PATCH net] net: mana: Fix doorbell out of order violation and avoid unnecessary doorbell rings

2024-08-07 Thread Long Li
> Subject: Re: [PATCH net] net: mana: Fix doorbell out of order violation and > avoid > unnecessary doorbell rings > > 在 2024/8/6 7:38, lon...@linuxonhyperv.com 写道: > > From: Long Li > > > > After napi_complete_done() is called, another NAPI may be runnin

RE: [PATCH v3 5/7] tools: hv: Add new fcopy application based on uio driver

2024-04-03 Thread Long Li
emon.c which this > new > application is replacing. > > Signed-off-by: Saurabh Sengar Reviewed-by: Long Li > --- > [V3] > - Restricted Makefile to x86. > > [V2] > - Improve commit message. > - Change (4 * 4096) to 0x4000 for ring buffer size > - Removed som

RE: [PATCH v2 5/7] tools: hv: Add new fcopy application based on uio driver

2024-03-21 Thread Long Li
> Subject: [PATCH v2 5/7] tools: hv: Add new fcopy application based on uio > driver > > New fcopy application using uio_hv_generic driver. This application copies > file > from Hyper-V host to guest VM. > > A big part of this code is copied from tools/hv/hv_fcopy_daemon.c which this > new > a

RE: [PATCH 6/6] Drivers: hv: Remove fcopy driver

2024-03-13 Thread Long Li
> Subject: [PATCH 6/6] Drivers: hv: Remove fcopy driver > > As the new fcopy driver using uio is introduced, remove obsolete driver and > application. > > Signed-off-by: Saurabh Sengar Reviewed-by: Long Li

RE: [PATCH 5/6] tools: hv: Add new fcopy application based on uio driver

2024-03-13 Thread Long Li
> + /* Signal host */ > + if ((write(fcopy_fd, &tmp, sizeof(int))) != > sizeof(int)) { > + ret = errno; > + syslog(LOG_ERR, "Registration failed: %s\n", > strerror(ret)); "Signaling failed" is a better

RE: [PATCH 4/6] tools: hv: Add vmbus_bufring

2024-03-13 Thread Long Li
> + > +#define rte_compiler_barrier() ({ asm volatile ("" : : : "memory"); }) > + > +#define rte_smp_rwmb() ({ asm volatile ("" : : : > "memory"); }) > + > +#define VMBUS_RQST_ERROR 0x > +#define ALIGN(val, align)((typeof(val))((val) & (~((typeof(val))((a

RE: [PATCH v2 1/1] x86/hyperv: Use Hyper-V entropy to seed guest random number generator

2024-03-13 Thread Long Li
f988bf86f141af91ab2d7cd011db47%7C1 > %7C0%7C638454341537898325%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4 > wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C > %7C&sdata=jluLa8BFJ0wxQ1m0jcuKQO9t%2FdFVFSsfHiiSLoJviAo%3D&reserved= > 0 > > Signed-off-by: Michael Kell

RE: [PATCH v2 1/1] x86/hyperv: Use Hyper-V entropy to seed guest random number generator

2024-03-12 Thread Long Li
> +void __init ms_hyperv_late_init(void) > +{ > + struct acpi_table_header *header; > + acpi_status status; > + u8 *randomdata; > + u32 length, i; > + > + /* > +* Seed the Linux random number generator with entropy provided by > +* the Hyper-V host in A

RE: [PATCH 3/6] uio_hv_generic: Enable interrupt for low speed VMBus devices

2024-03-12 Thread Long Li
his existing Hyper-V generic UIO driver, so that a user space > driver > can handle the device. Since these new synthetic devices are low speed > devices, > they don't support monitor bits and we must use vmbus_setevent() to enable > interrupts from the host. > >

RE: [PATCH 1/6] Drivers: hv: vmbus: Add utility function for querying ring size

2024-03-12 Thread Long Li
> Subject: [PATCH 1/6] Drivers: hv: vmbus: Add utility function for querying > ring size > > Add a function to query for the preferred ring buffer size of VMBus device. Patch looks good to me. It will be helpful if you can document the ring sizes for each device and put it in the comment. (e.g

RE: [PATCH v3 1/1] PCI: hv: Fix ring buffer size calculation

2024-02-16 Thread Long Li
> @@ -49,6 +49,7 @@ > #include > #include > #include > +#include > #include > > /* > @@ -465,7 +466,7 @@ struct pci_eject_response { > u32 status; > } __packed; > > -static int pci_ring_size = (4 * PAGE_SIZE); > +static int pci_ring_size = VMBUS_RING_SIZE(SZ_16K); > > /* > * Driver specific state. > -- > 2.25.1 > Reviewed-by: Long Li

RE: [Patch v4 0/3] Register with RDMA SOC interface and support for CQ

2023-12-18 Thread Long Li
> Subject: Re: [Patch v4 0/3] Register with RDMA SOC interface and support for > CQ > > On Fri, Dec 15, 2023 at 06:04:12PM -0800, lon...@linuxonhyperv.com wrote: > > From: Long Li > > > > This patchset add support for registering a RDMA device with SoC for

RE: [PATCH] net: mana: add msix index sharing between EQs

2023-12-11 Thread Long Li
> @@ -502,12 +512,19 @@ static void mana_gd_deregiser_irq(struct gdma_queue > *queue) > if (WARN_ON(msix_index >= gc->num_msix_usable)) > return; > > - gic = &gc->irq_contexts[msix_index]; > - gic->handler = NULL; > - gic->arg = NULL; > - > spin_lock_irqsave(&

RE: [Patch v2 3/3] RDMA/mana_ib: Add CQ interrupt support for RAW QP

2023-12-11 Thread Long Li
> Hi Long Li, > > some minor feedback from my side. > > ... > > > diff --git a/drivers/infiniband/hw/mana/qp.c > > b/drivers/infiniband/hw/mana/qp.c index 4667b18ec1dd..186d9829bb93 > > 100644 > > --- a/drivers/infiniband/hw/mana/qp.c > > +++

RE: [PATCH net-next v4] hv_netvsc: Mark VF as slave before exposing it to user-mode

2023-11-20 Thread Long Li
gt; > counted there were six different tools claiming to be the "one network > > device manager to rule them all". And that doesn't include all the > > custom scripts and vendor appliances. > > To be clear, I thought Long Li was saying that the goal is work around

RE: [PATCH net-next v4] hv_netvsc: Mark VF as slave before exposing it to user-mode

2023-11-09 Thread Long Li
> Subject: Re: [PATCH net-next v4] hv_netvsc: Mark VF as slave before exposing > it > to user-mode > > On Wed, 8 Nov 2023 14:56:52 -0800 lon...@linuxonhyperv.com wrote: > > From: Long Li > > > > When a VF is being exposed form the kernel, it should be marked

RE: [Patch v2] hv_netvsc: Mark VF as slave before exposing it to user-mode

2023-10-30 Thread Long Li
> Subject: Re: [Patch v2] hv_netvsc: Mark VF as slave before exposing it to > user- > mode > > On Fri, 27 Oct 2023 13:59:50 -0700 lon...@linuxonhyperv.com wrote: > > When a VF is being exposed form the kernel, it should be marked as "slave" > > before exposing to the user-mode. The VF is not usab

RE: [Patch v7 1/5] RDMA/mana_ib: Rename all mana_ib_dev type variables to mib_dev

2023-10-27 Thread Long Li
> Subject: Re: [Patch v7 1/5] RDMA/mana_ib: Rename all mana_ib_dev type > variables to mib_dev > > On Mon, Oct 16, 2023 at 03:11:58PM -0700, > sharmaa...@linuxonhyperv.com wrote: > > From: Ajay Sharma > > > > This patch does not introduce any functional changes. It creates > > naming convention t

RE: [Patch v7 2/5] RDMA/mana_ib: Register Mana IB device with Management SW

2023-10-27 Thread Long Li
> Subject: Re: [Patch v7 2/5] RDMA/mana_ib: Register Mana IB device with > Management SW > > On Mon, Oct 16, 2023 at 03:11:59PM -0700, > sharmaa...@linuxonhyperv.com wrote: > > > diff --git a/drivers/infiniband/hw/mana/device.c > > b/drivers/infiniband/hw/mana/device.c > > index 083f27246ba8..ea4

RE: [EXTERNAL] Re: [Patch v7 5/5] RDMA/mana_ib: Send event to qp

2023-10-27 Thread Long Li
> Subject: RE: [EXTERNAL] Re: [Patch v7 5/5] RDMA/mana_ib: Send event to qp > > > > -Original Message- > > From: Jason Gunthorpe > > Sent: Monday, October 23, 2023 11:24 AM > > To: sharmaa...@linuxonhyperv.com > > Cc: Long Li ; Leon Romanovs

RE: [PATCH] hv_netvsc: Mark VF as slave before exposing it to user-mode

2023-10-26 Thread Long Li
> Subject: Re: [PATCH] hv_netvsc: Mark VF as slave before exposing it to > user-mode > > On Wed, 25 Oct 2023 15:50:50 -0700 > lon...@linuxonhyperv.com wrote: > > > @@ -2347,6 +2342,12 @@ static int netvsc_register_vf(struct net_device > *vf_netdev) > > if (!ndev) > > return NOTIF

RE: [PATCH] hv_netvsc: Mark VF as slave before exposing it to user-mode

2023-10-26 Thread Long Li
> Subject: Re: [PATCH] hv_netvsc: Mark VF as slave before exposing it to > user-mode > > On Wed, 25 Oct 2023 15:50:50 -0700 > lon...@linuxonhyperv.com wrote: > > > list_for_each_entry(ndev_ctx, &netvsc_dev_list, list) { > > ndev = hv_get_drvdata(ndev_ctx->device_ctx); > > -

RE: [EXTERNAL] Re: [Patch v5 0/5] RDMA/mana_ib

2023-10-17 Thread Long Li
> > > We are discussing RDMA side of this series. > > > > Thanks > > > > > > > > > Thanks > > > > > > > > > > > > > > Thanks > > > > > > > > > > > -Original Message- > > > > > &g

RE: [PATCH v4 09/15] Drivers: hv: Introduce hv_output_arg_exists in hv_common.c

2023-10-06 Thread Long Li
> Subject: Re: [PATCH v4 09/15] Drivers: hv: Introduce hv_output_arg_exists in > hv_common.c > > On 10/2/2023 12:29 PM, Alex Ionescu wrote: > > Hi Nuno, > > > > Is it possible to simply change to always allocating the output page? > > For example, the output page could be needed in scenarios where