git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix typos using codespell utility
[dpdk.git]
/
drivers
/
net
/
enic
/
enic_main.c
diff --git
a/drivers/net/enic/enic_main.c
b/drivers/net/enic/enic_main.c
index
570b7b6
..
2192c7f
100644
(file)
--- 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");
}
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");
{
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);
}
err = vnic_dev_add_addr(enic->vdev, mac_addr);
- if (err)
{
+ if (err)
dev_err(enic, "add mac addr failed\n");
dev_err(enic, "add mac addr failed\n");
- return;
- }
+ return err;
}
static void
}
static void
@@
-423,8
+422,7
@@
int enic_link_update(struct enic *enic)
}
static void
}
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);
{
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 func
it
on with a no-op to avoid getting stale pkts */
+ /* replace Rx func
ti
on with a no-op to avoid getting stale pkts */
eth_dev->rx_pkt_burst = enic_dummy_recv_pkts;
rte_mb();
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);
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 */
/* set up link status checking */
vnic_dev_notify_set(enic->vdev, -1); /* No Intr for notify */