X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fenic%2Fenic_main.c;h=2192c7f202238e2d1776daabfe87a05987547a71;hb=98a7ea332ba3da0f74ec951595d36a616165b255;hp=570b7b69a162e8a96036034b1f1e437af72ff87e;hpb=ed6e564c214e9852ff7f3d8f676a892dda905651;p=dpdk.git diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 570b7b69a1..2192c7f202 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -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 */