net/ice/base: fix abbreviations
[dpdk.git] / drivers / net / ice / ice_ethdev.c
index 4a161ae..9ff8061 100644 (file)
@@ -205,9 +205,6 @@ static const struct eth_dev_ops ice_eth_dev_ops = {
        .tx_burst_mode_get            = ice_tx_burst_mode_get,
        .get_eeprom_length            = ice_get_eeprom_length,
        .get_eeprom                   = ice_get_eeprom,
-       .rx_queue_count               = ice_rx_queue_count,
-       .rx_descriptor_status         = ice_rx_descriptor_status,
-       .tx_descriptor_status         = ice_tx_descriptor_status,
        .stats_get                    = ice_stats_get,
        .stats_reset                  = ice_stats_reset,
        .xstats_get                   = ice_xstats_get,
@@ -1317,7 +1314,7 @@ ice_handle_aq_msg(struct rte_eth_dev *dev)
                case ice_aqc_opc_get_link_status:
                        ret = ice_link_update(dev, 0);
                        if (!ret)
-                               _rte_eth_dev_callback_process
+                               rte_eth_dev_callback_process
                                        (dev, RTE_ETH_EVENT_INTR_LSC, NULL);
                        break;
                default:
@@ -1382,7 +1379,7 @@ ice_interrupt_handler(void *param)
                PMD_DRV_LOG(INFO, "OICR: link state change event");
                ret = ice_link_update(dev, 0);
                if (!ret)
-                       _rte_eth_dev_callback_process
+                       rte_eth_dev_callback_process
                                (dev, RTE_ETH_EVENT_INTR_LSC, NULL);
        }
 #endif
@@ -2056,7 +2053,7 @@ ice_get_hw_res(struct ice_hw *hw, uint16_t res_type,
                uint16_t num, uint16_t desc_id,
                uint16_t *prof_buf, uint16_t *num_prof)
 {
-       struct ice_aqc_get_allocd_res_desc_resp *resp_buf;
+       struct ice_aqc_res_elem *resp_buf;
        int ret;
        uint16_t buf_len;
        bool res_shared = 1;
@@ -2065,7 +2062,7 @@ ice_get_hw_res(struct ice_hw *hw, uint16_t res_type,
        struct ice_aqc_get_allocd_res_desc *cmd =
                        &aq_desc.params.get_res_desc;
 
-       buf_len = sizeof(resp_buf->elem) * num;
+       buf_len = sizeof(*resp_buf) * num;
        resp_buf = ice_malloc(hw, buf_len);
        if (!resp_buf)
                return -ENOMEM;
@@ -2084,7 +2081,7 @@ ice_get_hw_res(struct ice_hw *hw, uint16_t res_type,
        else
                goto exit;
 
-       ice_memcpy(prof_buf, resp_buf->elem, sizeof(resp_buf->elem) *
+       ice_memcpy(prof_buf, resp_buf, sizeof(*resp_buf) *
                        (*num_prof), ICE_NONDMA_TO_NONDMA);
 
 exit:
@@ -2163,6 +2160,9 @@ ice_dev_init(struct rte_eth_dev *dev)
        int ret;
 
        dev->dev_ops = &ice_eth_dev_ops;
+       dev->rx_queue_count = ice_rx_queue_count;
+       dev->rx_descriptor_status = ice_rx_descriptor_status;
+       dev->tx_descriptor_status = ice_tx_descriptor_status;
        dev->rx_pkt_burst = ice_recv_pkts;
        dev->tx_pkt_burst = ice_xmit_pkts;
        dev->tx_pkt_prepare = ice_prep_pkts;
@@ -3669,8 +3669,11 @@ ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)
                link.link_speed = ETH_SPEED_NUM_100G;
                break;
        case ICE_AQ_LINK_SPEED_UNKNOWN:
-       default:
                PMD_DRV_LOG(ERR, "Unknown link speed");
+               link.link_speed = ETH_SPEED_NUM_UNKNOWN;
+               break;
+       default:
+               PMD_DRV_LOG(ERR, "None link speed");
                link.link_speed = ETH_SPEED_NUM_NONE;
                break;
        }
@@ -4412,7 +4415,7 @@ ice_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
        build = hw->nvm.orom.build;
 
        ret = snprintf(fw_version, fw_size,
-                       "%d.%d 0x%08x %d.%d.%d",
+                       "%x.%02x 0x%08x %d.%d.%d",
                        hw->nvm.major_ver,
                        hw->nvm.minor_ver,
                        hw->nvm.eetrack,