[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

[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
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 0/6] fix Hyper-V uio restart

2018-09-14 Thread Stephen Hemminger
backported as a fix, to 4.19 but that is not an LTS so probably not worth it. v2 - add refcount unwind in hv_uio_generic open in case of error Stephen Hemminger (6): vmbus: pass channel to hv_process_channel_removal vmbus: keep pointer to ring buffer page vmbus: split ring buffer allocation

[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 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 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 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 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
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 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 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 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/controll

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 netdev_tx_

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). This

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 changed

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, 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, 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] 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 netdev_tx_

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, 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(&pdev->slot->kobj), 10, &serial)) { > + netdev_notice(vf_netdev, "Invalid vf serial:%s\n", > + pdev->slot->kobj.name); > + retur

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

2018-10-15 Thread Stephen Hemminger
paired with 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...@linuxdriv

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 > > queues

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 in

[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

[PATCH] vmbus: fix subchannel removal

2018-12-07 Thread Stephen Hemminger
nd 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 fe00b12e441

[PATCH] uio_hv_generic: set callbacks on open

2018-12-10 Thread Stephen Hemminger
eported-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

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

2018-12-17 Thread Stephen Hemminger
ringbuffer 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 ret

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
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 return

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 nee

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

2019-02-07 Thread Stephen Hemminger
("PCI: 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 1/2] Drivers: hv: vmbus: Change server monitor_pages index to 0

2019-02-08 Thread Stephen Hemminger
vmbus_connection.monitor_pages[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 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 (!hv_dev->channel->offermsg.monitor_allocat

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 woul

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 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 gpa_n

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] 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 sche

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, t

[PATCH net] netvsc: increase default receive buffer size

2017-09-14 Thread Stephen Hemminger
lling send/recv buffer size") Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index c538a4f15f3b..d4902ee5f260 100644 --- a/drivers/

Re: [PATCH net] netvsc: increase default receive buffer size

2017-09-14 Thread Stephen Hemminger
On Thu, 14 Sep 2017 10:02:03 -0700 (PDT) David Miller wrote: > From: Stephen Hemminger > Date: Thu, 14 Sep 2017 09:31:07 -0700 > > > The default receive buffer size was reduced by recent change > > to a value which was appropriate for 10G and Windows Server 2016. > >

Re: [PATCH 02/16] hyper-v: trace vmbus_on_message()

2017-10-03 Thread Stephen Hemminger
ed to save and record the > > message but will use a different function to output it to the trace. > > Oh, thanks! This seems to be useful for > vmbus_on_msg_dpc/vmbus_on_message only as all the rest needs to parse > different structures. Will use it in v2. > I just use

Re: [PATCH v2 16/16] hyper-v: trace vmbus_send_tl_connect_request()

2017-10-03 Thread Stephen Hemminger
I added an additional set of trace points for when channel gets notified or signals host. diff -urNp linux-msft/drivers/hv/channel.c msft-4.14-rc3/drivers/hv/channel.c --- linux-msft/drivers/hv/channel.c 2017-10-03 10:06:54.893209237 -0700 +++ msft-4.14-rc3/drivers/hv/channel.c 2017-10-03 10

[PATCH] vmbus: initialize reserved fields in messages

2017-10-04 Thread Stephen Hemminger
Make sure and initialize reserved fields in messages to host, rather than passing stack junk. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index efd5db743319..9f48f454bde0 100644 --- a

Re: [PATCH v3 00/17] Hyper-V: add tracing to VMBus module and trace messages/events

2017-10-05 Thread Stephen Hemminger
On Thu, 5 Oct 2017 16:50:27 +0200 Vitaly Kuznetsov wrote: > Changes since v2: > - Use DEFINE_EVENT in PATCH1/2 to avoid compile warnings [Stephen Hemminger] > - Add PATCH17 tracing channel events [Stephen Hemminger] > > Messages between guest and host are used in Hyper-V as c

Re: [PATCH 2/2] uio: Prefer MSI(X) interrupts in PCI drivers

2017-10-06 Thread Stephen Hemminger
On Fri, 6 Oct 2017 13:50:44 + "Stahl, Manuel" wrote: > MSI(X) interrupts are not shared between devices. So when available > those should be preferred over legacy interrupts. > > Signed-off-by: Manuel Stahl > --- >  drivers/uio/uio_pci_dmem_genirq.c | 27 --- >  drive

Re: [PATCH 2/2] uio: Prefer MSI(X) interrupts in PCI drivers

2017-10-24 Thread Stephen Hemminger
On Fri, 20 Oct 2017 14:50:44 +0200 "gre...@linuxfoundation.org" wrote: > On Fri, Oct 06, 2017 at 07:57:00AM -0700, Stephen Hemminger wrote: > > On Fri, 6 Oct 2017 13:50:44 + > > "Stahl, Manuel" wrote: > > > > > MSI(X) interrupts

Re: [PATCH net-next 1/4] hv_netvsc: netvsc_teardown_gpadl() split

2017-10-31 Thread Stephen Hemminger
On Tue, 31 Oct 2017 14:42:01 +0100 Vitaly Kuznetsov wrote: > It was found that in some cases host refuses to teardown GPADL for send/ > receive buffers (probably when some work with these buffere is scheduled or > ongoing). Change the teardown logic to be: > 1) Send NVSP_MSG1_TYPE_REVOKE_* messag

Re: [PATCH net-next 2/4] hv_netvsc: protect nvdev->extension with RCU

2017-10-31 Thread Stephen Hemminger
On Tue, 31 Oct 2017 14:42:02 +0100 Vitaly Kuznetsov wrote: > @@ -2002,7 +2002,9 @@ static int netvsc_probe(struct hv_device *dev, > device_info.recv_sections = NETVSC_DEFAULT_RX; > device_info.recv_section_size = NETVSC_RECV_SECTION_SIZE; > > + rtnl_lock(); > nvdev = rndis

Re: [PATCH net-next 3/4] hv_netvsc: reset net_device_ctx->nvdev with rcu_assign_pointer()

2017-10-31 Thread Stephen Hemminger
On Tue, 31 Oct 2017 07:09:58 -0700 Eric Dumazet wrote: > On Tue, 2017-10-31 at 14:42 +0100, Vitaly Kuznetsov wrote: > > RCU_INIT_POINTER() is not suitable here as it doesn't give us ordering > > guarantees (see the comment in rcupdate.h). This is also not a hotpath. > > > > Signed-off-by: Vitaly

Re: [PATCH 10/17] hyper-v: trace vmbus_open()

2017-10-31 Thread Stephen Hemminger
On Tue, 31 Oct 2017 13:48:00 +0100 Greg KH wrote: > On Mon, Oct 30, 2017 at 10:31:34AM -0400, Steven Rostedt wrote: > > On Mon, 30 Oct 2017 11:32:20 +0100 > > Greg KH wrote: > > > > > On Mon, Oct 30, 2017 at 11:07:01AM +0100, Vitaly Kuznetsov wrote: > > > > Greg KH writes: > > > > > >

[RFC] hv_netvsc: safer orderly shutdown

2017-11-09 Thread Stephen Hemminger
outstanding sends before informing host to halt. Also, check for successful restart of the device when after the change is done. For review, not tested on Hyper-V yet. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 40 ++- drivers

Re: [PATCH] drivers: hv: balloon: remove extraneous assignment to region_start

2017-11-09 Thread Stephen Hemminger
the > temporary variable region_start which can then be removed. Cleans > up the clang warning: > > drivers/hv/hv_balloon.c:976:3: warning: Value stored to 'region_start' > is never read > > Signed-off-by: Colin Ian King LGTM Acked-by: Stephen Hemminger ___

[PATCH net-next 0/2] retire IPX and Netware file system

2017-11-12 Thread Stephen Hemminger
Netware has bee dead for years. Time to deprecate IPX and the Novell file system. Stephen Hemminger (2): ipx: move Novell IPX protocol support into staging ncpfs: move net/ncpfs to drivers/staging/ncpfs MAINTAINERS| 5 ++--- drivers/staging/Kconfig

[PATCH net-next 2/2] ncpfs: move net/ncpfs to drivers/staging/ncpfs

2017-11-12 Thread Stephen Hemminger
The Netware Core Protocol is a file system that talks to Netware clients over IPX. Since IPX has been dead for many years move the file system into staging for eventual interment. Signed-off-by: Stephen Hemminger --- MAINTAINERS| 2 +- drivers/staging/Kconfig

[PATCH net-next 1/2] ipx: move Novell IPX protocol support into staging

2017-11-12 Thread Stephen Hemminger
The Netware IPX protocol is very old and no one should still be using it. It is time to move it into staging for a while and eventually decommision it. Note: net/ipx.h has to be kept around because bonding is still using it to decode IPX header for LAG. Signed-off-by: Stephen Hemminger

[PATCH net-next] decnet: move to staging

2017-11-12 Thread Stephen Hemminger
Support for Decnet has been orphaned for many years. In the interest of reducing the potential bug surface and pre-holiday cleaning, move the decnet protocol into staging for eventual removal. Signed-off-by: Stephen Hemminger --- MAINTAINERS | 2

Re: [PATCH] vmbus: unregister device_obj->channels_kset

2017-11-13 Thread Stephen Hemminger
t; to the hv_device's device.kobj. > > Signed-off-by: Dexuan Cui > Cc: Stephen Hemminger > Cc: K. Y. Srinivasan > --- Good catch Signed-off-by: Stephen Hemminger ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH net-next v2] net: move decnet to staging

2017-11-13 Thread Stephen Hemminger
Support for Decnet has been orphaned for some time. In the interest of reducing the potential bug surface and pre-holiday cleaning, move the decnet protocol into staging for eventual removal. Signed-off-by: Stephen Hemminger --- Note original submission was hour or so before net-next closed. Not

Re: [RFC] hv_netvsc: safer orderly shutdown

2017-11-13 Thread Stephen Hemminger
On Mon, 13 Nov 2017 11:57:47 +0100 Vitaly Kuznetsov wrote: > Stephen Hemminger writes: > > > > > The NAPI disable is already handled by rndis close. > > Sorry, but I'm probably missing something: I can only see > netif_napi_del() call in netvsc_device_remove

Re: [PATCH net] hv_netvsc: preserve hw_features on mtu/channels/ringparam changes

2017-11-14 Thread Stephen Hemminger
On Tue, 14 Nov 2017 16:22:05 +0100 Vitaly Kuznetsov wrote: Yes, this looks like a real issue. > + /* Query hardware capabilities if we're called from netvsc_probe() */ > + if (!net->hw_features) { > + ret = rndis_netdev_set_hwcaps(net_device, rndis_device); > +

[PATCH net-next v2 0/2] retire IPX and NCPFS

2017-11-14 Thread Stephen Hemminger
These are both old decrepit protocols that need to be sent to pasture. Stephen Hemminger (2): ipx: move Novell IPX protocol support into staging ncpfs: move net/ncpfs to drivers/staging/ncpfs MAINTAINERS| 5 ++--- drivers/staging/Kconfig

[PATCH net-next v2 1/2] ipx: move Novell IPX protocol support into staging

2017-11-14 Thread Stephen Hemminger
The Netware IPX protocol is very old and no one should still be using it. It is time to move it into staging for a while and eventually decommision it. Signed-off-by: Stephen Hemminger --- v2 add a TODO (don't touch me) file MAINTAINERS | 3 +-- dr

[PATCH net-next v2 2/2] ncpfs: move net/ncpfs to drivers/staging/ncpfs

2017-11-14 Thread Stephen Hemminger
The Netware Core Protocol is a file system that talks to Netware clients over IPX. Since IPX has been dead for many years move the file system into staging for eventual interment. Signed-off-by: Stephen Hemminger --- v2 add a TODO (don't touch me) file MAINTA

Re: [PATCH net-next v2 0/2] retire IPX and NCPFS

2017-11-15 Thread Stephen Hemminger
On Wed, 15 Nov 2017 09:58:33 +0900 (KST) David Miller wrote: > From: Stephen Hemminger > Date: Tue, 14 Nov 2017 08:37:13 -0800 > > > These are both old decrepit protocols that need to be sent > > to pasture. > > These need to go to gregkh and his staging/ tr

RE: [PATCH 2/2] vmbus: make hv_get_ringbuffer_availbytes local

2017-11-28 Thread Stephen Hemminger
This patch required a patch that is still going through net-next. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 1/2] vmbus: unregister device_obj->channels_kset

2017-11-28 Thread Stephen Hemminger
vice can't be thoroughly destroyed, because > > vmbus_device_register() -> kset_create_and_add() still holds a reference > > to the hv_device's device.kobj. > > > > Signed-off-by: Dexuan Cui > > Cc: Stephen Hemminger > > Cc: sta...@vger.kernel.org &

Re: [PATCH RFC 2/6] x86/hyper-v: add a function to read both TSC and TSC page value simulateneously

2017-12-01 Thread Stephen Hemminger
On Fri, 1 Dec 2017 14:13:17 +0100 Vitaly Kuznetsov wrote: > + > +static inline u64 hv_read_tsc_page_tsc(const struct ms_hyperv_tsc_page > *tsc_pg, > +u64 *cur_tsc) > +{ > + *cur_tsc = rdtsc(); > + > + return cur_tsc; Why do return and setting by refe

[PATCH net-next 0/6] hv_netvsc: minor optimizations

2017-12-01 Thread Stephen Hemminger
These are a set of local optimizations the Hyper-V networking driver. Also include a vmbus patch in this set, because it depends on the netvsc that last used that function. Stephen Hemminger (6): hv_netvsc: drop unused macros hv_netvsc: don't need local xmit_more hv_netvsc: replace d

[PATCH net-next 3/6] hv_netvsc: replace divide with mask when computing padding

2017-12-01 Thread Stephen Hemminger
Packet alignment is always a power of 2 therefore modulus can be replaced with a faster and operation Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c

[PATCH net-next 1/6] hv_netvsc: drop unused macros

2017-12-01 Thread Stephen Hemminger
Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 26 -- 1 file changed, 26 deletions(-) diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h index 88ddfb92122b..7226230561de 100644 --- a/drivers/net/hyperv/hyperv_net.h

[PATCH net-next 4/6] hv_netvsc: use reciprocal divide to speed up percent calculation

2017-12-01 Thread Stephen Hemminger
er of pages. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 6 +++--- drivers/net/hyperv/netvsc.c | 20 +++- drivers/net/hyperv/netvsc_drv.c | 17 + drivers/net/hyperv/rndis_filter.c | 4 ++-- 4 files changed, 21 insertions(+

[PATCH net-next 6/6] vmbus: make hv_get_ringbuffer_availbytes local

2017-12-01 Thread Stephen Hemminger
The last use of hv_get_ringbuffer_availbytes in drivers is now gone. Only used by the debug info routine so make it static. Also, add READ_ONCE() to avoid any possible issues with potentially volatile index values. Signed-off-by: Stephen Hemminger --- drivers/hv/ring_buffer.c | 23

[PATCH net-next 2/6] hv_netvsc: don't need local xmit_more

2017-12-01 Thread Stephen Hemminger
Since skb is always non-NULL in the copy portion of netvsc_send do not need local variable. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index

[PATCH net-next 5/6] hv_netvsc: optimize initialization of RNDIS header

2017-12-01 Thread Stephen Hemminger
pointer to per packet data (rather than the header) which simplifies use by code setting up the packet data. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 57 +++-- 1 file changed, 26 insertions(+), 31 deletions(-) diff --git a/drivers/net

[PATCH net 2/3] hv_netvsc: Limit the receive buffer size for legacy hosts

2017-12-07 Thread Stephen Hemminger
From: Haiyang Zhang Legacy hosts only allow 15 MB receive buffer, and we know the NVSP version only after negotiation. So, we put the limit in netvsc_init_buf(). Fixes: 5023a6db73196 ("netvsc: increase default receive buffer size") Signed-off-by: Haiyang Zhang Signed-off-by: Stephen

[PATCH net 3/3] hv_netvsc: Fix the default receive buffer size

2017-12-07 Thread Stephen Hemminger
From: Haiyang Zhang The intended size is 16 MB, and the default slot size is 1728. So, NETVSC_DEFAULT_RX should be 16*1024*1024 / 1728 = 9709. Fixes: 5023a6db73196 ("netvsc: increase default receive buffer size") Signed-off-by: Haiyang Zhang Signed-off-by: Stephen Hemminger --- d

[PATCH net 0/3] netvsc fix buffer size issues

2017-12-07 Thread Stephen Hemminger
The changes to allow setting buffer size can cause issues on older versions of Windows Server which have smaller limits. And the actual maximum value for WS2016 is 31M not 16M. This is a resend of patchset that didn't make it to netdev correctly. Haiyang Zhang (3): hv_netvsc: Correct the max re

[PATCH net 1/3] hv_netvsc: Correct the max receive buffer size

2017-12-07 Thread Stephen Hemminger
From: Haiyang Zhang It should be 31 MB on recent host versions. Signed-off-by: Haiyang Zhang Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv

Re: [PATCH] hyperv: make HYPERV a menuconfig to ease disabling it all

2017-12-09 Thread Stephen Hemminger
On Sat, 9 Dec 2017 16:21:51 +0100 Vincent Legoll wrote: > No need to get into the submenu to disable all HYPERV-related > config entries. > > This makes it easier to disable all HYPERV config options > without entering the submenu. It will also enable one > to see that en/dis-abled state from t

[PATCH net-next 0/2] hv_netvsc: Fix default and limit of recv buffe

2017-12-11 Thread Stephen Hemminger
The default for receive buffer descriptors is not correct, it should match the default receive buffer size and the upper limit of receive buffer size is too low. Also, for older versions of Window servers hosts, different lower limit check is necessary, otherwise the buffer request will be rejecte

[PATCH net-next 1/2] hv_netvsc: Fix the receive buffer size limit

2017-12-11 Thread Stephen Hemminger
on. So, we add the limit checking for legacy hosts in netvsc_init_buf(). Fixes: 5023a6db73196 ("netvsc: increase default receive buffer size") Signed-off-by: Haiyang Zhang Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 6 -- drivers/net/hyperv/netvsc.c |

[PATCH net-next 2/2] hv_netvsc: Fix the TX/RX buffer default sizes

2017-12-11 Thread Stephen Hemminger
Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 13 - drivers/net/hyperv/netvsc_drv.c | 4 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h index 373455f216ce..845ddc7bba46 10

[PATCH net-next 0/6] hv_netvsc: minor changes

2017-12-12 Thread Stephen Hemminger
. This has not been seen in the wild, found by inspection. The reference count between net device and internal RNDIS is not needed. Stephen Hemminger (6): hv_netvsc: copy_to_send buf can be void hv_netvsc: track memory allocation failures in ethtool stats hv_netvsc: simplify function args in

[PATCH net-next 1/6] hv_netvsc: copy_to_send buf can be void

2017-12-12 Thread Stephen Hemminger
Since only caller does not care about return value. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index e4bcd202a56a

[PATCH net-next 5/6] hv_netvsc: remove open_cnt reference count

2017-12-12 Thread Stephen Hemminger
There is only ever a single instance of network device object referencing the internal rndis object. Therefore the open_cnt atomic is not necessary. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 2 -- drivers/net/hyperv/netvsc.c | 2 +- drivers/net/hyperv

[PATCH net-next 3/6] hv_netvsc: simplify function args in receive status path

2017-12-12 Thread Stephen Hemminger
The caller (netvsc_receive) already has the net device pointer, and should just pass that to functions rather than the hyperv device. This eliminates several impossible error paths in the process. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 3 +-- drivers/net

  1   2   3   4   5   6   >