
This commit updates i40e, iavf and ice device drivers to the following versions, refreshes StarlingX patches and resolves a build failure for the ice device driver with the v5.10 kernel: * i40e 2.16.11 * iavf 4.2.7 * ice 1.6.7 While refreshing the patches, the format and original author attribution of the following i40e patch were fixed: i40e-Enable-getting-link-status-from-VF.patch The following iavf patch was found to be no longer necessary, so it is dropped: 0001-Fix-build-issues.patch Furthermore, we noticed that enabling PREEMPT_RT causes CONFIG_NET_RX_BUSY_POLL to be disabled with recent kernels; however, the XDP code in the ice driver depends on the napi_busy_loop function made available by CONFIG_NET_RX_BUSY_POLL. This in turn results in a build failure. The following patch resolves this issue, and the validity of this patch was confirmed by colleagues at Intel: 0001-ice_xsk-Avoid-dependency-on-napi_busy_loop-with-PREE.patch Verification: This commit has gone through informal tests by one of the commit authors on a system with a Fortville/X710 network controller (which requires the i40e driver). Formal regression tests were carried out by colleagues in the verification team at Wind River, exercising ice, i40e and iavf device drivers. The titles of these regression test cases are as follows: * test_sriovdp_netdev_single_pod[1-True-1-lock/unlock] * test_sriovdp_netdev_single_pod[max-True-1-lock/unlock] * test_sriovdp_netdev_single_pod[1-True-1-reboot] * test_sriovdp_netdev_single_pod[max-True-1-reboot] * test_sriovdp_netdev_connectivity[1-1-calico-ipam-6] * test_sriovdp_netdev_connectivity[1-1-host-local-6] * test_sriovdp_netdev_ipv6_single_pod * test_sriov_pod_to_pod_netdevice_ping_iperf[1] * test_sriovdp_exceed_max_vf * test_sriovdp_pending_pod[netdevice] * test_sriovdp_resource_allocation[netdevice] * test_sriovdp_replicas_same_network[netdevice] * test_add_delete_vf_interface * test_verify_vfs_cannot_be_created_over_data_interface * test_verify_class_modification_when_vf_interface_configured Credits: Work on this patch was started by Jiping Ma. M. Vefa Bicakci refreshed the i40e patches, and prepared the changes for code review. Thanks to the colleagues in the verification team for their help with the regression tests. Story: 2008921 Task: 43665 Signed-off-by: Jiping Ma <jiping.ma2@windriver.com> Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com> Change-Id: I0cb63c15c415947d1c94c4b7c5143e8d46eabd99
132 lines
4.3 KiB
Diff
132 lines
4.3 KiB
Diff
From de86a2f22230d3193ba08afe02b5bdfe75575089 Mon Sep 17 00:00:00 2001
|
|
From: Vadim Suraev <vsuraev@northforgeinc.com>
|
|
Date: Mon, 8 Feb 2016 15:57:30 -0500
|
|
Subject: [PATCH] i40e: Enable getting link status from VF
|
|
|
|
Add handling of custom OP code sent from the PMD VF to get link status via the
|
|
virtual channel interface.
|
|
|
|
Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
|
|
Signed-off-by: eric zhang <eric.zhang@windriver.com>
|
|
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
|
|
Signed-off-by: Steven Webster <Steven.Webster@windriver.com>
|
|
Signed-off-by: Babak Sarashki <babak.sarashki@windriver.com>
|
|
[mvb: Refresh patch for i40e v2.6.11]
|
|
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
|
|
---
|
|
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 5ec2a78b937d..11190fb94c29 100644
|
|
--- a/src/i40e_virtchnl_pf.c
|
|
+++ b/src/i40e_virtchnl_pf.c
|
|
@@ -3249,6 +3249,81 @@ err_out:
|
|
aq_ret);
|
|
}
|
|
|
|
+struct i40e_eth_link {
|
|
+ uint16_t link_speed; /**< ETH_LINK_SPEED_[10, 100, 1000, 10000] */
|
|
+ uint16_t link_duplex; /**< ETH_LINK_[HALF_DUPLEX, FULL_DUPLEX] */
|
|
+ uint8_t link_status : 1; /**< 1 -> link up, 0 -> link down */
|
|
+}__attribute__((aligned(8)));
|
|
+
|
|
+#define ETH_LINK_SPEED_AUTONEG 0 /**< Auto-negotiate link speed. */
|
|
+#define ETH_LINK_SPEED_10 10 /**< 10 megabits/second. */
|
|
+#define ETH_LINK_SPEED_100 100 /**< 100 megabits/second. */
|
|
+#define ETH_LINK_SPEED_1000 1000 /**< 1 gigabits/second. */
|
|
+#define ETH_LINK_SPEED_10000 10000 /**< 10 gigabits/second. */
|
|
+#define ETH_LINK_SPEED_10G 10000 /**< alias of 10 gigabits/second. */
|
|
+#define ETH_LINK_SPEED_20G 20000 /**< 20 gigabits/second. */
|
|
+#define ETH_LINK_SPEED_40G 40000 /**< 40 gigabits/second. */
|
|
+
|
|
+#define ETH_LINK_AUTONEG_DUPLEX 0 /**< Auto-negotiate duplex. */
|
|
+#define ETH_LINK_HALF_DUPLEX 1 /**< Half-duplex connection. */
|
|
+#define ETH_LINK_FULL_DUPLEX 2 /**< Full-duplex connection. */
|
|
+
|
|
+static void
|
|
+i40e_vc_get_link_status(struct i40e_vf *vf)
|
|
+{
|
|
+ struct i40e_pf *pf = vf->pf;
|
|
+ struct i40e_hw *hw;
|
|
+ i40e_status aq_ret = I40E_SUCCESS;
|
|
+ i40e_status status;
|
|
+ struct i40e_eth_link eth_link;
|
|
+ bool new_link;
|
|
+
|
|
+ if (!test_bit(I40E_VF_STATE_ACTIVE, &vf->vf_states) ||
|
|
+ !test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps)) {
|
|
+ aq_ret = I40E_ERR_PARAM;
|
|
+ goto error_param;
|
|
+ }
|
|
+ hw = &pf->hw;
|
|
+
|
|
+ /* set this to force the get_link_status call to refresh state */
|
|
+ pf->hw.phy.get_link_info = true;
|
|
+
|
|
+ status = i40e_get_link_status(&pf->hw, &new_link);
|
|
+ if (status != I40E_SUCCESS) {
|
|
+ dev_dbg(&pf->pdev->dev, "couldn't get link state, status: %d\n",
|
|
+ status);
|
|
+ aq_ret = I40E_ERR_INVALID_LINK_SETTINGS;
|
|
+ goto error_param;
|
|
+ }
|
|
+
|
|
+ /* Update link status first to acquire latest link change */
|
|
+ eth_link.link_status = new_link ? 1 : 0;
|
|
+
|
|
+ switch(hw->phy.link_info.link_speed) {
|
|
+ case I40E_LINK_SPEED_40GB:
|
|
+ eth_link.link_speed = ETH_LINK_SPEED_40G;
|
|
+ break;
|
|
+ case I40E_LINK_SPEED_10GB:
|
|
+ eth_link.link_speed = ETH_LINK_SPEED_10G;
|
|
+ break;
|
|
+ case I40E_LINK_SPEED_1GB:
|
|
+ eth_link.link_speed = ETH_LINK_SPEED_1000;
|
|
+ break;
|
|
+ case I40E_LINK_SPEED_100MB:
|
|
+ eth_link.link_speed = ETH_LINK_SPEED_100;
|
|
+ break;
|
|
+ default:
|
|
+ eth_link.link_speed = ETH_LINK_SPEED_AUTONEG;
|
|
+ break;
|
|
+ }
|
|
+ eth_link.link_duplex = ETH_LINK_FULL_DUPLEX;/* always */
|
|
+
|
|
+error_param:
|
|
+ i40e_vc_send_msg_to_vf(vf, VIRTCHNL_OP_GET_LINK_STAT,
|
|
+ aq_ret, (uint8_t *)ð_link,
|
|
+ sizeof(eth_link));
|
|
+}
|
|
+
|
|
/**
|
|
* i40e_vc_config_queues_msg
|
|
* @vf: pointer to the VF info
|
|
@@ -5331,6 +5406,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);
|
|
break;
|
|
+ case VIRTCHNL_OP_GET_LINK_STAT:
|
|
+ i40e_vc_get_link_status(vf);
|
|
+ break;
|
|
#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 e72daf5130de..07f6d8a88db9 100644
|
|
--- a/src/virtchnl.h
|
|
+++ b/src/virtchnl.h
|
|
@@ -150,6 +150,7 @@ enum virtchnl_ops {
|
|
VIRTCHNL_OP_ENABLE_QUEUES_V2 = 107,
|
|
VIRTCHNL_OP_DISABLE_QUEUES_V2 = 108,
|
|
VIRTCHNL_OP_MAP_QUEUE_VECTOR = 111,
|
|
+ VIRTCHNL_OP_GET_LINK_STAT = 0x101,
|
|
VIRTCHNL_OP_MAX,
|
|
};
|
|
|
|
--
|
|
2.29.2
|
|
|