From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Greg Rose <gregory.v.rose@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 08/10] ixgbevf: Fix statistics corruption
Date: Sat, 19 Jan 2013 05:14:57 -0800 [thread overview]
Message-ID: <1358601299-10404-9-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1358601299-10404-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Greg Rose <gregory.v.rose@intel.com>
When the physical function (PF) is reset for any reason the statistics
collection in ixgbevf_update_stats needs to wait to update until after
the reset synchronization ensures that the PF driver is up and running
and is finished with its own reset. Go ahead and clear the link flag to
indicate this when the control message from the PF is received. The
reset synchronization and recovery in the watchdog task will eventually
set the link flag up when the PF has resumed.
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 3fbf0d2..551e31d 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -762,9 +762,11 @@ static irqreturn_t ixgbevf_msix_other(int irq, void *data)
if (!hw->mbx.ops.check_for_msg(hw)) {
hw->mbx.ops.read(hw, &msg, 1);
- if ((msg & IXGBE_MBVFICR_VFREQ_MASK) == IXGBE_PF_CONTROL_MSG)
+ if ((msg & IXGBE_MBVFICR_VFREQ_MASK) == IXGBE_PF_CONTROL_MSG) {
mod_timer(&adapter->watchdog_timer,
round_jiffies(jiffies + 1));
+ adapter->link_up = false;
+ }
if (msg & IXGBE_VT_MSGTYPE_NACK)
dev_info(&pdev->dev,
@@ -2118,6 +2120,9 @@ void ixgbevf_update_stats(struct ixgbevf_adapter *adapter)
struct ixgbe_hw *hw = &adapter->hw;
int i;
+ if (!adapter->link_up)
+ return;
+
UPDATE_VF_COUNTER_32bit(IXGBE_VFGPRC, adapter->stats.last_vfgprc,
adapter->stats.vfgprc);
UPDATE_VF_COUNTER_32bit(IXGBE_VFGPTC, adapter->stats.last_vfgptc,
--
1.7.11.7
next prev parent reply other threads:[~2013-01-19 13:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-19 13:14 [net-next 00/10][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-01-19 13:14 ` [net-next 01/10] ixgbe: SR-IOV: dynamic IEEE DCBx default priority changes Jeff Kirsher
2013-01-19 13:14 ` [net-next 02/10] ixgbe: Make TSO check for CHECKSUM_PARTIAL to avoid skb_is_gso check Jeff Kirsher
2013-01-19 13:14 ` [net-next 03/10] ixgbe: Always use context 0, even for FCoE and TSO Jeff Kirsher
2013-01-19 13:14 ` [net-next 04/10] ixgbe: Update ixgbe Tx flags to improve code efficiency Jeff Kirsher
2013-01-19 13:14 ` [net-next 05/10] ixgbe: Improve performance and reduce size of ixgbe_tx_map Jeff Kirsher
2013-01-19 13:14 ` [net-next 06/10] ixgbevf: Synch out of tree and in tree mailbox interrupt handlers Jeff Kirsher
2013-01-19 13:14 ` [net-next 07/10] ixgbevf: Fix link up messages Jeff Kirsher
2013-01-19 13:14 ` Jeff Kirsher [this message]
2013-01-19 13:14 ` [net-next 09/10] igb: Replace rmb in Tx cleanup with read_barrier_depends Jeff Kirsher
2013-01-19 13:14 ` [net-next 10/10] igb: Copyright string update to year 2013 Jeff Kirsher
2013-01-19 15:53 ` [net-next 00/10][pull request] Intel Wired LAN Driver Updates David Miller
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=1358601299-10404-9-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=gregory.v.rose@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.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;
as well as URLs for NNTP newsgroup(s).