[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC Patch 11/12] IXGBEVF: Migrate VF statistic data
From: |
Lan Tianyu |
Subject: |
[Qemu-devel] [RFC Patch 11/12] IXGBEVF: Migrate VF statistic data |
Date: |
Thu, 22 Oct 2015 00:37:43 +0800 |
VF statistic regs are read-only and can't be migrated via writing back
directly.
Currently, statistic data returned to user space by the driver is not equal
to value of statistic regs. VF driver records value of statistic regs as base
data
when net interface is up or open, calculate increased count of regs during
last period of online service and added it to saved_reset data. When user
space collects statistic data, VF driver returns result of
"current - base + saved_reset". "Current" is reg value at that point.
Restoring net function after migration just likes net interface is up or open.
Call existed function to update base and saved_reset data to keep statistic
data continual during migration.
Signed-off-by: Lan Tianyu <address@hidden>
---
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 04b6ce7..d22160f 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -3005,6 +3005,7 @@ int ixgbevf_live_mg(struct ixgbevf_adapter *adapter)
return 0;
del_timer_sync(&adapter->service_timer);
+ ixgbevf_update_stats(adapter);
pr_info("migration start\n");
migration_status = MIGRATION_IN_PROGRESS;
@@ -3017,6 +3018,8 @@ int ixgbevf_live_mg(struct ixgbevf_adapter *adapter)
return 1;
ixgbevf_restore_state(adapter);
+ ixgbevf_save_reset_stats(adapter);
+ ixgbevf_init_last_counter_stats(adapter);
migration_status = MIGRATION_COMPLETED;
pr_info("migration end\n");
return 0;
--
1.8.4.rc0.1.g8f6a3e5.dirty
- Re: [Qemu-devel] [RFC Patch 06/12] IXGBEVF: Add self emulation layer, (continued)
[Qemu-devel] [RFC Patch 05/12] IXGBE: Add new sysfs interface of "notify_vf", Lan Tianyu, 2015/10/22
- Re: [Qemu-devel] [RFC Patch 05/12] IXGBE: Add new sysfs interface of "notify_vf", Alexander Duyck, 2015/10/21
- Re: [Qemu-devel] [RFC Patch 05/12] IXGBE: Add new sysfs interface of "notify_vf", Michael S. Tsirkin, 2015/10/22
- Re: [Qemu-devel] [RFC Patch 05/12] IXGBE: Add new sysfs interface of "notify_vf", Lan, Tianyu, 2015/10/24
- Re: [Qemu-devel] [RFC Patch 05/12] IXGBE: Add new sysfs interface of "notify_vf", Alexander Duyck, 2015/10/25
- Re: [Qemu-devel] [RFC Patch 05/12] IXGBE: Add new sysfs interface of "notify_vf", Lan, Tianyu, 2015/10/25
[Qemu-devel] [RFC Patch 04/12] IXGBE: Add ixgbe_ping_vf() to notify a specified VF via mailbox msg., Lan Tianyu, 2015/10/22
[Qemu-devel] [RFC Patch 11/12] IXGBEVF: Migrate VF statistic data,
Lan Tianyu <=
[Qemu-devel] [RFC Patch 10/12] IXGBEVF: Add lock to protect tx/rx ring operation, Lan Tianyu, 2015/10/22
Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC, Michael S. Tsirkin, 2015/10/22
Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC, Alexander Duyck, 2015/10/23