[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC Patch 07/12] IXGBEVF: Add new mail box event for migra
From: |
Lan Tianyu |
Subject: |
[Qemu-devel] [RFC Patch 07/12] IXGBEVF: Add new mail box event for migration |
Date: |
Thu, 22 Oct 2015 00:37:39 +0800 |
VF status in the PF driver needs to be restored after migration and reset
VF hardware. This patch is to add a new event for VF driver to notify PF
driver to restore status.
Signed-off-by: Lan Tianyu <address@hidden>
---
drivers/net/ethernet/intel/ixgbevf/mbx.h | 3 +++
drivers/net/ethernet/intel/ixgbevf/vf.c | 10 ++++++++++
drivers/net/ethernet/intel/ixgbevf/vf.h | 1 +
3 files changed, 14 insertions(+)
diff --git a/drivers/net/ethernet/intel/ixgbevf/mbx.h
b/drivers/net/ethernet/intel/ixgbevf/mbx.h
index 82f44e0..22761d8 100644
--- a/drivers/net/ethernet/intel/ixgbevf/mbx.h
+++ b/drivers/net/ethernet/intel/ixgbevf/mbx.h
@@ -112,6 +112,9 @@ enum ixgbe_pfvf_api_rev {
#define IXGBE_VF_GET_RETA 0x0a /* VF request for RETA */
#define IXGBE_VF_GET_RSS_KEY 0x0b /* get RSS hash key */
+/* mail box event for live migration */
+#define IXGBE_VF_NOTIFY_RESUME 0x0c /* VF notify PF migration to restore
status */
+
/* length of permanent address message returned from PF */
#define IXGBE_VF_PERMADDR_MSG_LEN 4
/* word in permanent address message with the current multicast type */
diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.c
b/drivers/net/ethernet/intel/ixgbevf/vf.c
index d1339b0..1e4e5e6 100644
--- a/drivers/net/ethernet/intel/ixgbevf/vf.c
+++ b/drivers/net/ethernet/intel/ixgbevf/vf.c
@@ -717,6 +717,15 @@ int ixgbevf_get_queues(struct ixgbe_hw *hw, unsigned int
*num_tcs,
return err;
}
+static void ixgbevf_notify_resume_vf(struct ixgbe_hw *hw)
+{
+ struct ixgbe_mbx_info *mbx = &hw->mbx;
+ u32 msgbuf[1];
+
+ msgbuf[0] = IXGBE_VF_NOTIFY_RESUME;
+ mbx->ops.write_posted(hw, msgbuf, 1);
+}
+
static const struct ixgbe_mac_operations ixgbevf_mac_ops = {
.init_hw = ixgbevf_init_hw_vf,
.reset_hw = ixgbevf_reset_hw_vf,
@@ -729,6 +738,7 @@ static const struct ixgbe_mac_operations ixgbevf_mac_ops = {
.update_mc_addr_list = ixgbevf_update_mc_addr_list_vf,
.set_uc_addr = ixgbevf_set_uc_addr_vf,
.set_vfta = ixgbevf_set_vfta_vf,
+ .notify_resume = ixgbevf_notify_resume_vf,
};
const struct ixgbevf_info ixgbevf_82599_vf_info = {
diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.h
b/drivers/net/ethernet/intel/ixgbevf/vf.h
index 6a3f4eb..a25fe81 100644
--- a/drivers/net/ethernet/intel/ixgbevf/vf.h
+++ b/drivers/net/ethernet/intel/ixgbevf/vf.h
@@ -70,6 +70,7 @@ struct ixgbe_mac_operations {
s32 (*disable_mc)(struct ixgbe_hw *);
s32 (*clear_vfta)(struct ixgbe_hw *);
s32 (*set_vfta)(struct ixgbe_hw *, u32, u32, bool);
+ void (*notify_resume)(struct ixgbe_hw *);
};
enum ixgbe_mac_type {
--
1.8.4.rc0.1.g8f6a3e5.dirty
- Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC, (continued)
[Qemu-devel] [RFC Patch 12/12] IXGBEVF: Track dma dirty pages, Lan Tianyu, 2015/10/21
[Qemu-devel] [RFC Patch 07/12] IXGBEVF: Add new mail box event for migration,
Lan Tianyu <=
[Qemu-devel] [RFC Patch 06/12] IXGBEVF: Add self emulation layer, Lan Tianyu, 2015/10/22
[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