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
net/octeontx2: add flow MCAM utility functions
[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
f457173
..
c68d388
100644
(file)
--- a/
drivers/net/enic/enic_main.c
+++ b/
drivers/net/enic/enic_main.c
@@
-8,7
+8,6
@@
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
-#include <libgen.h>
#include <rte_pci.h>
#include <rte_bus_pci.h>
#include <rte_pci.h>
#include <rte_bus_pci.h>
@@
-1667,20
+1666,19
@@
static int enic_dev_init(struct enic *enic)
/* Get the supported filters */
enic_fdir_info(enic);
/* Get the supported filters */
enic_fdir_info(enic);
- eth_dev->data->mac_addrs = rte_zmalloc("enic_mac_addr", ETH_ALEN
- * ENIC_MAX_MAC_ADDR, 0);
+ eth_dev->data->mac_addrs = rte_zmalloc("enic_mac_addr",
+ sizeof(struct rte_ether_addr) *
+ ENIC_UNICAST_PERFECT_FILTERS, 0);
if (!eth_dev->data->mac_addrs) {
dev_err(enic, "mac addr storage alloc failed, aborting.\n");
return -1;
}
if (!eth_dev->data->mac_addrs) {
dev_err(enic, "mac addr storage alloc failed, aborting.\n");
return -1;
}
-
ether_addr_copy((struct ether_addr *)
enic->mac_addr,
+
rte_ether_addr_copy((struct rte_ether_addr *)
enic->mac_addr,
eth_dev->data->mac_addrs);
vnic_dev_set_reset_flag(enic->vdev, 0);
LIST_INIT(&enic->flows);
eth_dev->data->mac_addrs);
vnic_dev_set_reset_flag(enic->vdev, 0);
LIST_INIT(&enic->flows);
- rte_spinlock_init(&enic->flows_lock);
- enic->max_flow_counter = -1;
/* 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 */
@@
-1714,8
+1712,15
@@
static int enic_dev_init(struct enic *enic)
PKT_TX_OUTER_IP_CKSUM |
PKT_TX_TUNNEL_MASK;
enic->overlay_offload = true;
PKT_TX_OUTER_IP_CKSUM |
PKT_TX_TUNNEL_MASK;
enic->overlay_offload = true;
- enic->vxlan_port = ENIC_DEFAULT_VXLAN_PORT;
dev_info(enic, "Overlay offload is enabled\n");
dev_info(enic, "Overlay offload is enabled\n");
+ }
+ /*
+ * Reset the vxlan port if HW vxlan parsing is available. It
+ * is always enabled regardless of overlay offload
+ * enable/disable.
+ */
+ if (enic->vxlan) {
+ enic->vxlan_port = ENIC_DEFAULT_VXLAN_PORT;
/*
* Reset the vxlan port to the default, as the NIC firmware
* does not reset it automatically and keeps the old setting.
/*
* Reset the vxlan port to the default, as the NIC firmware
* does not reset it automatically and keeps the old setting.
@@
-1761,20
+1766,14
@@
int enic_probe(struct enic *enic)
enic_free_consistent);
/*
enic_free_consistent);
/*
- * Allocate the consistent memory for stats
and counters upfront so
- *
both primary and secondary processes can access them
.
+ * Allocate the consistent memory for stats
upfront so both primary and
+ *
secondary processes can dump stats
.
*/
err = vnic_dev_alloc_stats_mem(enic->vdev);
if (err) {
dev_err(enic, "Failed to allocate cmd memory, aborting\n");
goto err_out_unregister;
}
*/
err = vnic_dev_alloc_stats_mem(enic->vdev);
if (err) {
dev_err(enic, "Failed to allocate cmd memory, aborting\n");
goto err_out_unregister;
}
- err = vnic_dev_alloc_counter_mem(enic->vdev);
- if (err) {
- dev_err(enic, "Failed to allocate counter memory, aborting\n");
- goto err_out_unregister;
- }
-
/* Issue device open to get device in known state */
err = enic_dev_open(enic);
if (err) {
/* Issue device open to get device in known state */
err = enic_dev_open(enic);
if (err) {