net/ngbe: fix packet statistics
[dpdk.git] / drivers / net / hinic / hinic_pmd_ethdev.c
index 4cd5a85..35788f4 100644 (file)
@@ -255,7 +255,7 @@ static int hinic_vlan_offload_set(struct rte_eth_dev *dev, int mask);
  * Interrupt handler triggered by NIC  for handling
  * specific event.
  *
- * @param: The address of parameter (struct rte_eth_dev *) regsitered before.
+ * @param: The address of parameter (struct rte_eth_dev *) registered before.
  */
 static void hinic_dev_interrupt_handler(void *param)
 {
@@ -336,7 +336,7 @@ static int hinic_dev_configure(struct rte_eth_dev *dev)
                return err;
        }
 
-       /* init vlan offoad */
+       /* init VLAN offload */
        err = hinic_vlan_offload_set(dev,
                                RTE_ETH_VLAN_STRIP_MASK | RTE_ETH_VLAN_FILTER_MASK);
        if (err) {
@@ -751,6 +751,8 @@ hinic_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
                                RTE_ETH_TX_OFFLOAD_TCP_TSO |
                                RTE_ETH_TX_OFFLOAD_MULTI_SEGS;
 
+       info->dev_capa &= ~RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP;
+
        info->hash_key_size = HINIC_RSS_KEY_SIZE;
        info->reta_size = HINIC_RSS_INDIR_SIZE;
        info->flow_type_rss_offloads = HINIC_RSS_OFFLOAD_ALL;
@@ -1228,13 +1230,13 @@ static void hinic_disable_interrupt(struct rte_eth_dev *dev)
        hinic_set_msix_state(nic_dev->hwdev, 0, HINIC_MSIX_DISABLE);
 
        /* disable rte interrupt */
-       ret = rte_intr_disable(&pci_dev->intr_handle);
+       ret = rte_intr_disable(pci_dev->intr_handle);
        if (ret)
                PMD_DRV_LOG(ERR, "Disable intr failed: %d", ret);
 
        do {
                ret =
-               rte_intr_callback_unregister(&pci_dev->intr_handle,
+               rte_intr_callback_unregister(pci_dev->intr_handle,
                                             hinic_dev_interrupt_handler, dev);
                if (ret >= 0) {
                        break;
@@ -2660,8 +2662,7 @@ static int hinic_copy_mempool_init(struct hinic_nic_dev *nic_dev)
 
 static void hinic_copy_mempool_uninit(struct hinic_nic_dev *nic_dev)
 {
-       if (nic_dev->cpy_mpool != NULL)
-               rte_mempool_free(nic_dev->cpy_mpool);
+       rte_mempool_free(nic_dev->cpy_mpool);
 }
 
 static int hinic_init_sw_rxtxqs(struct hinic_nic_dev *nic_dev)
@@ -3118,7 +3119,7 @@ static int hinic_func_init(struct rte_eth_dev *eth_dev)
        }
 
        /* register callback func to eal lib */
-       rc = rte_intr_callback_register(&pci_dev->intr_handle,
+       rc = rte_intr_callback_register(pci_dev->intr_handle,
                                        hinic_dev_interrupt_handler,
                                        (void *)eth_dev);
        if (rc) {
@@ -3128,7 +3129,7 @@ static int hinic_func_init(struct rte_eth_dev *eth_dev)
        }
 
        /* enable uio/vfio intr/eventfd mapping */
-       rc = rte_intr_enable(&pci_dev->intr_handle);
+       rc = rte_intr_enable(pci_dev->intr_handle);
        if (rc) {
                PMD_DRV_LOG(ERR, "Enable rte interrupt failed, dev_name: %s",
                            eth_dev->data->name);
@@ -3158,7 +3159,7 @@ static int hinic_func_init(struct rte_eth_dev *eth_dev)
        return 0;
 
 enable_intr_fail:
-       (void)rte_intr_callback_unregister(&pci_dev->intr_handle,
+       (void)rte_intr_callback_unregister(pci_dev->intr_handle,
                                           hinic_dev_interrupt_handler,
                                           (void *)eth_dev);