Re: [PATCH] isdn: hysdn: fix code style error from checkpatch

2019-08-02 Thread Stephen Hemminger
On Fri, 2 Aug 2019 19:50:17 + Ricardo Bruno Lopes da Silva wrote: > Fix error bellow from checkpatch. > > WARNING: Block comments use * on subsequent lines > +/*** > + > > Signed-off-by: Ricardo Bruno Lopes da Silva Read the TODO,

Re: [PATCH] isdn: hysdn: Fix error spaces around '*'

2019-08-02 Thread Stephen Hemminger
On Fri, 2 Aug 2019 19:56:02 + Jose Carlos Cazarin Filho wrote: > Fix checkpath error: > CHECK: spaces preferred around that '*' (ctx:WxV) > +extern hysdn_card *card_root;/* pointer to first card */ > > Signed-off-by: Jose Carlos Cazarin Filho Read the TODO, these drivers are

Re: [PATCH 0/3] pci-hyperv: fix memory leak and add pci_destroy_slot()

2019-03-05 Thread Stephen Hemminger
/pci/controller/pci-hyperv.c | 23 +++ > 1 file changed, 23 insertions(+) Thanks for fixing this. Reviewed-by: Stephen Hemminger ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

RE: [PATCH V3 1/10] X86/Hyper-V: Add parameter offset for hyperv_fill_flush_guest_mapping_list()

2019-02-22 Thread Stephen Hemminger
int hyperv_fill_flush_guest_mapping_list( struct hv_guest_mapping_flush_list *flush, - u64 start_gfn, u64 pages) + int offset, u64 start_gfn, u64 pages) { u64 cur = start_gfn; u64 additional_pages; - int gpa_n = 0; + int

Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

2019-02-14 Thread Stephen Hemminger
On Thu, 14 Feb 2019 01:11:03 -0500 Kimberly Brown wrote: > On Mon, Feb 11, 2019 at 10:02:47AM -0800, Stephen Hemminger wrote: > > On Mon, 11 Feb 2019 02:01:18 -0500 > > Kimberly Brown wrote: > > > > > On Fri, Feb 08, 2019 at 02:32:09PM -0800, Stephen Hemminger

Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

2019-02-11 Thread Stephen Hemminger
On Mon, 11 Feb 2019 02:01:18 -0500 Kimberly Brown wrote: > On Fri, Feb 08, 2019 at 02:32:09PM -0800, Stephen Hemminger wrote: > > On Fri, 8 Feb 2019 05:01:12 -0500 > > Kimberly Brown wrote: > > > > You are right, the current behavior is broken. > > It w

Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

2019-02-08 Thread Stephen Hemminger
On Fri, 8 Feb 2019 05:01:12 -0500 Kimberly Brown wrote: You are right, the current behavior is broken. It would be good to add a description of under what conditions monitor is not used. Is this some part of a project emulating Hyper-V? > + > + if

Re: [PATCH 1/2] Drivers: hv: vmbus: Change server monitor_pages index to 0

2019-02-08 Thread Stephen Hemminger
[0])); > } > static DEVICE_ATTR_RO(server_monitor_pending); Looks good. I wonder if ever gets used though since it returned incorrect data... Acked-by: Stephen Hemminger ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] PCI: hv: Add hv_pci_remove_slots() when we unload the driver

2019-02-07 Thread Stephen Hemminger
I: hv: support reporting serial number as slot > information") > Signed-off-by: Dexuan Cui > Cc: sta...@vger.kernel.org > Cc: Stephen Hemminger Acked-by: Stephen Hemminger ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v3] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-17 Thread Stephen Hemminger
> +static ssize_t channel_intr_in_full_show(const struct vmbus_channel > *channel, > + char *buf) > +{ > + return sprintf(buf, "%llu\n", channel->intr_in_full); > +} intr_in_full is u64, which is not the same as unsigned long long. to be correct you

Re: [PATCH] Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

2018-12-17 Thread Stephen Hemminger
On Mon, 17 Dec 2018 18:44:12 + Dexuan Cui wrote: > > From: devel On Behalf Of > > Dexuan Cui > > Sent: Monday, December 17, 2018 10:31 AM > > > From: Stephen Hemminger > > > > > > The old code was risky because it would silently retu

Re: [PATCH] Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

2018-12-17 Thread Stephen Hemminger
On Mon, 17 Dec 2018 18:00:29 + Dexuan Cui wrote: > > From: Stephen Hemminger > > On Thu, 13 Dec 2018 16:35:43 + > > Dexuan Cui wrote: > > > > > Before 98f4c651762c, we returned zeros for unopened channels. > > > With 98f4c651762c, w

Re: [PATCH] Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

2018-12-17 Thread Stephen Hemminger
ngbuffer bus attributes to dev_groups") > Cc: sta...@vger.kernel.org > Cc: K. Y. Srinivasan > Cc: Haiyang Zhang > Cc: Stephen Hemminger > Signed-off-by: Dexuan Cui The concept looks fine, but maybe it would be simpler to move it into hv_ringbuffer_get_debuginfo and have it retur

[PATCH] uio_hv_generic: set callbacks on open

2018-12-10 Thread Stephen Hemminger
) Reported-by: Mohammed Gamal Signed-off-by: Stephen Hemminger --- drivers/uio/uio_hv_generic.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c index c2493d011225..3c5169eb23f5 100644 --- a/drivers/uio/uio_hv_gener

[PATCH] vmbus: fix subchannel removal

2018-12-07 Thread Stephen Hemminger
is processed. Fixes: ae6935ed7d42 ("vmbus: split ring buffer allocation from open") Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index fe00b12e4417..be

[PATCH] hyperv: replace mutex_is_locked with lockdep

2018-12-07 Thread Stephen Hemminger
lockdep_assert_held is better at checking for locking requirements since it doesn't get confused if someone else is holding the mutex. Inspired by changes in network drivers by Lance Roy. Signed-off-by: Stephen Hemminger --- drivers/hv/channel_mgmt.c | 2 +- drivers/hv/connection.c | 2 +- 2

Re: [PATCH V2 3/4] vmbus: add per-channel sysfs info

2018-10-18 Thread Stephen Hemminger
On Thu, 18 Oct 2018 15:32:35 + Michael Kelley wrote: > From Olaf Hering Sent: Thursday, October 18, 2018 8:20 AM > > > > > This extends existing vmbus related sysfs structure to provide per-channel > > > state information. This is useful when diagnosing issues with multiple > > > queues

Re: [PATCH V2 3/4] vmbus: add per-channel sysfs info

2018-10-18 Thread Stephen Hemminger
On Thu, 18 Oct 2018 17:19:53 +0200 Olaf Hering wrote: > Am Sun, 17 Sep 2017 20:54:18 -0700 > schrieb k...@exchange.microsoft.com: > > > This extends existing vmbus related sysfs structure to provide per-channel > > state information. This is useful when diagnosing issues with multiple > >

Re: [PATCH net-next, v3] hv_netvsc: fix vf serial matching with pci slot info

2018-10-15 Thread Stephen Hemminger
th synthetic > NIC. > > Fixes: 00d7ddba1143 ("hv_netvsc: pair VF based on serial number") > Reported-by: Vitaly Kuznetsov > Signed-off-by: Haiyang Zhang Reviewed-by: Stephen Hemminger ___ devel mailing list de...@linuxdriverproject.

Re: [PATCH net-next, v2] hv_netvsc: fix vf serial matching with pci slot info

2018-10-12 Thread Stephen Hemminger
On Fri, 12 Oct 2018 20:55:15 + Haiyang Zhang wrote: Thanks for fixing this. > + if (kstrtou32(kobject_name(>slot->kobj), 10, )) { > + netdev_notice(vf_netdev, "Invalid vf serial:%s\n", > + pdev->slot->kobj.name); > + return NULL; > +

Re: [PATCH] hv_netvsc: Make sure out channel is fully opened on send

2018-09-27 Thread Stephen Hemminger
On Thu, 27 Sep 2018 10:57:05 +0200 Mohammed Gamal wrote: > On Wed, 2018-09-26 at 17:13 +, Haiyang Zhang wrote: > > > -Original Message- > > > From: Mohammed Gamal > > > Sent: Wednesday, September 26, 2018 12:34 PM > > > To: Stephen Hemminger ;

Re: [PATCH net-next] hv_netvsc: fix return type of ndo_start_xmit function

2018-09-26 Thread Stephen Hemminger
On Wed, 26 Sep 2018 18:25:10 +0800 YueHaibing wrote: > The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', > which is a typedef for an enum type, so make sure the implementation in > this driver has returns 'netdev_tx_t' value, and change the function > return type to

Re: [PATCH net-next, v2, 1/3] hv_netvsc: Add support for LRO/RSC in the vSwitch

2018-09-21 Thread Stephen Hemminger
On Fri, 21 Sep 2018 18:51:54 + Haiyang Zhang wrote: > > -Original Message- > > From: Stephen Hemminger > > Sent: Friday, September 21, 2018 2:37 PM > > To: Haiyang Zhang > > Cc: Haiyang Zhang ; da...@davemloft.net; > > net...@vger.k

Re: [PATCH net-next, v2, 1/3] hv_netvsc: Add support for LRO/RSC in the vSwitch

2018-09-21 Thread Stephen Hemminger
On Fri, 21 Sep 2018 18:20:35 + Haiyang Zhang wrote: Overall, this looks good. Some minor suggestions. > +struct nvsc_rsc { > + const struct ndis_pkt_8021q_info *vlan; > + const struct ndis_tcp_ip_checksum_info *csum_info; > + u8 is_last; /* last RNDIS msg in a vmtransfer_page */

Re: [PATCH net-next, 1/3] hv_netvsc: Add support for LRO/RSC in the vSwitch

2018-09-20 Thread Stephen Hemminger
On Thu, 20 Sep 2018 20:56:46 + Haiyang Zhang wrote: > > -Original Message- > > From: Stephen Hemminger > > Sent: Thursday, September 20, 2018 4:48 PM > > To: Haiyang Zhang > > Cc: Haiyang Zhang ; da...@davemloft.net; > > net...@vger.k

Re: [PATCH net-next, 1/3] hv_netvsc: Add support for LRO/RSC in the vSwitch

2018-09-20 Thread Stephen Hemminger
On Thu, 20 Sep 2018 17:06:59 + Haiyang Zhang wrote: > +static inline void rsc_add_data > + (struct netvsc_channel *nvchan, > + const struct ndis_pkt_8021q_info *vlan, > + const struct ndis_tcp_ip_checksum_info *csum_info, > + void *data, u32 len) > +{ Could this be

Re: [PATCH v2 0/2] hv_netvsc: associate VF and PV device by serial number

2018-09-20 Thread Stephen Hemminger
On Thu, 20 Sep 2018 15:18:20 +0100 Lorenzo Pieralisi wrote: > On Fri, Sep 14, 2018 at 12:54:55PM -0700, Stephen Hemminger wrote: > > The Hyper-V implementation of PCI controller has concept of 32 bit serial > > number > > (not to be confused with PCI-E serial number)

Re: [PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function

2018-09-20 Thread Stephen Hemminger
On Thu, 20 Sep 2018 20:33:01 +0800 YueHaibing wrote: > The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', > which is a typedef for an enum type, so make sure the implementation in > this driver has returns 'netdev_tx_t' value, and change the function > return type to

[PATCH v2 1/2] PCI: hv: support reporting serial number as slot information

2018-09-14 Thread Stephen Hemminger
sing GPU's. But the PCI slot infrastructure will handle that. This has a side effect which may also be useful. The common udev network device naming policy uses the slot information (rather than PCI address). Signed-off-by: Stephen Hemminger --- drivers/pci/controller/pci-hyp

[PATCH v2 2/2] hv_netvsc: pair VF based on serial number

2018-09-14 Thread Stephen Hemminger
Matching network device based on MAC address is problematic since a non VF network device can be creted with a duplicate MAC address causing confusion and problems. The VMBus API does provide a serial number that is a better matching method. Signed-off-by: Stephen Hemminger --- drivers/net

[PATCH v2 0/2] hv_netvsc: associate VF and PV device by serial number

2018-09-14 Thread Stephen Hemminger
together here for better review. The PCI changes were submitted previously, but the main review comment was "why do you need this?". This is why. v2 - slot name can be shorter. remove locking when creating pci_slots; see comment for explaination Stephen Hemminger (2): PCI: h

[PATCH v3 2/6] vmbus: keep pointer to ring buffer page

2018-09-14 Thread Stephen Hemminger
Avoid going from struct page to virt address (and back) by just keeping pointer to the allocated pages instead of virt address. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 20 +--- drivers/uio/uio_hv_generic.c | 5 +++-- include/linux/hyperv.h | 2

[PATCH v3 1/6] vmbus: pass channel to hv_process_channel_removal

2018-09-14 Thread Stephen Hemminger
Rather than passing relid and then looking up the channel. Pass the channel directly, since caller already knows it. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 3 +-- drivers/hv/channel_mgmt.c | 17 + drivers/hv/vmbus_drv.c| 3 +-- include/linux

[PATCH v3 0/6] fix hv_uio_generic open/close

2018-09-14 Thread Stephen Hemminger
be backported as a fix, to 4.19 but that is not an LTS so probably not worth it. v3 - fix typo (sent wrong version for v2) v2 - fix refcount when hv_uio_open fails Stephen Hemminger (6): vmbus: pass channel to hv_process_channel_removal vmbus: keep pointer to ring buffer page vmbus: split

[PATCH v3 3/6] vmbus: split ring buffer allocation from open

2018-09-14 Thread Stephen Hemminger
application restarts. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 267 ++- drivers/hv/ring_buffer.c | 1 + include/linux/hyperv.h | 9 ++ 3 files changed, 162 insertions(+), 115 deletions(-) diff --git a/drivers/hv/channel.c b/drivers/hv

[PATCH v3 5/6] hv_uio_generic: map ringbuffer phys addr

2018-09-14 Thread Stephen Hemminger
The ring buffer is contiguous IOVA and is mapped via phys addr for sysfs file. Use same method for the UIO mapping. Signed-off-by: Stephen Hemminger --- drivers/uio/uio_hv_generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/uio/uio_hv_generic.c b/drivers

[PATCH v3 6/6] uio_hv_generic: defer opening vmbus until first use

2018-09-14 Thread Stephen Hemminger
because the vmbus channel was persistent. Change the semantics so that the buffers are allocated on probe, but not attached to host until device is opened. Signed-off-by: Stephen Hemminger --- drivers/uio/uio_hv_generic.c | 104 +-- 1 file changed, 74 insertions

[PATCH v3 4/6] uio: introduce UIO_MEM_IOVA

2018-09-14 Thread Stephen Hemminger
Introduce the concept of mapping physical memory locations that are normal memory. The new type UIO_MEM_IOVA are similar to existing UIO_MEM_PHYS but the backing memory is not marked as uncached. Also, indent related switch to the currently used style. Signed-off-by: Stephen Hemminger

[PATCH 5/6] hv_uio_generic: map ringbuffer phys addr

2018-09-14 Thread Stephen Hemminger
The ring buffer is contiguous IOVA and is mapped via phys addr for sysfs file. Use same method for the UIO mapping. Signed-off-by: Stephen Hemminger --- drivers/uio/uio_hv_generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/uio/uio_hv_generic.c b/drivers

[PATCH 2/6] vmbus: keep pointer to ring buffer page

2018-09-14 Thread Stephen Hemminger
Avoid going from struct page to virt address (and back) by just keeping pointer to the allocated pages instead of virt address. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 20 +--- drivers/uio/uio_hv_generic.c | 5 +++-- include/linux/hyperv.h | 2

[PATCH 1/6] vmbus: pass channel to hv_process_channel_removal

2018-09-14 Thread Stephen Hemminger
Rather than passing relid and then looking up the channel. Pass the channel directly, since caller already knows it. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 3 +-- drivers/hv/channel_mgmt.c | 17 + drivers/hv/vmbus_drv.c| 3 +-- include/linux

[PATCH 6/6] uio_hv_generic: defer opening vmbus until first use

2018-09-14 Thread Stephen Hemminger
because the vmbus channel was persistent. Change the semantics so that the buffers are allocated on probe, but not attached to host until device is opened. Signed-off-by: Stephen Hemminger --- drivers/uio/uio_hv_generic.c | 104 +-- 1 file changed, 74 insertions

[PATCH 4/6] uio: introduce UIO_MEM_IOVA

2018-09-14 Thread Stephen Hemminger
Introduce the concept of mapping physical memory locations that are normal memory. The new type UIO_MEM_IOVA are similar to existing UIO_MEM_PHYS but the backing memory is not marked as uncached. Also, indent related switch to the currently used style. Signed-off-by: Stephen Hemminger

[PATCH 3/6] vmbus: split ring buffer allocation from open

2018-09-14 Thread Stephen Hemminger
application restarts. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 267 ++- drivers/hv/ring_buffer.c | 1 + include/linux/hyperv.h | 9 ++ 3 files changed, 162 insertions(+), 115 deletions(-) diff --git a/drivers/hv/channel.c b/drivers/hv

[PATCH 4/6] uio: introduce UIO_MEM_IOVA

2018-09-13 Thread Stephen Hemminger
Introduce the concept of mapping physical memory locations that are normal memory. The new type UIO_MEM_IOVA are similar to existing UIO_MEM_PHYS but the backing memory is not marked as uncached. Also, indent related switch to the currently used style. Signed-off-by: Stephen Hemminger

[PATCH 6/6] uio_hv_generic: defer opening vmbus until first use

2018-09-13 Thread Stephen Hemminger
because the vmbus channel was persistent. Change the semantics so that the buffers are allocated on probe, but not attached to host until device is opened. Signed-off-by: Stephen Hemminger --- drivers/uio/uio_hv_generic.c | 102 --- 1 file changed, 72 insertions

[PATCH 0/6] fix Hyper-V uio restart

2018-09-13 Thread Stephen Hemminger
be backported as a fix, to 4.19 but that is not an LTS so probably not worth it. Stephen Hemminger (6): vmbus: pass channel to hv_process_channel_removal vmbus: keep pointer to ring buffer page vmbus: split ring buffer allocation from open uio: introduce UIO_MEM_IOVA hv_uio_generic: map

[PATCH 3/6] vmbus: split ring buffer allocation from open

2018-09-13 Thread Stephen Hemminger
application restarts. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 267 ++- drivers/hv/ring_buffer.c | 1 + include/linux/hyperv.h | 9 ++ 3 files changed, 162 insertions(+), 115 deletions(-) diff --git a/drivers/hv/channel.c b/drivers/hv

[PATCH 2/6] vmbus: keep pointer to ring buffer page

2018-09-13 Thread Stephen Hemminger
Avoid going from struct page to virt address (and back) by just keeping pointer to the allocated pages instead of virt address. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 20 +--- drivers/uio/uio_hv_generic.c | 5 +++-- include/linux/hyperv.h | 2

[PATCH 1/6] vmbus: pass channel to hv_process_channel_removal

2018-09-13 Thread Stephen Hemminger
Rather than passing relid and then looking up the channel. Pass the channel directly, since caller already knows it. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 3 +-- drivers/hv/channel_mgmt.c | 17 + drivers/hv/vmbus_drv.c| 3 +-- include/linux

[PATCH 5/6] hv_uio_generic: map ringbuffer phys addr

2018-09-13 Thread Stephen Hemminger
The ring buffer is contiguous IOVA and is mapped via phys addr for sysfs file. Use same method for the UIO mapping. Signed-off-by: Stephen Hemminger --- drivers/uio/uio_hv_generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/uio/uio_hv_generic.c b/drivers

Re: yield() and cond_resched() do not yield to another thread

2018-09-05 Thread Stephen Hemminger
On Tue, 4 Sep 2018 21:16:07 +0800 fei phung wrote: > Hi everyone, > > I am working on https://github.com/promach/riffa/tree/full_duplex > > While I modifying the linux driver, I faced some issue using yield(). > > Why riffa_driver.c yield() function >

Re: yield() and cond_resched() do not yield to another thread

2018-09-05 Thread Stephen Hemminger
On Tue, 4 Sep 2018 21:16:07 +0800 fei phung wrote: > Hi everyone, > > I am working on https://github.com/promach/riffa/tree/full_duplex > > While I modifying the linux driver, I faced some issue using yield(). > > Why riffa_driver.c yield() function >

[PATCH net-next 1/2] PCI: hv: support reporting serial number as slot information

2018-08-29 Thread Stephen Hemminger
names for VF devices. It does not break applications or startup because the VF device must never be configured directly. Signed-off-by: Stephen Hemminger --- drivers/pci/controller/pci-hyperv.c | 30 + 1 file changed, 30 insertions(+) diff --git a/drivers/pci/controller/pci

[PATCH net-next 2/2] hv_netvsc: pair VF based on serial number

2018-08-29 Thread Stephen Hemminger
Matching network device based on MAC address is problematic since a non-VF network device can be created with a duplicate MAC address causing confusion and problems. The VMBus API provides a serial number that is a better matching method. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv

[PATCH net-next 0/2] hv_netvsc: associate VF and PV device by serial number

2018-08-29 Thread Stephen Hemminger
together here for better review. The PCI changes were submitted previously, but the main review comment was "why do you need this?". This is why. Stephen Hemminger (2): PCI: hv: support reporting serial number as slot information hv_netvsc: pair VF based on serial number drivers/

Re: [PATCH] hv/netvsc: Fix NULL dereference at single queue mode fallback

2018-08-14 Thread Stephen Hemminger
> mode") > Cc: > Signed-off-by: Takashi Iwai Reviewed-by: Stephen Hemminger ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 2/5] vmbus: add driver_override support

2018-08-14 Thread Stephen Hemminger
On Mon, 13 Aug 2018 19:30:50 + "Michael Kelley (EOSG)" wrote: > > +/* > > + * Return a matching hv_vmbus_device_id pointer. > > + * If there is no match, return NULL. > > + */ > > +static const struct hv_vmbus_device_id *hv_vmbus_get_id(struct hv_driver > > *drv, > > +

Re: [PATCH 2/5] vmbus: add driver_override support

2018-08-13 Thread Stephen Hemminger
On Mon, 13 Aug 2018 19:30:50 + "Michael Kelley (EOSG)" wrote: > From: k...@linuxonhyperv.com Sent: Friday, August > 10, 2018 4:06 PM > > > From: Stephen Hemminger > > > > Add support for overriding the default driver for a VMBus device > >

[PATCH] vmbus: don't return values for uninitalized channels

2018-08-13 Thread Stephen Hemminger
For unsupported device types, the vmbus channel ringbuffer is never initialized, and therefore reading the sysfs files will return garbage or cause a kernel OOPS. Fixes: c2e5df616e1a ("vmbus: add per-channel sysfs info") Signed-off-by: Stephen Hemminger --- drivers/hv/vmbus_drv.c

[PATCH] uio_hv_generic: drop #ifdef DEBUG

2018-08-09 Thread Stephen Hemminger
DEBUG is leftover from the development phase, remove it. Signed-off-by: Stephen Hemminger --- drivers/uio/uio_hv_generic.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c index 9e7d622b4326..a08860260f55 100644 --- a/drivers/uio

[PATCH] uio_hv_generic: increase size of receive and send buffers

2018-08-09 Thread Stephen Hemminger
a smaller piece of it. Signed-off-by: Stephen Hemminger --- drivers/uio/uio_hv_generic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c index e401be8321ab..9e7d622b4326 100644 --- a/drivers/uio/uio_hv_generic.c +++ b

[PATCH v2] vmbus: add driver_override support

2018-08-08 Thread Stephen Hemminger
/driverctl Signed-off-by: Stephen Hemminger --- v2 - no changes since last version. this patch seems to have gotten lost. driver development list really needs to start using patchwork! Documentation/ABI/testing/sysfs-bus-vmbus | 21 drivers/hv/vmbus_drv.c| 115

Re: [PATCH v4 net-next] hv_netvsc: Add per-cpu ethtool stats for netvsc

2018-07-30 Thread Stephen Hemminger
see any clean solution. > > Currently and in foreseeable short term, Hyper-V doesn't support > cpu hot-plug. Plus, ethtool is for admin use. Unlikely the admin > would perform such combo operations. > > Signed-off-by: Yidong Ren Reviewed-by: Stephen Hemminger

Re: [RFC PATCH v4] Xilinx AXI-Stream FIFO v4.1 IP core driver

2018-07-22 Thread Stephen Hemminger
On Sat, 21 Jul 2018 20:14:55 -0400 Jacob Feder wrote: > diff --git a/drivers/staging/axis-fifo/Kconfig > b/drivers/staging/axis-fifo/Kconfig > new file mode 100644 > index 000..77d5701 > --- /dev/null > +++ b/drivers/staging/axis-fifo/Kconfig > @@ -0,0 +1,9 @@ > +# > +# "Xilinx AXI-Stream

[PATCH] uio: add SPDX license tags

2018-07-21 Thread Stephen Hemminger
For those without any license text present or short reference to GPL, add SPDX tag. Signed-off-by: Stephen Hemminger --- drivers/uio/uio_cif.c | 4 +--- drivers/uio/uio_fsl_elbc_gpcm.c | 1 + drivers/uio/uio_hv_generic.c| 4 +--- drivers/uio/uio_netx.c | 3 +-- drivers

[PATCH v2] vmbus: add numa_node to sysfs

2018-07-20 Thread Stephen Hemminger
Being able to find the numa_node for a device is useful for userspace drivers (DPDK) and also for diagnosing performance issues. This makes vmbus similar to pci. Signed-off-by: Stephen Hemminger --- v2 - add sysfs doc Documentation/ABI/stable/sysfs-bus-vmbus | 7 +++ drivers/hv

[PATCH] vmbus: add numa_node to sysfs

2018-07-20 Thread Stephen Hemminger
Having the numa_node for a device is useful for userspace drivers (ie DPDK) and also for diagnosing performance issues. This makes vmbus similar to pci. Signed-off-by: Stephen Hemminger --- drivers/hv/vmbus_drv.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/hv

Re: [RFC PATCH v3] Xilinx AXI-Stream FIFO v4.1 IP core driver

2018-07-20 Thread Stephen Hemminger
On Thu, 19 Jul 2018 21:45:31 -0400 Jacob Feder wrote: > First I run "make menuconfig" and select my driver in "device drivers" > > "staging". If I run "make" or "make all" or > "make drivers/staging/axis-fifo" everything compiles without errors or > warnings even if I put blatant syntax errors

Re: [RFC PATCH v3] Xilinx AXI-Stream FIFO v4.1 IP core driver

2018-07-19 Thread Stephen Hemminger
On Thu, 19 Jul 2018 13:16:57 +0300 Dan Carpenter wrote: > I'm getting some compile warnings where we us %u instead of %lu for > size_t. > > We also need a README explaining what else needs to be done before this > can be moved out of staging into the normal part of the kernel. Use %zu to print

Re: [RFC PATCH v3] Xilinx AXI-Stream FIFO v4.1 IP core driver

2018-07-19 Thread Stephen Hemminger
On Wed, 18 Jul 2018 22:46:34 -0400 Jacob Feder wrote: > +MODULE_DESCRIPTION("Xilinx AXI-Stream FIFO v4.1 IP core driver\n\n" > +"This IP core has read and write AXI-Stream FIFOs, the contents of which > can\n" > +"be accessed from the AXI4 memory-mapped interface. This is useful for\n" >

Re: [bug report] netvsc: use ERR_PTR to avoid dereference issues

2018-07-10 Thread Stephen Hemminger
On Tue, 3 Jul 2018 15:01:42 +0300 Dan Carpenter wrote: > Hello stephen hemminger, > > The patch 9749fed5d43d: "netvsc: use ERR_PTR to avoid dereference > issues" from Jul 19, 2017, leads to the following static checker > warning: > > drivers

Re: [PATCH net] hv_netvsc: Fix napi reschedule while receive completion is busy

2018-07-09 Thread Stephen Hemminger
On Mon, 9 Jul 2018 16:43:19 + Haiyang Zhang wrote: > From: Haiyang Zhang > > If out ring is full temporarily and receive completion cannot go out, > we may still need to reschedule napi if other conditions are met. > Otherwise the napi poll might be stopped forever, and cause network >

Re: [PATCH net] hv_netvsc: Fix napi reschedule while receive completion is busy

2018-07-09 Thread Stephen Hemminger
On Mon, 9 Jul 2018 16:43:19 + Haiyang Zhang wrote: > From: Haiyang Zhang > > If out ring is full temporarily and receive completion cannot go out, > we may still need to reschedule napi if other conditions are met. > Otherwise the napi poll might be stopped forever, and cause network >

Re: Incomplete fix for be9c798 / 7b2ee50 hv_netvsc: common detach logic?

2018-06-19 Thread Stephen Hemminger
about bisecting which landed on: > > > > commit be9c798d0d13ae609a91177323ac816545c39d28 > > Author: Stephen Hemminger > > Date: Mon May 14 15:32:18 2018 -0700 > > > > hv_netvsc: common detach logic > > > > [ Commit 7b2ee50c0cd513a176a26a71f2989facdd75bfea upstream. ] >

Re: Incomplete fix for be9c798 / 7b2ee50 hv_netvsc: common detach logic?

2018-06-19 Thread Stephen Hemminger
about bisecting which landed on: > > > > commit be9c798d0d13ae609a91177323ac816545c39d28 > > Author: Stephen Hemminger > > Date: Mon May 14 15:32:18 2018 -0700 > > > > hv_netvsc: common detach logic > > > > [ Commit 7b2ee50c0cd513a176a26a71f2989facdd75bfea upstream. ] >

Re: [PATCH v2] hv_netvsc: Add per-cpu ethtool stats for netvsc

2018-06-13 Thread Stephen Hemminger
On Wed, 13 Jun 2018 22:03:34 + Yidong Ren wrote: > > From: devel On Behalf > > Of Stephen Hemminger > > > +/* statistics per queue (rx/tx packets/bytes) */ #define > > > +NETVSC_PCPU_STATS_LEN (num_present_cpus() * > > ARRAY_SIZE(pcpu_stats)) >

Re: [PATCH v2] hv_netvsc: Add per-cpu ethtool stats for netvsc

2018-06-13 Thread Stephen Hemminger
On Wed, 13 Jun 2018 12:36:08 -0700 Yidong Ren wrote: > From: Yidong Ren > > This patch implements following ethtool stats fields for netvsc: > cpu_tx/rx_packets/bytes > cpu_vf_tx/rx_packets/bytes > > Corresponding per-cpu counters exist in current code. Exposing these > counters will help

[PATCH] hv: add driver_override support

2018-06-12 Thread Stephen Hemminger
/driverctl When using devices with DPDK it is useful to be able to use this tool instead of manual bind/unbind. Signed-off-by: Stephen Hemminger --- Resend of patch, that seems to have gotten lost. Documentation/ABI/testing/sysfs-bus-vmbus | 6 ++ drivers/hv/vmbus_drv.c

Re: [PATCH net 2/3] hv_netvsc: fix network namespace issues with VF support

2018-06-12 Thread Stephen Hemminger
On Tue, 12 Jun 2018 12:51:28 +0300 Dan Carpenter wrote: > On Mon, Jun 11, 2018 at 12:44:55PM -0700, Stephen Hemminger wrote: > > When finding the parent netvsc device, the search needs to be across > > all netvsc device instances (independent of network namespace). > > &

[PATCH net 2/3] hv_netvsc: fix network namespace issues with VF support

2018-06-11 Thread Stephen Hemminger
Signed-off-by: Stephen Hemminger netns aware byref --- drivers/net/hyperv/hyperv_net.h | 2 ++ drivers/net/hyperv/netvsc_drv.c | 43 +++-- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_n

[PATCH net 3/3] hv_netvsc: move VF to same namespace as netvsc device

2018-06-11 Thread Stephen Hemminger
. The user can move it later (if desired). Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 8cb21e013d1d

[PATCH net 1/3] hv_netvsc: drop common code until callback model fixed

2018-06-11 Thread Stephen Hemminger
. This reverts commit 9c6ffbacdb57 ("hv_netvsc: fix error return code in netvsc_probe()") and commit 1ff78076d8dd ("netvsc: refactor notifier/event handling code to use the failover framework") Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/Kconfig | 1 - drivers/net

[PATCH net 0/3] hv_netvsc: notification and namespace fixes

2018-06-11 Thread Stephen Hemminger
This set of patches addresses two set of fixes. First it backs out the common callback model which was merged in net-next without completing all the review feedback or getting maintainer approval. Then it fixes the transparent VF management code to handle network namespaces. Stephen Hemminger (3

Re: [PATCH] hv_netvsc: Add per-cpu ethtool stats for netvsc

2018-06-06 Thread Stephen Hemminger
On Wed, 6 Jun 2018 15:27:00 -0700 Yidong Ren wrote: > From: Yidong Ren > > This patch implements following ethtool stats fields for netvsc: > cpu_tx/rx_packets/bytes > cpu_vf_tx/rx_packets/bytes > > Corresponding per-cpu counters exist in current code. Exposing these > counters will help

[PATCH 1/3] PCI: hv: remove unused reason for refcount handler

2018-05-23 Thread Stephen Hemminger
The get/put functions were taking a reason code. This appears to be a debug infrastructure that is no longer used. Move the functions to start of file to eliminate need for forward declaration. Forward declarations are discouraged on Linux. Signed-off-by: Stephen Hemminger <st

[PATCH 3/3] PCI: hv: use list_for_each_entry

2018-05-23 Thread Stephen Hemminger
There are several places where list_for_each_entry could be used to simplify the code. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- drivers/pci/host/pci-hyperv.c | 27 +++ 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/drivers/pci/ho

[PATCH 2/3] PCI: hv: convert remove_lock to refcount

2018-05-23 Thread Stephen Hemminger
Use refcount instead of atomic for the reference counting on bus. Refcount is safer because it handles overflow correctly. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- drivers/pci/host/pci-hyperv.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 0/3] PCI: hv: cleanup patches

2018-05-23 Thread Stephen Hemminger
These are minor code cleanups found while reviewing and implementing other things in Hyper-V PCI host driver. Stephen Hemminger (3): PCI: hv: remove unused reason for refcount handler PCI: hv: convert remove_lock to refcount PCI: hv: use list_for_each_entry drivers/pci/host/pci-hyperv.c

Re: [PATCH v2] Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic

2018-05-18 Thread Stephen Hemminger
On Fri, 18 May 2018 19:09:10 + Sunil Muthuswamy wrote: > > +/* > + * Boolean to control whether to report panic messages over Hyper-V. > + * > + * It can be set via /proc/sys/kernel/hyperv/record_panic_msg > + */ > +int sysctl_record_panic_msg = 1; > + Looks good,

Re: [PATCH 1/1] scsi: storvsc: Avoid allocating memory for temp cpumasks

2018-05-17 Thread Stephen Hemminger
memory allocation. > > Signed-off-by: Michael Kelley <mikel...@microsoft.com> Acked-by: Stephen Hemminger <sthem...@microsoft.com> ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 1/1] Drivers: hv: vmbus: enable VMBus protocol version 5.0

2018-05-14 Thread Stephen Hemminger
On Mon, 14 May 2018 18:14:15 + Dexuan Cui <de...@microsoft.com> wrote: > > From: devel <driverdev-devel-boun...@linuxdriverproject.org> On Behalf Of > > Stephen Hemminger > > Sent: Sunday, May 13, 2018 10:24 > > > ... > > > @@ -372,6 +400,18 @

Re: [PATCH 1/1] Drivers: hv: vmbus: enable VMBus protocol version 5.0

2018-05-13 Thread Stephen Hemminger
On Sat, 12 May 2018 02:30:33 -0700 k...@linuxonhyperv.com wrote: > int vmbus_post_msg(void *buffer, size_t buflen, bool can_sleep) > { > + struct vmbus_channel_message_header *hdr; > union hv_connection_id conn_id; > int ret = 0; > int retries = 0; > u32 usec = 1; >

Re: [PATCH v2] hv_netvsc: Fix net device attach on older Windows hosts

2018-05-09 Thread Stephen Hemminger
add(struct > hv_device *dev, > rndis_device->link_state ? "down" : "up"); > > if (net_device->nvsp_version < NVSP_PROTOCOL_VERSION_5) > - return net_device; > + goto

Re: [PATCH] hv_netvsc: Fix net device attach on older Windows hosts

2018-05-08 Thread Stephen Hemminger
On Tue, 08 May 2018 20:17:51 +0200 Mohammed Gamal <mga...@redhat.com> wrote: > On Tue, 2018-05-08 at 11:13 -0700, Stephen Hemminger wrote: > > On Tue,  8 May 2018 19:40:47 +0200 > > Mohammed Gamal <mga...@redhat.com> wrote: > > > > > On older windows

Re: [PATCH] Drivers: hv: vmbus: enable VMBus protocol version 5.0

2018-05-08 Thread Stephen Hemminger
On Tue, 8 May 2018 22:26:21 + Dexuan Cui wrote: > --- a/drivers/hv/connection.c > +++ b/drivers/hv/connection.c > @@ -63,6 +63,9 @@ static __u32 vmbus_get_next_version(__u32 current_version) > case (VERSION_WIN10): > return VERSION_WIN8_1; > > +

Re: [PATCH] hv_netvsc: Fix net device attach on older Windows hosts

2018-05-08 Thread Stephen Hemminger
On Tue, 8 May 2018 19:40:47 +0200 Mohammed Gamal wrote: > On older windows hosts the net_device instance is returned to > the caller of rndis_filter_device_add() without having the presence > bit set first. This would cause any subsequent calls to network device > operations

[PATCH] doc: fix sysfs ABI documentation

2018-05-01 Thread Stephen Hemminger
ake sysfs names consistent with PCI") Reported-by: Michael Kelley <mikel...@microsoft.com> Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- Documentation/ABI/stable/sysfs-bus-vmbus | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git

Re: [Patch v2] Storvsc: Select channel based on available percentage of ring buffer to write

2018-04-20 Thread Stephen Hemminger
S=8192 (default > value when CONFIG_MAXSMP=y). Don't use kernel stack for it by pre-allocating > them using kmalloc when channels are first initialized. > > Signed-off-by: Long Li <lon...@microsoft.com> Reviewed-by: Stephen Hemminger <sthem...@microsoft.com> _

[PATCH v2 2/4] uio_hv_generic: make ring buffer attribute for primary channel

2018-04-16 Thread Stephen Hemminger
The primary channel also needs a ring buffer attribute. This allows application to check if kernel supports uio sub channels, and also makes all channels use consistent API. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- drivers/uio/uio_hv_generic.c | 5 + 1 file chan

  1   2   3   4   5   6   >