diff options
Diffstat (limited to 'drivers/net/qede/qede_eth_if.c')
-rw-r--r-- | drivers/net/qede/qede_eth_if.c | 75 |
1 files changed, 38 insertions, 37 deletions
diff --git a/drivers/net/qede/qede_eth_if.c b/drivers/net/qede/qede_eth_if.c index b6f6487d..1ae6127b 100644 --- a/drivers/net/qede/qede_eth_if.c +++ b/drivers/net/qede/qede_eth_if.c @@ -40,8 +40,6 @@ qed_start_vport(struct ecore_dev *edev, struct qed_start_vport_params *p_params) return rc; } - ecore_hw_start_fastpath(p_hwfn); - DP_VERBOSE(edev, ECORE_MSG_SPQ, "Started V-PORT %d with MTU %d\n", p_params->vport_id, p_params->mtu); @@ -94,6 +92,7 @@ qed_update_vport(struct ecore_dev *edev, struct qed_update_vport_params *params) sp_params.accept_any_vlan = params->accept_any_vlan; sp_params.update_accept_any_vlan_flg = params->update_accept_any_vlan_flg; + sp_params.mtu = params->mtu; /* RSS - is a bit tricky, since upper-layer isn't familiar with hwfns. * We need to re-fix the rss values per engine for CMT. @@ -144,8 +143,8 @@ qed_update_vport(struct ecore_dev *edev, struct qed_update_vport_params *params) ECORE_RSS_IND_TABLE_SIZE * sizeof(uint16_t)); rte_memcpy(sp_rss_params.rss_key, params->rss_params.rss_key, ECORE_RSS_KEY_SIZE * sizeof(uint32_t)); + sp_params.rss_params = &sp_rss_params; } - sp_params.rss_params = &sp_rss_params; for_each_hwfn(edev, i) { struct ecore_hwfn *p_hwfn = &edev->hwfns[i]; @@ -169,9 +168,9 @@ qed_update_vport(struct ecore_dev *edev, struct qed_update_vport_params *params) static int qed_start_rxq(struct ecore_dev *edev, - uint8_t rss_id, uint8_t rx_queue_id, - uint8_t vport_id, uint16_t sb, - uint8_t sb_index, uint16_t bd_max_bytes, + uint8_t rss_num, + struct ecore_queue_start_common_params *p_params, + uint16_t bd_max_bytes, dma_addr_t bd_chain_phys_addr, dma_addr_t cqe_pbl_addr, uint16_t cqe_pbl_size, void OSAL_IOMEM * *pp_prod) @@ -179,28 +178,28 @@ qed_start_rxq(struct ecore_dev *edev, struct ecore_hwfn *p_hwfn; int rc, hwfn_index; - hwfn_index = rss_id % edev->num_hwfns; + hwfn_index = rss_num % edev->num_hwfns; p_hwfn = &edev->hwfns[hwfn_index]; + p_params->queue_id = p_params->queue_id / edev->num_hwfns; + p_params->stats_id = p_params->vport_id; + rc = ecore_sp_eth_rx_queue_start(p_hwfn, p_hwfn->hw_info.opaque_fid, - rx_queue_id / edev->num_hwfns, - vport_id, - vport_id, - sb, - sb_index, + p_params, bd_max_bytes, bd_chain_phys_addr, cqe_pbl_addr, cqe_pbl_size, pp_prod); if (rc) { - DP_ERR(edev, "Failed to start RXQ#%d\n", rx_queue_id); + DP_ERR(edev, "Failed to start RXQ#%d\n", p_params->queue_id); return rc; } DP_VERBOSE(edev, ECORE_MSG_SPQ, - "Started RX-Q %d [rss %d] on V-PORT %d and SB %d\n", - rx_queue_id, rss_id, vport_id, sb); + "Started RX-Q %d [rss_num %d] on V-PORT %d and SB %d\n", + p_params->queue_id, rss_num, p_params->vport_id, + p_params->sb); return 0; } @@ -227,35 +226,35 @@ qed_stop_rxq(struct ecore_dev *edev, struct qed_stop_rxq_params *params) static int qed_start_txq(struct ecore_dev *edev, - uint8_t rss_id, uint16_t tx_queue_id, - uint8_t vport_id, uint16_t sb, - uint8_t sb_index, + uint8_t rss_num, + struct ecore_queue_start_common_params *p_params, dma_addr_t pbl_addr, uint16_t pbl_size, void OSAL_IOMEM * *pp_doorbell) { struct ecore_hwfn *p_hwfn; int rc, hwfn_index; - hwfn_index = rss_id % edev->num_hwfns; + hwfn_index = rss_num % edev->num_hwfns; p_hwfn = &edev->hwfns[hwfn_index]; + p_params->queue_id = p_params->queue_id / edev->num_hwfns; + p_params->stats_id = p_params->vport_id; + rc = ecore_sp_eth_tx_queue_start(p_hwfn, p_hwfn->hw_info.opaque_fid, - tx_queue_id / edev->num_hwfns, - vport_id, - vport_id, - sb, - sb_index, + p_params, + 0 /* tc */, pbl_addr, pbl_size, pp_doorbell); if (rc) { - DP_ERR(edev, "Failed to start TXQ#%d\n", tx_queue_id); + DP_ERR(edev, "Failed to start TXQ#%d\n", p_params->queue_id); return rc; } DP_VERBOSE(edev, ECORE_MSG_SPQ, - "Started TX-Q %d [rss %d] on V-PORT %d and SB %d\n", - tx_queue_id, rss_id, vport_id, sb); + "Started TX-Q %d [rss_num %d] on V-PORT %d and SB %d\n", + p_params->queue_id, rss_num, p_params->vport_id, + p_params->sb); return 0; } @@ -294,6 +293,17 @@ static int qed_fastpath_stop(struct ecore_dev *edev) return 0; } +static void qed_fastpath_start(struct ecore_dev *edev) +{ + struct ecore_hwfn *p_hwfn; + int i; + + for_each_hwfn(edev, i) { + p_hwfn = &edev->hwfns[i]; + ecore_hw_start_fastpath(p_hwfn); + } +} + static void qed_get_vport_stats(struct ecore_dev *edev, struct ecore_eth_stats *stats) { @@ -443,20 +453,11 @@ static const struct qed_eth_ops qed_eth_ops_pass = { INIT_STRUCT_FIELD(q_tx_stop, &qed_stop_txq), INIT_STRUCT_FIELD(eth_cqe_completion, &qed_fp_cqe_completion), INIT_STRUCT_FIELD(fastpath_stop, &qed_fastpath_stop), + INIT_STRUCT_FIELD(fastpath_start, &qed_fastpath_start), INIT_STRUCT_FIELD(get_vport_stats, &qed_get_vport_stats), INIT_STRUCT_FIELD(filter_config, &qed_configure_filter), }; -uint32_t qed_get_protocol_version(enum qed_protocol protocol) -{ - switch (protocol) { - case QED_PROTOCOL_ETH: - return QED_ETH_INTERFACE_VERSION; - default: - return 0; - } -} - const struct qed_eth_ops *qed_get_eth_ops(void) { return &qed_eth_ops_pass; |