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/qede/base: support doorbell overflow recovery
[dpdk.git]
/
drivers
/
net
/
vmxnet3
/
vmxnet3_ethdev.c
diff --git
a/drivers/net/vmxnet3/vmxnet3_ethdev.c
b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index
6ef72b1
..
1cc3ffd
100644
(file)
--- a/
drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/
drivers/net/vmxnet3/vmxnet3_ethdev.c
@@
-57,7
+57,6
@@
#include <rte_ether.h>
#include <rte_ethdev.h>
#include <rte_ethdev_pci.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
#include <rte_ethdev_pci.h>
-#include <rte_atomic.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
#include <rte_dev.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
#include <rte_dev.h>
@@
-538,10
+537,10
@@
vmxnet3_write_mac(struct vmxnet3_hw *hw, const uint8_t *addr)
addr[0], addr[1], addr[2],
addr[3], addr[4], addr[5]);
addr[0], addr[1], addr[2],
addr[3], addr[4], addr[5]);
-
val = *(const uint32_t *)addr
;
+
memcpy(&val, addr, 4)
;
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_MACL, val);
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_MACL, val);
-
val = (addr[5] << 8) | addr[4]
;
+
memcpy(&val, addr + 4, 2)
;
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_MACH, val);
}
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_MACH, val);
}
@@
-734,7
+733,7
@@
vmxnet3_setup_driver_shared(struct rte_eth_dev *dev)
vmxnet3_dev_vlan_offload_set(dev,
ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK);
vmxnet3_dev_vlan_offload_set(dev,
ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK);
- vmxnet3_write_mac(hw,
hw->perm_addr
);
+ vmxnet3_write_mac(hw,
dev->data->mac_addrs->addr_bytes
);
return VMXNET3_SUCCESS;
}
return VMXNET3_SUCCESS;
}
@@
-1145,6
+1144,8
@@
vmxnet3_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
{
struct vmxnet3_hw *hw = dev->data->dev_private;
{
struct vmxnet3_hw *hw = dev->data->dev_private;
+ ether_addr_copy(mac_addr, (struct ether_addr *)(hw->perm_addr));
+ ether_addr_copy(mac_addr, &dev->data->mac_addrs[0]);
vmxnet3_write_mac(hw, mac_addr->addr_bytes);
}
vmxnet3_write_mac(hw, mac_addr->addr_bytes);
}
@@
-1220,7
+1221,10
@@
vmxnet3_dev_promiscuous_disable(struct rte_eth_dev *dev)
struct vmxnet3_hw *hw = dev->data->dev_private;
uint32_t *vf_table = hw->shared->devRead.rxFilterConf.vfTable;
struct vmxnet3_hw *hw = dev->data->dev_private;
uint32_t *vf_table = hw->shared->devRead.rxFilterConf.vfTable;
- memcpy(vf_table, hw->shadow_vfta, VMXNET3_VFT_TABLE_SIZE);
+ if (dev->data->dev_conf.rxmode.hw_vlan_filter)
+ memcpy(vf_table, hw->shadow_vfta, VMXNET3_VFT_TABLE_SIZE);
+ else
+ memset(vf_table, 0xff, VMXNET3_VFT_TABLE_SIZE);
vmxnet3_dev_set_rxmode(hw, VMXNET3_RXM_PROMISC, 0);
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD,
VMXNET3_CMD_UPDATE_VLAN_FILTERS);
vmxnet3_dev_set_rxmode(hw, VMXNET3_RXM_PROMISC, 0);
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD,
VMXNET3_CMD_UPDATE_VLAN_FILTERS);
@@
-1307,10
+1311,8
@@
vmxnet3_process_events(struct rte_eth_dev *dev)
struct vmxnet3_hw *hw = dev->data->dev_private;
uint32_t events = hw->shared->ecr;
struct vmxnet3_hw *hw = dev->data->dev_private;
uint32_t events = hw->shared->ecr;
- if (!events) {
- PMD_INIT_LOG(ERR, "No events to process");
+ if (!events)
return;
return;
- }
/*
* ECR bits when written with 1b are cleared. Hence write
/*
* ECR bits when written with 1b are cleared. Hence write
@@
-1320,9
+1322,7
@@
vmxnet3_process_events(struct rte_eth_dev *dev)
/* Check if link state has changed */
if (events & VMXNET3_ECR_LINK) {
/* Check if link state has changed */
if (events & VMXNET3_ECR_LINK) {
- PMD_INIT_LOG(ERR,
- "Process events in %s(): VMXNET3_ECR_LINK event",
- __func__);
+ PMD_DRV_LOG(DEBUG, "Process events: VMXNET3_ECR_LINK event");
if (vmxnet3_dev_link_update(dev, 0) == 0)
_rte_eth_dev_callback_process(dev,
RTE_ETH_EVENT_INTR_LSC,
if (vmxnet3_dev_link_update(dev, 0) == 0)
_rte_eth_dev_callback_process(dev,
RTE_ETH_EVENT_INTR_LSC,
@@
-1335,11
+1335,11
@@
vmxnet3_process_events(struct rte_eth_dev *dev)
VMXNET3_CMD_GET_QUEUE_STATUS);
if (hw->tqd_start->status.stopped)
VMXNET3_CMD_GET_QUEUE_STATUS);
if (hw->tqd_start->status.stopped)
- PMD_
INIT
_LOG(ERR, "tq error 0x%x",
-
hw->tqd_start->status.error);
+ PMD_
DRV
_LOG(ERR, "tq error 0x%x",
+ hw->tqd_start->status.error);
if (hw->rqd_start->status.stopped)
if (hw->rqd_start->status.stopped)
- PMD_
INIT
_LOG(ERR, "rq error 0x%x",
+ PMD_
DRV
_LOG(ERR, "rq error 0x%x",
hw->rqd_start->status.error);
/* Reset the device */
hw->rqd_start->status.error);
/* Reset the device */
@@
-1347,10
+1347,10
@@
vmxnet3_process_events(struct rte_eth_dev *dev)
}
if (events & VMXNET3_ECR_DIC)
}
if (events & VMXNET3_ECR_DIC)
- PMD_
INIT_LOG(ERR
, "Device implementation change event.");
+ PMD_
DRV_LOG(DEBUG
, "Device implementation change event.");
if (events & VMXNET3_ECR_DEBUG)
if (events & VMXNET3_ECR_DEBUG)
- PMD_
INIT_LOG(ERR
, "Debug event generated by device.");
+ PMD_
DRV_LOG(DEBUG
, "Debug event generated by device.");
}
static void
}
static void