rebase i40e patch to latest 2.7.29 version

It is for CentOS 7.6 support

Depends-On: https://review.openstack.org/627739
Story: 2004521
Task: 28532

Change-Id: I6a008dfa28a51316f2e2138213fb9b803f357ce8
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
This commit is contained in:
Shuicheng Lin 2018-12-29 18:59:41 +08:00 committed by Lin Shuicheng
parent a186c686c0
commit 564fd5ddb8
5 changed files with 25 additions and 36 deletions

View File

@ -1,4 +1,4 @@
COPY_LIST=" \
$PKG_BASE/files/* \
$STX_BASE/downloads/i40e-2.4.10.tar.gz"
$STX_BASE/downloads/i40e-2.7.29.tar.gz"
TIS_PATCH_VER=1

View File

@ -8,7 +8,7 @@
%define kmod_name i40e
Name: %{kmod_name}-kmod%{?bt_ext}
Version: 2.4.10
Version: 2.7.29
Release: 0%{?_tis_dist}.%{tis_patch_ver}
Group: System Environment/Kernel
License: GPLv2

View File

@ -19,7 +19,7 @@ diff --git a/src/i40e_virtchnl_pf.c b/src/i40e_virtchnl_pf.c
index 020bacb..126ec19 100644
--- a/src/i40e_virtchnl_pf.c
+++ b/src/i40e_virtchnl_pf.c
@@ -1857,6 +1857,81 @@ error_param:
@@ -2559,6 +2559,81 @@ static int i40e_vc_config_promiscuous_mode_msg(struct i40e_vf *vf, u8 *msg)
aq_ret);
}
@ -101,24 +101,24 @@ index 020bacb..126ec19 100644
/**
* i40e_vc_config_queues_msg
* @vf: pointer to the VF info
@@ -2901,6 +2976,9 @@ int i40e_vc_process_vf_msg(struct i40e_pf *pf, s16 vf_id, u32 v_opcode,
@@ -4300,6 +4375,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);
ret = i40e_vc_request_queues_msg(vf, msg);
break;
+ case VIRTCHNL_OP_GET_LINK_STAT:
+ i40e_vc_get_link_status(vf);
+ break;
case VIRTCHNL_OP_UNKNOWN:
default:
#ifdef __TC_MQPRIO_MODE_MAX
case VIRTCHNL_OP_ENABLE_CHANNELS:
ret = i40e_vc_add_qch_msg(vf, msg);
diff --git a/src/virtchnl.h b/src/virtchnl.h
index afde603..b9b38c0 100644
--- a/src/virtchnl.h
+++ b/src/virtchnl.h
@@ -133,6 +133,7 @@ enum virtchnl_ops {
VIRTCHNL_OP_ENABLE_VLAN_STRIPPING = 27,
VIRTCHNL_OP_DISABLE_VLAN_STRIPPING = 28,
VIRTCHNL_OP_REQUEST_QUEUES = 29,
@@ -124,6 +124,7 @@ enum virtchnl_ops {
VIRTCHNL_OP_DISABLE_CHANNELS = 31,
VIRTCHNL_OP_ADD_CLOUD_FILTER = 32,
VIRTCHNL_OP_DEL_CLOUD_FILTER = 33,
+ VIRTCHNL_OP_GET_LINK_STAT = 0x101,
};

View File

@ -8,26 +8,15 @@ Subject: [PATCH 2/3] i40e add more debug info for VFs still in reset
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
---
src/i40e_virtchnl_pf.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
src/i40e_virtchnl_pf.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/i40e_virtchnl_pf.c b/src/i40e_virtchnl_pf.c
index 126ec19..da29fc3 100644
--- a/src/i40e_virtchnl_pf.c
+++ b/src/i40e_virtchnl_pf.c
@@ -3077,8 +3077,8 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)
msleep(20);
}
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;
}
@@ -3218,8 +3218,8 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev,
vf = &(pf->vf[vf_id]);
@@ -4650,8 +4650,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",
@ -37,8 +26,8 @@ index 126ec19..da29fc3 100644
ret = -EAGAIN;
goto error_pvid;
}
@@ -3350,8 +3350,8 @@ int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int max_tx_rate)
vf = &(pf->vf[vf_id]);
@@ -4784,8 +4784,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",
@ -48,7 +37,7 @@ index 126ec19..da29fc3 100644
ret = -EAGAIN;
goto error;
}
@@ -3443,8 +3443,8 @@ int i40e_ndo_get_vf_config(struct net_device *netdev,
@@ -4844,8 +4844,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)) {
@ -59,7 +48,7 @@ index 126ec19..da29fc3 100644
ret = -EAGAIN;
goto error_param;
}
@@ -3576,8 +3576,8 @@ int i40e_ndo_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool enable)
@@ -4989,8 +4989,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)) {

View File

@ -19,16 +19,16 @@ diff --git a/src/i40e_virtchnl_pf.c b/src/i40e_virtchnl_pf.c
index da29fc3..d5935d6 100644
--- a/src/i40e_virtchnl_pf.c
+++ b/src/i40e_virtchnl_pf.c
@@ -3431,6 +3431,7 @@ int i40e_ndo_get_vf_config(struct net_device *netdev,
@@ -4829,6 +4829,7 @@ int i40e_ndo_get_vf_config(struct net_device *netdev,
struct i40e_pf *pf = vsi->back;
struct i40e_vf *vf;
int ret = 0;
+ u8 i;
/* validate the request */
if (vf_id >= pf->num_alloc_vfs) {
@@ -3442,6 +3443,16 @@ int i40e_ndo_get_vf_config(struct net_device *netdev,
vf = &(pf->vf[vf_id]);
if (test_and_set_bit(__I40E_VIRTCHNL_OP_PENDING, pf->state)) {
dev_warn(&pf->pdev->dev, "Unable to configure VFs, other operation is pending.\n");
@@ -4843,6 +4844,16 @@ int i40e_ndo_get_vf_config(struct net_device *netdev,
vf = &pf->vf[vf_id];
/* first vsi is always the LAN vsi */
vsi = pf->vsi[vf->lan_vsi_idx];
+