From: Shai Brandes <shaibran@amazon.com>
ENA_MEMCPY_TO_DEVICE_64 macro needs pci bus id in order
to write to the device memory when using llq.
Signed-off-by: Shai Brandes <shaibran@amazon.com>
Reviewed-by: Amit Bernstein <amitbern@amazon.com>
---
drivers/net/ena/hal/ena_eth_com.c | 3 ++-
drivers/net/ena/hal/ena_plat_dpdk.h | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
@@ -74,7 +74,8 @@ static int ena_com_write_bounce_buffer_to_dev(struct ena_com_io_sq *io_sq,
wmb();
/* The line is completed. Copy it to dev */
- ENA_MEMCPY_TO_DEVICE_64(io_sq->desc_addr.pbuf_dev_addr + dst_offset,
+ ENA_MEMCPY_TO_DEVICE_64(io_sq->bus,
+ io_sq->desc_addr.pbuf_dev_addr + dst_offset,
bounce_buffer,
llq_info->desc_list_entry_size);
@@ -301,11 +301,12 @@ ena_mem_alloc_coherent(struct rte_eth_dev_data *data, size_t size,
#define ENA_WAIT_EVENTS_DESTROY(admin_queue) ((void)(admin_queue))
/* The size must be 8 byte align */
-#define ENA_MEMCPY_TO_DEVICE_64(dst, src, size) \
+#define ENA_MEMCPY_TO_DEVICE_64(bus, dst, src, size) \
do { \
int count, i; \
uint64_t *to = (uint64_t *)(dst); \
const uint64_t *from = (const uint64_t *)(src); \
+ (void)(bus); \
count = (size) / 8; \
for (i = 0; i < count; i++, from++, to++) \
rte_write64_relaxed(*from, to); \