From b6c3e9968da01a7d3782565ab978fcb78817faf8 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 13 Dec 2017 14:55:15 +0800 Subject: [PATCH] msg/async: update to work with dpdk shipped with spdk v17.10 Signed-off-by: Kefu Chai --- src/msg/async/dpdk/DPDK.cc | 2 +- src/msg/async/dpdk/DPDK.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/msg/async/dpdk/DPDK.cc b/src/msg/async/dpdk/DPDK.cc index 597f1d51ebd..42da69af844 100644 --- a/src/msg/async/dpdk/DPDK.cc +++ b/src/msg/async/dpdk/DPDK.cc @@ -845,7 +845,7 @@ void DPDKQueuePair::process_packets( // Set stipped VLAN value if available if ((_dev->_dev_info.rx_offload_capa & DEV_RX_OFFLOAD_VLAN_STRIP) && - (m->ol_flags & PKT_RX_VLAN_PKT)) { + (m->ol_flags & PKT_RX_VLAN_STRIPPED)) { oi.vlan_tci = m->vlan_tci; } diff --git a/src/msg/async/dpdk/DPDK.h b/src/msg/async/dpdk/DPDK.h index 3d65a4fe0af..3c5c924eaa3 100644 --- a/src/msg/async/dpdk/DPDK.h +++ b/src/msg/async/dpdk/DPDK.h @@ -301,7 +301,7 @@ class DPDKQueuePair { // devices have a 15.5K limitation on a maximum single fragment // size. // - phys_addr_t pa = rte_malloc_virt2phy(va); + rte_iova_t pa = rte_malloc_virt2iova(va); if (!pa) return copy_one_data_buf(qp, m, va, buf_len); @@ -626,7 +626,7 @@ class DPDKQueuePair { // actual data buffer. // m->buf_addr = (char*)data - RTE_PKTMBUF_HEADROOM; - m->buf_physaddr = rte_malloc_virt2phy(data) - RTE_PKTMBUF_HEADROOM; + m->buf_physaddr = rte_malloc_virt2iova(data) - RTE_PKTMBUF_HEADROOM; return true; } -- 2.39.5