struct rte_eth_dev *eth_dev)
{
struct rte_pci_device *pci_dev;
- struct vmxnet3_hw *hw =
- VMXNET3_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
+ struct vmxnet3_hw *hw = eth_dev->data->dev_private;
uint32_t mac_hi, mac_lo, ver;
PMD_INIT_FUNC_TRACE();
.drv_flags = RTE_PCI_DRV_NEED_MAPPING,
},
.eth_dev_init = eth_vmxnet3_dev_init,
- .dev_private_size = sizeof(struct vmxnet3_adapter),
+ .dev_private_size = sizeof(struct vmxnet3_hw),
};
/*
vmxnet3_dev_configure(struct rte_eth_dev *dev)
{
const struct rte_memzone *mz;
- struct vmxnet3_hw *hw =
- VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct vmxnet3_hw *hw = dev->data->dev_private;
size_t size;
PMD_INIT_FUNC_TRACE();
vmxnet3_setup_driver_shared(struct rte_eth_dev *dev)
{
struct rte_eth_conf port_conf = dev->data->dev_conf;
- struct vmxnet3_hw *hw = VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct vmxnet3_hw *hw = dev->data->dev_private;
Vmxnet3_DriverShared *shared = hw->shared;
Vmxnet3_DSDevRead *devRead = &shared->devRead;
uint32_t *mac_ptr;
vmxnet3_dev_start(struct rte_eth_dev *dev)
{
int status, ret;
- struct vmxnet3_hw *hw = VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct vmxnet3_hw *hw = dev->data->dev_private;
PMD_INIT_FUNC_TRACE();
vmxnet3_dev_stop(struct rte_eth_dev *dev)
{
struct rte_eth_link link;
- struct vmxnet3_hw *hw =
- VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct vmxnet3_hw *hw = dev->data->dev_private;
PMD_INIT_FUNC_TRACE();
static void
vmxnet3_dev_close(struct rte_eth_dev *dev)
{
- struct vmxnet3_hw *hw =
- VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct vmxnet3_hw *hw = dev->data->dev_private;
PMD_INIT_FUNC_TRACE();
vmxnet3_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
{
unsigned int i;
- struct vmxnet3_hw *hw = VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct vmxnet3_hw *hw = dev->data->dev_private;
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD, VMXNET3_CMD_GET_STATS);
static int
vmxnet3_dev_link_update(struct rte_eth_dev *dev, __attribute__((unused)) int wait_to_complete)
{
- struct vmxnet3_hw *hw = VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct vmxnet3_hw *hw = dev->data->dev_private;
struct rte_eth_link link;
uint32_t ret;
static void
vmxnet3_dev_promiscuous_enable(struct rte_eth_dev *dev)
{
- struct vmxnet3_hw *hw = VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct vmxnet3_hw *hw = dev->data->dev_private;
vmxnet3_dev_set_rxmode(hw, VMXNET3_RXM_PROMISC, 1);
}
static void
vmxnet3_dev_promiscuous_disable(struct rte_eth_dev *dev)
{
- struct vmxnet3_hw *hw = VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct vmxnet3_hw *hw = dev->data->dev_private;
vmxnet3_dev_set_rxmode(hw, VMXNET3_RXM_PROMISC, 0);
}
static void
vmxnet3_dev_allmulticast_enable(struct rte_eth_dev *dev)
{
- struct vmxnet3_hw *hw = VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct vmxnet3_hw *hw = dev->data->dev_private;
vmxnet3_dev_set_rxmode(hw, VMXNET3_RXM_ALL_MULTI, 1);
}
static void
vmxnet3_dev_allmulticast_disable(struct rte_eth_dev *dev)
{
- struct vmxnet3_hw *hw = VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct vmxnet3_hw *hw = dev->data->dev_private;
vmxnet3_dev_set_rxmode(hw, VMXNET3_RXM_ALL_MULTI, 0);
}
unsigned int socket_id,
__attribute__((unused)) const struct rte_eth_txconf *tx_conf)
{
+ struct vmxnet3_hw *hw = dev->data->dev_private;
const struct rte_memzone *mz;
struct vmxnet3_tx_queue *txq;
- struct vmxnet3_hw *hw;
struct vmxnet3_cmd_ring *ring;
struct vmxnet3_comp_ring *comp_ring;
int size;
PMD_INIT_FUNC_TRACE();
- hw = VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
if ((tx_conf->txq_flags & ETH_TXQ_FLAGS_NOMULTSEGS) !=
ETH_TXQ_FLAGS_NOMULTSEGS) {
{
const struct rte_memzone *mz;
struct vmxnet3_rx_queue *rxq;
- struct vmxnet3_hw *hw;
+ struct vmxnet3_hw *hw = dev->data->dev_private;
struct vmxnet3_cmd_ring *ring0, *ring1, *ring;
struct vmxnet3_comp_ring *comp_ring;
int size;
struct rte_pktmbuf_pool_private *mbp_priv;
PMD_INIT_FUNC_TRACE();
- hw = VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
mbp_priv = (struct rte_pktmbuf_pool_private *)
rte_mempool_get_priv(mp);
int
vmxnet3_dev_rxtx_init(struct rte_eth_dev *dev)
{
- struct vmxnet3_hw *hw;
+ struct vmxnet3_hw *hw = dev->data->dev_private;
+
int i, ret;
uint8_t j;
PMD_INIT_FUNC_TRACE();
- hw = VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
for (i = 0; i < hw->num_rx_queues; i++) {
vmxnet3_rx_queue_t *rxq = dev->data->rx_queues[i];
ETH_RSS_IPV6 | \
ETH_RSS_IPV6_TCP)
- struct vmxnet3_hw *hw;
+ struct vmxnet3_hw *hw = dev->data->dev_private;
struct VMXNET3_RSSConf *dev_rss_conf;
struct rte_eth_rss_conf *port_rss_conf;
uint64_t rss_hf;
uint8_t i, j;
PMD_INIT_FUNC_TRACE();
- hw = VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
dev_rss_conf = hw->rss_conf;
port_rss_conf = &dev->data->dev_conf.rx_adv_conf.rss_conf;
vmxnet3_vlan_configure(struct rte_eth_dev *dev)
{
uint8_t i;
- struct vmxnet3_hw *hw = VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct vmxnet3_hw *hw = dev->data->dev_private;
uint32_t *vf_table = hw->shared->devRead.rxFilterConf.vfTable;
PMD_INIT_FUNC_TRACE();