mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Haiyang Zhang <haiyangz@microsoft.com>
To: Richard Genoud <richard.genoud@gmail.com>
Cc: KY Srinivasan <kys@microsoft.com>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: hv_netvsc: WARNING in softirq.c
Date: Wed, 6 Mar 2013 22:45:11 +0000	[thread overview]
Message-ID: <4147bb5a7cf547c19c6a5a6b459a957d@DFM-DB3MBX15-06.exchange.corp.microsoft.com> (raw)
In-Reply-To: <CACQ1gAgyYp+Dxmk-0C3zfKK+CkEwQX51NvWjzkV7=8GC3CD=Qg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]



> -----Original Message-----
> From: Richard Genoud [mailto:richard.genoud@gmail.com]
> Sent: Friday, March 01, 2013 3:39 AM
> To: Haiyang Zhang
> Cc: KY Srinivasan; devel@linuxdriverproject.org; netdev@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Subject: Re: hv_netvsc: WARNING in softirq.c
> 
> 2013/2/28 Haiyang Zhang <haiyangz@microsoft.com>:
> > We will look into this. And further info around the time will also be
> helpful.
> >
> > Thanks,
> > - Haiyang
> 
> The only thing the admin sys could think about is a rsync process
> between the windows host and ANOTHER linux guest that ends at 22h30
> more or less.
> (the other linux guest is a debian 6, without any HV driver)

I have found a simple way to reproduce this kind of warning:
1) reboot the VM (because this warning can be displayed only once.)
2) login to the host and open the VM [Settings]
3) Temporarily change the Network adapter's option [Virtual Switch] to "Not connected".
4) run dmesg, you should see the warning.

The reason for the warning is -- netif_tx_disable() is called when the NIC
is disconnected. And it's called within irq context. netif_tx_disable()
calls local_bh_enable() which displays warning if in irq.

The fix is to remove the unnecessary netif_tx_disable() in the netvsc_linkstatus_callback().
I attached a patch. Would you like to test it on your side as well?

Thanks,
- Haiyang


[-- Attachment #2: net_stat_warn_test.patch --]
[-- Type: application/octet-stream, Size: 562 bytes --]

diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 5f85205..8341b62 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -241,13 +241,11 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj,
 
 	if (status == 1) {
 		netif_carrier_on(net);
-		netif_wake_queue(net);
 		ndev_ctx = netdev_priv(net);
 		schedule_delayed_work(&ndev_ctx->dwork, 0);
 		schedule_delayed_work(&ndev_ctx->dwork, msecs_to_jiffies(20));
 	} else {
 		netif_carrier_off(net);
-		netif_tx_disable(net);
 	}
 }
 

  reply	other threads:[~2013-03-06 22:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-28  8:34 Richard GENOUD
2013-02-28 18:33 ` Haiyang Zhang
2013-03-01  8:39   ` Richard Genoud
2013-03-06 22:45     ` Haiyang Zhang [this message]
2013-03-07 10:12       ` Richard Genoud
2013-03-19  8:36         ` Richard Genoud
2013-04-05 10:59           ` Richard Genoud
2013-04-05 14:13             ` Haiyang Zhang

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=4147bb5a7cf547c19c6a5a6b459a957d@DFM-DB3MBX15-06.exchange.corp.microsoft.com \
    --to=haiyangz@microsoft.com \
    --cc=devel@linuxdriverproject.org \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richard.genoud@gmail.com \
    /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®