fix typos using codespell utility
[dpdk.git] / drivers / net / enic / enic_main.c
index 570b7b6..2192c7f 100644 (file)
@@ -202,20 +202,19 @@ void enic_del_mac_address(struct enic *enic, int mac_index)
                dev_err(enic, "del mac addr failed\n");
 }
 
-void enic_set_mac_address(struct enic *enic, uint8_t *mac_addr)
+int enic_set_mac_address(struct enic *enic, uint8_t *mac_addr)
 {
        int err;
 
        if (!is_eth_addr_valid(mac_addr)) {
                dev_err(enic, "invalid mac address\n");
-               return;
+               return -EINVAL;
        }
 
        err = vnic_dev_add_addr(enic->vdev, mac_addr);
-       if (err) {
+       if (err)
                dev_err(enic, "add mac addr failed\n");
-               return;
-       }
+       return err;
 }
 
 static void
@@ -423,8 +422,7 @@ int enic_link_update(struct enic *enic)
 }
 
 static void
-enic_intr_handler(__rte_unused struct rte_intr_handle *handle,
-       void *arg)
+enic_intr_handler(void *arg)
 {
        struct rte_eth_dev *dev = (struct rte_eth_dev *)arg;
        struct enic *enic = pmd_priv(dev);
@@ -1227,7 +1225,7 @@ int enic_set_mtu(struct enic *enic, uint16_t new_mtu)
                }
        }
 
-       /* replace Rx funciton with a no-op to avoid getting stale pkts */
+       /* replace Rx function with a no-op to avoid getting stale pkts */
        eth_dev->rx_pkt_burst = enic_dummy_recv_pkts;
        rte_mb();
 
@@ -1316,6 +1314,9 @@ static int enic_dev_init(struct enic *enic)
 
        vnic_dev_set_reset_flag(enic->vdev, 0);
 
+       LIST_INIT(&enic->flows);
+       rte_spinlock_init(&enic->flows_lock);
+
        /* set up link status checking */
        vnic_dev_notify_set(enic->vdev, -1); /* No Intr for notify */