net/i40e: remove empty queue stats mapping set devops
[dpdk.git] / drivers / net / i40e / i40e_ethdev.c
index f4d778e..3364455 100644 (file)
@@ -237,10 +237,6 @@ static int i40e_dev_xstats_get_names(struct rte_eth_dev *dev,
                                     struct rte_eth_xstat_name *xstats_names,
                                     unsigned limit);
 static void i40e_dev_stats_reset(struct rte_eth_dev *dev);
-static int i40e_dev_queue_stats_mapping_set(struct rte_eth_dev *dev,
-                                           uint16_t queue_id,
-                                           uint8_t stat_idx,
-                                           uint8_t is_rx);
 static int i40e_fw_version_get(struct rte_eth_dev *dev,
                                char *fw_version, size_t fw_size);
 static void i40e_dev_info_get(struct rte_eth_dev *dev,
@@ -457,7 +453,6 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
        .xstats_get_names             = i40e_dev_xstats_get_names,
        .stats_reset                  = i40e_dev_stats_reset,
        .xstats_reset                 = i40e_dev_stats_reset,
-       .queue_stats_mapping_set      = i40e_dev_queue_stats_mapping_set,
        .fw_version_get               = i40e_fw_version_get,
        .dev_infos_get                = i40e_dev_info_get,
        .dev_supported_ptypes_get     = i40e_dev_supported_ptypes_get,
@@ -526,13 +521,13 @@ static const struct rte_i40e_xstats_name_off rte_i40e_stats_strings[] = {
        {"rx_unicast_packets", offsetof(struct i40e_eth_stats, rx_unicast)},
        {"rx_multicast_packets", offsetof(struct i40e_eth_stats, rx_multicast)},
        {"rx_broadcast_packets", offsetof(struct i40e_eth_stats, rx_broadcast)},
-       {"rx_dropped", offsetof(struct i40e_eth_stats, rx_discards)},
+       {"rx_dropped_packets", offsetof(struct i40e_eth_stats, rx_discards)},
        {"rx_unknown_protocol_packets", offsetof(struct i40e_eth_stats,
                rx_unknown_protocol)},
        {"tx_unicast_packets", offsetof(struct i40e_eth_stats, tx_unicast)},
        {"tx_multicast_packets", offsetof(struct i40e_eth_stats, tx_multicast)},
        {"tx_broadcast_packets", offsetof(struct i40e_eth_stats, tx_broadcast)},
-       {"tx_dropped", offsetof(struct i40e_eth_stats, tx_discards)},
+       {"tx_dropped_packets", offsetof(struct i40e_eth_stats, tx_discards)},
 };
 
 #define I40E_NB_ETH_XSTATS (sizeof(rte_i40e_stats_strings) / \
@@ -1211,11 +1206,9 @@ i40e_parse_latest_vec_handler(__rte_unused const char *key,
                                const char *value,
                                void *opaque)
 {
-       struct i40e_adapter *ad;
+       struct i40e_adapter *ad = opaque;
        int use_latest_vec;
 
-       ad = (struct i40e_adapter *)opaque;
-
        use_latest_vec = atoi(value);
 
        if (use_latest_vec != 0 && use_latest_vec != 1)
@@ -3433,17 +3426,6 @@ i40e_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
        return count;
 }
 
-static int
-i40e_dev_queue_stats_mapping_set(__rte_unused struct rte_eth_dev *dev,
-                                __rte_unused uint16_t queue_id,
-                                __rte_unused uint8_t stat_idx,
-                                __rte_unused uint8_t is_rx)
-{
-       PMD_INIT_FUNC_TRACE();
-
-       return -ENOSYS;
-}
-
 static int
 i40e_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
 {
@@ -9997,8 +9979,8 @@ i40e_ethertype_filter_set(struct i40e_pf *pf,
                PMD_DRV_LOG(ERR, "Invalid queue ID");
                return -EINVAL;
        }
-       if (filter->ether_type == RTE_ETHER_TYPE_IPv4 ||
-               filter->ether_type == RTE_ETHER_TYPE_IPv6) {
+       if (filter->ether_type == RTE_ETHER_TYPE_IPV4 ||
+               filter->ether_type == RTE_ETHER_TYPE_IPV6) {
                PMD_DRV_LOG(ERR,
                        "unsupported ether_type(0x%04x) in control packet filter.",
                        filter->ether_type);
@@ -10843,8 +10825,7 @@ static void
 i40e_start_timecounters(struct rte_eth_dev *dev)
 {
        struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-       struct i40e_adapter *adapter =
-                       (struct i40e_adapter *)dev->data->dev_private;
+       struct i40e_adapter *adapter = dev->data->dev_private;
        struct rte_eth_link link;
        uint32_t tsync_inc_l;
        uint32_t tsync_inc_h;
@@ -10896,8 +10877,7 @@ i40e_start_timecounters(struct rte_eth_dev *dev)
 static int
 i40e_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta)
 {
-       struct i40e_adapter *adapter =
-                       (struct i40e_adapter *)dev->data->dev_private;
+       struct i40e_adapter *adapter = dev->data->dev_private;
 
        adapter->systime_tc.nsec += delta;
        adapter->rx_tstamp_tc.nsec += delta;
@@ -10910,8 +10890,7 @@ static int
 i40e_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts)
 {
        uint64_t ns;
-       struct i40e_adapter *adapter =
-                       (struct i40e_adapter *)dev->data->dev_private;
+       struct i40e_adapter *adapter = dev->data->dev_private;
 
        ns = rte_timespec_to_ns(ts);
 
@@ -10927,8 +10906,7 @@ static int
 i40e_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts)
 {
        uint64_t ns, systime_cycles;
-       struct i40e_adapter *adapter =
-                       (struct i40e_adapter *)dev->data->dev_private;
+       struct i40e_adapter *adapter = dev->data->dev_private;
 
        systime_cycles = i40e_read_systime_cyclecounter(dev);
        ns = rte_timecounter_update(&adapter->systime_tc, systime_cycles);
@@ -11004,9 +10982,7 @@ i40e_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
                                struct timespec *timestamp, uint32_t flags)
 {
        struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-       struct i40e_adapter *adapter =
-               (struct i40e_adapter *)dev->data->dev_private;
-
+       struct i40e_adapter *adapter = dev->data->dev_private;
        uint32_t sync_status;
        uint32_t index = flags & 0x03;
        uint64_t rx_tstamp_cycles;
@@ -11028,9 +11004,7 @@ i40e_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
                                struct timespec *timestamp)
 {
        struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-       struct i40e_adapter *adapter =
-               (struct i40e_adapter *)dev->data->dev_private;
-
+       struct i40e_adapter *adapter = dev->data->dev_private;
        uint32_t sync_status;
        uint64_t tx_tstamp_cycles;
        uint64_t ns;
@@ -12142,7 +12116,7 @@ i40e_filter_restore(struct i40e_pf *pf)
        i40e_rss_filter_restore(pf);
 }
 
-static bool
+bool
 is_device_supported(struct rte_eth_dev *dev, struct rte_pci_driver *drv)
 {
        if (strcmp(dev->device->driver->name, drv->driver.name))