/* get base queue pairs index in the device */
ice_base_queue_get(pf);
- ret = ice_flow_init(ad);
- if (ret) {
- PMD_INIT_LOG(ERR, "Failed to initialize flow");
- return ret;
+ if (!ad->is_safe_mode) {
+ ret = ice_flow_init(ad);
+ if (ret) {
+ PMD_INIT_LOG(ERR, "Failed to initialize flow");
+ return ret;
+ }
}
ret = ice_reset_fxp_resource(hw);
/* Clear all queues and release mbufs */
ice_clear_queues(dev);
- ice_dev_set_link_down(dev);
+ if (pf->init_link_up)
+ ice_dev_set_link_up(dev);
+ else
+ ice_dev_set_link_down(dev);
/* Clean datapath event and queue/vec mapping */
rte_intr_efd_disable(intr_handle);
ice_dev_stop(dev);
- ice_flow_uninit(ad);
+ if (!ad->is_safe_mode)
+ ice_flow_uninit(ad);
/* release all queue resource */
ice_free_queues(dev);
ad->rx_bulk_alloc_allowed = true;
ad->tx_simple_allowed = true;
+ if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
+ dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
+
return 0;
}
/* Enable FDIR MSIX interrupt */
if (pf->fdir.fdir_vsi) {
+ pf->fdir.fdir_vsi->nb_used_qps = 1;
ice_vsi_queues_bind_intr(pf->fdir.fdir_vsi);
ice_vsi_enable_queues_intr(pf->fdir.fdir_vsi);
}
return 0;
}
+static void
+ice_get_init_link_status(struct rte_eth_dev *dev)
+{
+ struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
+ bool enable_lse = dev->data->dev_conf.intr_conf.lsc ? true : false;
+ struct ice_link_status link_status;
+ int ret;
+
+ ret = ice_aq_get_link_info(hw->port_info, enable_lse,
+ &link_status, NULL);
+ if (ret != ICE_SUCCESS) {
+ PMD_DRV_LOG(ERR, "Failed to get link info");
+ pf->init_link_up = false;
+ return;
+ }
+
+ if (link_status.link_info & ICE_AQ_LINK_UP)
+ pf->init_link_up = true;
+}
+
static int
ice_dev_start(struct rte_eth_dev *dev)
{
if (ret != ICE_SUCCESS)
PMD_DRV_LOG(WARNING, "Fail to set phy mask");
+ ice_get_init_link_status(dev);
+
ice_dev_set_link_up(dev);
/* Call get_link_info aq commond to enable/disable LSE */
DEV_RX_OFFLOAD_TCP_CKSUM |
DEV_RX_OFFLOAD_QINQ_STRIP |
DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
- DEV_RX_OFFLOAD_VLAN_EXTEND;
+ DEV_RX_OFFLOAD_VLAN_EXTEND |
+ DEV_RX_OFFLOAD_RSS_HASH;
dev_info->tx_offload_capa |=
DEV_TX_OFFLOAD_QINQ_INSERT |
DEV_TX_OFFLOAD_IPV4_CKSUM |