net/sfc/base: remove unused defined for WPTR alignment
[dpdk.git] / drivers / net / vmxnet3 / vmxnet3_ethdev.c
index 6328464..c2f12cd 100644 (file)
@@ -1,34 +1,5 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Intel Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2010-2015 Intel Corporation
  */
 
 #include <sys/queue.h>
@@ -48,6 +19,7 @@
 #include <rte_log.h>
 #include <rte_debug.h>
 #include <rte_pci.h>
+#include <rte_bus_pci.h>
 #include <rte_atomic.h>
 #include <rte_branch_prediction.h>
 #include <rte_memory.h>
@@ -483,7 +455,7 @@ vmxnet3_dev_configure(struct rte_eth_dev *dev)
        memset(mz->addr, 0, mz->len);
 
        hw->shared = mz->addr;
-       hw->sharedPA = mz->phys_addr;
+       hw->sharedPA = mz->iova;
 
        /*
         * Allocate a memzone for Vmxnet3_RxQueueDesc - Vmxnet3_TxQueueDesc
@@ -504,7 +476,7 @@ vmxnet3_dev_configure(struct rte_eth_dev *dev)
        hw->tqd_start = (Vmxnet3_TxQueueDesc *)mz->addr;
        hw->rqd_start = (Vmxnet3_RxQueueDesc *)(hw->tqd_start + hw->num_tx_queues);
 
-       hw->queueDescPA = mz->phys_addr;
+       hw->queueDescPA = mz->iova;
        hw->queue_desc_len = (uint16_t)size;
 
        if (dev->data->dev_conf.rxmode.mq_mode == ETH_MQ_RX_RSS) {
@@ -520,7 +492,7 @@ vmxnet3_dev_configure(struct rte_eth_dev *dev)
                memset(mz->addr, 0, mz->len);
 
                hw->rss_conf = mz->addr;
-               hw->rss_confPA = mz->phys_addr;
+               hw->rss_confPA = mz->iova;
        }
 
        return 0;
@@ -568,7 +540,7 @@ vmxnet3_dev_setup_memreg(struct rte_eth_dev *dev)
                }
                memset(mz->addr, 0, mz->len);
                hw->memRegs = mz->addr;
-               hw->memRegsPA = mz->phys_addr;
+               hw->memRegsPA = mz->iova;
        }
 
        num = hw->num_rx_queues;
@@ -603,7 +575,7 @@ vmxnet3_dev_setup_memreg(struct rte_eth_dev *dev)
                Vmxnet3_MemoryRegion *mr = &hw->memRegs->memRegs[j];
 
                mr->startPA =
-                       (uintptr_t)STAILQ_FIRST(&mp[i]->mem_list)->phys_addr;
+                       (uintptr_t)STAILQ_FIRST(&mp[i]->mem_list)->iova;
                mr->length = STAILQ_FIRST(&mp[i]->mem_list)->len <= INT32_MAX ?
                        STAILQ_FIRST(&mp[i]->mem_list)->len : INT32_MAX;
                mr->txQueueBits = index[i];