pci: make device id tables const
[dpdk.git] / lib / librte_pmd_i40e / i40e_ethdev_vf.c
index fe46cf1..8910bdf 100644 (file)
@@ -51,7 +51,6 @@
 #include <rte_branch_prediction.h>
 #include <rte_memory.h>
 #include <rte_memzone.h>
-#include <rte_tailq.h>
 #include <rte_eal.h>
 #include <rte_alarm.h>
 #include <rte_ether.h>
@@ -149,7 +148,7 @@ static int i40evf_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
 /* Default hash key buffer for RSS */
 static uint32_t rss_key_default[I40E_VFQF_HKEY_MAX_INDEX + 1];
 
-static struct eth_dev_ops i40evf_eth_dev_ops = {
+static const struct eth_dev_ops i40evf_eth_dev_ops = {
        .dev_configure        = i40evf_dev_configure,
        .dev_start            = i40evf_dev_start,
        .dev_stop             = i40evf_dev_stop,
@@ -1000,7 +999,7 @@ i40evf_get_link_status(struct rte_eth_dev *dev, struct rte_eth_link *link)
        return 0;
 }
 
-static struct rte_pci_id pci_id_i40evf_map[] = {
+static const struct rte_pci_id pci_id_i40evf_map[] = {
 #define RTE_PCI_DEV_ID_DECL_I40EVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
 #include "rte_pci_dev_ids.h"
 { .vendor_id = 0, /* sentinel */ },
@@ -1149,8 +1148,7 @@ err:
 }
 
 static int
-i40evf_dev_init(__rte_unused struct eth_driver *eth_drv,
-               struct rte_eth_dev *eth_dev)
+i40evf_dev_init(struct rte_eth_dev *eth_dev)
 {
        struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(\
                        eth_dev->data->dev_private);
@@ -1646,6 +1644,7 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
        dev_info->min_rx_bufsize = I40E_BUF_SIZE_MIN;
        dev_info->max_rx_pktlen = I40E_FRAME_SIZE_MAX;
        dev_info->reta_size = ETH_RSS_RETA_SIZE_64;
+       dev_info->flow_type_rss_offloads = I40E_RSS_OFFLOAD_ALL;
 
        dev_info->default_rxconf = (struct rte_eth_rxconf) {
                .rx_thresh = {
@@ -1673,7 +1672,6 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 static void
 i40evf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
-       memset(stats, 0, sizeof(*stats));
        if (i40evf_get_statics(dev, stats))
                PMD_DRV_LOG(ERR, "Get statics failed");
 }