diff --git a/intel-i40e/centos/i40e-kmod.spec b/intel-i40e/centos/i40e-kmod.spec index 7665cb0..4aec808 100644 --- a/intel-i40e/centos/i40e-kmod.spec +++ b/intel-i40e/centos/i40e-kmod.spec @@ -23,7 +23,8 @@ Source0: %{kmod_name}-%{version}.tar.gz Source5: GPL-v2.0.txt Source11: modules-load.conf -Patch01: 0001-i40e-Enable-getting-link-status-from-VF.patch +Patch01: i40e-Enable-getting-link-status-from-VF.patch +Patch02: i40e-add-more-debug-info-for-VFs-still-in-reset.patch %define kversion %(rpm -q kernel%{?bt_ext}-devel | sort --version-sort | tail -1 | sed 's/kernel%{?bt_ext}-devel-//') diff --git a/intel-i40e/files/0001-i40e-Enable-getting-link-status-from-VF.patch b/intel-i40e/files/i40e-Enable-getting-link-status-from-VF.patch similarity index 94% rename from intel-i40e/files/0001-i40e-Enable-getting-link-status-from-VF.patch rename to intel-i40e/files/i40e-Enable-getting-link-status-from-VF.patch index 95f73a2..cf9107c 100644 --- a/intel-i40e/files/0001-i40e-Enable-getting-link-status-from-VF.patch +++ b/intel-i40e/files/i40e-Enable-getting-link-status-from-VF.patch @@ -8,16 +8,17 @@ virtual channel interface. Signed-off-by: Allain Legacy Signed-off-by: eric zhang +Signed-off-by: Jim Somerville --- src/i40e_virtchnl_pf.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/virtchnl.h | 1 + 2 files changed, 79 insertions(+) diff --git a/src/i40e_virtchnl_pf.c b/src/i40e_virtchnl_pf.c -index 8270b67..0eeaaca 100644 +index aba23f2..7081123 100644 --- a/src/i40e_virtchnl_pf.c +++ b/src/i40e_virtchnl_pf.c -@@ -1859,6 +1859,81 @@ error_param: +@@ -1857,6 +1857,81 @@ error_param: aq_ret); } @@ -99,7 +100,7 @@ index 8270b67..0eeaaca 100644 /** * i40e_vc_config_queues_msg * @vf: pointer to the VF info -@@ -2835,6 +2910,9 @@ int i40e_vc_process_vf_msg(struct i40e_pf *pf, s16 vf_id, u32 v_opcode, +@@ -2839,6 +2914,9 @@ int i40e_vc_process_vf_msg(struct i40e_pf *pf, s16 vf_id, u32 v_opcode, case VIRTCHNL_OP_REQUEST_QUEUES: ret = i40e_vc_request_queues_msg(vf, msg, msglen); break; @@ -110,7 +111,7 @@ index 8270b67..0eeaaca 100644 case VIRTCHNL_OP_UNKNOWN: default: diff --git a/src/virtchnl.h b/src/virtchnl.h -index 8cf91d4..ba64641 100644 +index c550261..950d24e 100644 --- a/src/virtchnl.h +++ b/src/virtchnl.h @@ -133,6 +133,7 @@ enum virtchnl_ops { diff --git a/intel-i40e/files/i40e-add-more-debug-info-for-VFs-still-in-reset.patch b/intel-i40e/files/i40e-add-more-debug-info-for-VFs-still-in-reset.patch new file mode 100644 index 0000000..85feb31 --- /dev/null +++ b/intel-i40e/files/i40e-add-more-debug-info-for-VFs-still-in-reset.patch @@ -0,0 +1,75 @@ +From bbe1571bb970759e8e2049512a52461da4c095b2 Mon Sep 17 00:00:00 2001 +Message-Id: +In-Reply-To: +References: +From: Jim Somerville +Date: Mon, 26 Mar 2018 11:03:47 -0400 +Subject: [PATCH 2/2] i40e add more debug info for VFs still in reset + +Signed-off-by: Jim Somerville +--- + src/i40e_virtchnl_pf.c | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/src/i40e_virtchnl_pf.c b/src/i40e_virtchnl_pf.c +index 7081123..83f6f88 100644 +--- a/src/i40e_virtchnl_pf.c ++++ b/src/i40e_virtchnl_pf.c +@@ -3004,8 +3004,8 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac) + vf = &(pf->vf[vf_id]); + vsi = pf->vsi[vf->lan_vsi_idx]; + if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) { +- dev_err(&pf->pdev->dev, "VF %d still in reset. Try again.\n", +- vf_id); ++ dev_err(&pf->pdev->dev, "%s: VF %d still in reset. Try again.\n", ++ __func__, vf_id); + ret = -EAGAIN; + goto error_param; + } +@@ -3145,8 +3145,8 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev, + vf = &(pf->vf[vf_id]); + vsi = pf->vsi[vf->lan_vsi_idx]; + if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) { +- dev_err(&pf->pdev->dev, "VF %d still in reset. Try again.\n", +- vf_id); ++ dev_err(&pf->pdev->dev, "%s: VF %d still in reset. Try again.\n", ++ __func__, vf_id); + ret = -EAGAIN; + goto error_pvid; + } +@@ -3277,8 +3277,8 @@ int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int max_tx_rate) + vf = &(pf->vf[vf_id]); + vsi = pf->vsi[vf->lan_vsi_idx]; + if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) { +- dev_err(&pf->pdev->dev, "VF %d still in reset. Try again.\n", +- vf_id); ++ dev_err(&pf->pdev->dev, "%s: VF %d still in reset. Try again.\n", ++ __func__, vf_id); + ret = -EAGAIN; + goto error; + } +@@ -3370,8 +3370,8 @@ int i40e_ndo_get_vf_config(struct net_device *netdev, + /* first vsi is always the LAN vsi */ + vsi = pf->vsi[vf->lan_vsi_idx]; + if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) { +- dev_err(&pf->pdev->dev, "VF %d still in reset. Try again.\n", +- vf_id); ++ dev_err(&pf->pdev->dev, "%s: VF %d still in reset. Try again.\n", ++ __func__, vf_id); + ret = -EAGAIN; + goto error_param; + } +@@ -3503,8 +3503,8 @@ int i40e_ndo_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool enable) + + vf = &(pf->vf[vf_id]); + if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) { +- dev_err(&pf->pdev->dev, "VF %d still in reset. Try again.\n", +- vf_id); ++ dev_err(&pf->pdev->dev, "%s: VF %d still in reset. Try again.\n", ++ __func__, vf_id); + ret = -EAGAIN; + goto out; + } +-- +1.8.3.1 +