Compare commits
70 Commits
master
...
stable/180
Author | SHA1 | Date | |
---|---|---|---|
|
511ce2572a | ||
|
070b810a88 | ||
|
19baa37762 | ||
|
783adb1527 | ||
|
2b98236eaa | ||
|
3f69a51658 | ||
|
909ba93249 | ||
|
3351801ce3 | ||
|
31aa6f267f | ||
|
c548f5df3f | ||
|
41b2ae7c1d | ||
|
da7bcd4bd6 | ||
|
9c335ce8e7 | ||
|
21064cec96 | ||
|
bc0c8fe6ff | ||
|
639f573dca | ||
|
6a5bc5173a | ||
|
d159e6f311 | ||
|
1e5a2c6f19 | ||
|
55fbdb9941 | ||
|
b3fceaa7ca | ||
|
9f624cacf3 | ||
|
f0030614c3 | ||
|
a742315b78 | ||
|
7483694884 | ||
|
aec7297ba0 | ||
|
d783d1d6bf | ||
|
f74b4d2b55 | ||
|
eabe79ca28 | ||
|
9a9ab594e8 | ||
|
1edc406da3 | ||
|
d039281e11 | ||
|
e0fe0fd090 | ||
|
86f6d3e291 | ||
|
6b4b20318b | ||
|
2a12fb231b | ||
|
bd8b4f1a84 | ||
|
2da975c4dd | ||
|
fe47e29fc6 | ||
|
ead8eb34e3 | ||
|
19d4ecddeb | ||
|
270e190085 | ||
|
6da5d8d237 | ||
|
ff83ce7b94 | ||
|
2506190ab4 | ||
|
d1bf43c2aa | ||
|
4280bfc8c0 | ||
|
332cc5a60b | ||
|
6c2dc9bab1 | ||
|
21076e5d47 | ||
|
ab955b1b44 | ||
|
374819dd58 | ||
|
78c7077634 | ||
|
db6d6b3058 | ||
|
17ee6f08d4 | ||
|
3c723f3812 | ||
|
c1ebcc4022 | ||
|
258a189d18 | ||
|
456ded496f | ||
|
c16a23c596 | ||
|
6f9bc4e4d8 | ||
|
9df8ffa0dc | ||
|
ca23c3ea16 | ||
|
2ed681f5b0 | ||
|
d61105656b | ||
|
692250bedf | ||
|
e4b49c738b | ||
|
ee8b973de9 | ||
|
b4b2488202 | ||
|
e400a6d1a5 |
@ -2,3 +2,4 @@
|
||||
host=gerrit.fd.io
|
||||
port=29418
|
||||
project=vpp
|
||||
defaultbranch=stable/1807
|
||||
|
6
Makefile
6
Makefile
@ -127,14 +127,14 @@ RPM_SUSE_PLATFORM_DEPS = distribution-release shadow rpm-build
|
||||
|
||||
ifeq ($(OS_ID),opensuse)
|
||||
ifeq ($(SUSE_NAME),Tumbleweed)
|
||||
RPM_SUSE_DEVEL_DEPS = libboost_headers-devel libboost_thread-devel gcc
|
||||
RPM_SUSE_DEVEL_DEPS = libboost_headers1_68_0-devel-1.68.0 libboost_thread1_68_0-devel-1.68.0 gcc
|
||||
RPM_SUSE_PYTHON_DEPS += python2-ply python2-virtualenv
|
||||
endif
|
||||
ifeq ($(SUSE_ID),15.0)
|
||||
RPM_SUSE_DEVEL_DEPS = libboost_headers-devel libboost_thread-devel gcc6
|
||||
RPM_SUSE_DEVEL_DEPS = libboost_headers1_68_0-devel-1.68.0 libboost_thread1_68_0-devel-1.68.0 gcc6
|
||||
RPM_SUSE_PYTHON_DEPS += python2-ply python2-virtualenv
|
||||
else
|
||||
RPM_SUSE_DEVEL_DEPS += boost_1_61-devel gcc6
|
||||
RPM_SUSE_DEVEL_DEPS += libboost_headers1_68_0-devel-1.68.0 gcc6
|
||||
RPM_SUSE_PYTHON_DEPS += python-virtualenv
|
||||
endif
|
||||
endif
|
||||
|
324
RELEASE.md
324
RELEASE.md
File diff suppressed because it is too large
Load Diff
@ -28,7 +28,7 @@ DPDK_FAILSAFE_PMD ?= n
|
||||
B := $(DPDK_BUILD_DIR)
|
||||
I := $(DPDK_INSTALL_DIR)
|
||||
DPDK_VERSION ?= 18.05
|
||||
PKG_SUFFIX ?= vpp2
|
||||
PKG_SUFFIX ?= vpp3
|
||||
DPDK_BASE_URL ?= http://fast.dpdk.org/rel
|
||||
DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.xz
|
||||
DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL)
|
||||
|
@ -0,0 +1,270 @@
|
||||
From bd42c77c457146bede32333558b4e0414b30683e Mon Sep 17 00:00:00 2001
|
||||
From: Yongseok Koh <yskoh@mellanox.com>
|
||||
Date: Fri, 24 Aug 2018 16:46:49 -0700
|
||||
Subject: [PATCH] net/mlx5: support externally allocated mempool
|
||||
|
||||
When MLX PMD registers memory for DMA, it accesses the global memseg list
|
||||
of DPDK to maximize the range of registration so that LKey search can be
|
||||
more efficient. Granularity of MR registration is per page.
|
||||
|
||||
Externally allocated memory shouldn't be used for DMA because it can't be
|
||||
searched in the memseg list and free event can't be tracked by DPDK.
|
||||
However, if the external memory is static (allocated on startup and never
|
||||
freed), such memory can also be registered by little tweak in the code.
|
||||
|
||||
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
|
||||
---
|
||||
drivers/net/mlx5/mlx5_mr.c | 155 +++++++++++++++++++++++++++++++++++++++++++
|
||||
drivers/net/mlx5/mlx5_rxtx.h | 35 +++++++++-
|
||||
2 files changed, 189 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c
|
||||
index 08105a443..876622e91 100644
|
||||
--- a/drivers/net/mlx5/mlx5_mr.c
|
||||
+++ b/drivers/net/mlx5/mlx5_mr.c
|
||||
@@ -277,6 +277,23 @@ mr_find_next_chunk(struct mlx5_mr *mr, struct mlx5_mr_cache *entry,
|
||||
uintptr_t end = 0;
|
||||
uint32_t idx = 0;
|
||||
|
||||
+ /* MR for external memory doesn't have memseg list. */
|
||||
+ if (mr->msl == NULL) {
|
||||
+ struct ibv_mr *ibv_mr = mr->ibv_mr;
|
||||
+
|
||||
+ assert(mr->ms_bmp_n == 1);
|
||||
+ assert(mr->ms_n == 1);
|
||||
+ assert(base_idx == 0);
|
||||
+ /*
|
||||
+ * Can't search it from memseg list but get it directly from
|
||||
+ * verbs MR as there's only one chunk.
|
||||
+ */
|
||||
+ entry->start = (uintptr_t)ibv_mr->addr;
|
||||
+ entry->end = (uintptr_t)ibv_mr->addr + mr->ibv_mr->length;
|
||||
+ entry->lkey = rte_cpu_to_be_32(mr->ibv_mr->lkey);
|
||||
+ /* Returning 1 ends iteration. */
|
||||
+ return 1;
|
||||
+ }
|
||||
for (idx = base_idx; idx < mr->ms_bmp_n; ++idx) {
|
||||
if (rte_bitmap_get(mr->ms_bmp, idx)) {
|
||||
const struct rte_memseg_list *msl;
|
||||
@@ -818,6 +835,7 @@ mlx5_mr_mem_event_free_cb(struct rte_eth_dev *dev, const void *addr, size_t len)
|
||||
mr = mr_lookup_dev_list(dev, &entry, start);
|
||||
if (mr == NULL)
|
||||
continue;
|
||||
+ assert(mr->msl); /* Can't be external memory. */
|
||||
ms = rte_mem_virt2memseg((void *)start, msl);
|
||||
assert(ms != NULL);
|
||||
assert(msl->page_sz == ms->hugepage_sz);
|
||||
@@ -1070,6 +1088,139 @@ mlx5_mr_flush_local_cache(struct mlx5_mr_ctrl *mr_ctrl)
|
||||
(void *)mr_ctrl, mr_ctrl->cur_gen);
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * Called during rte_mempool_mem_iter() by mlx5_mr_update_ext_mp().
|
||||
+ *
|
||||
+ * Externally allocated chunk is registered and a MR is created for the chunk.
|
||||
+ * The MR object is added to the global list. If memseg list of a MR object
|
||||
+ * (mr->msl) is null, the MR object can be regarded as externally allocated
|
||||
+ * memory.
|
||||
+ *
|
||||
+ * Once external memory is registered, it should be static. If the memory is
|
||||
+ * freed and the virtual address range has different physical memory mapped
|
||||
+ * again, it may cause crash on device due to the wrong translation entry. PMD
|
||||
+ * can't track the free event of the external memory for now.
|
||||
+ */
|
||||
+static void
|
||||
+mlx5_mr_update_ext_mp_cb(struct rte_mempool *mp, void *opaque,
|
||||
+ struct rte_mempool_memhdr *memhdr,
|
||||
+ unsigned mem_idx __rte_unused)
|
||||
+{
|
||||
+ struct mr_update_mp_data *data = opaque;
|
||||
+ struct rte_eth_dev *dev = data->dev;
|
||||
+ struct priv *priv = dev->data->dev_private;
|
||||
+ struct mlx5_mr_ctrl *mr_ctrl = data->mr_ctrl;
|
||||
+ struct mlx5_mr *mr = NULL;
|
||||
+ uintptr_t addr = (uintptr_t)memhdr->addr;
|
||||
+ size_t len = memhdr->len;
|
||||
+ struct mlx5_mr_cache entry;
|
||||
+ uint32_t lkey;
|
||||
+
|
||||
+ /* If already registered, it should return. */
|
||||
+ rte_rwlock_read_lock(&priv->mr.rwlock);
|
||||
+ lkey = mr_lookup_dev(dev, &entry, addr);
|
||||
+ rte_rwlock_read_unlock(&priv->mr.rwlock);
|
||||
+ if (lkey != UINT32_MAX)
|
||||
+ return;
|
||||
+ mr = rte_zmalloc_socket(NULL,
|
||||
+ RTE_ALIGN_CEIL(sizeof(*mr),
|
||||
+ RTE_CACHE_LINE_SIZE),
|
||||
+ RTE_CACHE_LINE_SIZE, mp->socket_id);
|
||||
+ if (mr == NULL) {
|
||||
+ DRV_LOG(WARNING,
|
||||
+ "port %u unable to allocate memory for a new MR of"
|
||||
+ " mempool (%s).",
|
||||
+ dev->data->port_id, mp->name);
|
||||
+ data->ret = -1;
|
||||
+ return;
|
||||
+ }
|
||||
+ DRV_LOG(DEBUG, "port %u register MR for chunk #%d of mempool (%s)",
|
||||
+ dev->data->port_id, mem_idx, mp->name);
|
||||
+ mr->ibv_mr = mlx5_glue->reg_mr(priv->pd, (void *)addr, len,
|
||||
+ IBV_ACCESS_LOCAL_WRITE);
|
||||
+ if (mr->ibv_mr == NULL) {
|
||||
+ DRV_LOG(WARNING,
|
||||
+ "port %u fail to create a verbs MR for address (%p)",
|
||||
+ dev->data->port_id, (void *)addr);
|
||||
+ rte_free(mr);
|
||||
+ data->ret = -1;
|
||||
+ return;
|
||||
+ }
|
||||
+ mr->msl = NULL; /* Mark it is external memory. */
|
||||
+ mr->ms_bmp = NULL;
|
||||
+ mr->ms_n = 1;
|
||||
+ mr->ms_bmp_n = 1;
|
||||
+ rte_rwlock_write_lock(&priv->mr.rwlock);
|
||||
+ LIST_INSERT_HEAD(&priv->mr.mr_list, mr, mr);
|
||||
+ DRV_LOG(DEBUG,
|
||||
+ "port %u MR CREATED (%p) for external memory %p:\n"
|
||||
+ " [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
|
||||
+ " lkey=0x%x base_idx=%u ms_n=%u, ms_bmp_n=%u",
|
||||
+ dev->data->port_id, (void *)mr, (void *)addr,
|
||||
+ addr, addr + len, rte_cpu_to_be_32(mr->ibv_mr->lkey),
|
||||
+ mr->ms_base_idx, mr->ms_n, mr->ms_bmp_n);
|
||||
+ /* Insert to the global cache table. */
|
||||
+ mr_insert_dev_cache(dev, mr);
|
||||
+ rte_rwlock_write_unlock(&priv->mr.rwlock);
|
||||
+ /* Insert to the local cache table */
|
||||
+ mlx5_mr_addr2mr_bh(dev, mr_ctrl, addr);
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * Register MR for entire memory chunks in a Mempool having externally allocated
|
||||
+ * memory and fill in local cache.
|
||||
+ *
|
||||
+ * @param dev
|
||||
+ * Pointer to Ethernet device.
|
||||
+ * @param mr_ctrl
|
||||
+ * Pointer to per-queue MR control structure.
|
||||
+ * @param mp
|
||||
+ * Pointer to registering Mempool.
|
||||
+ *
|
||||
+ * @return
|
||||
+ * 0 on success, -1 on failure.
|
||||
+ */
|
||||
+static uint32_t
|
||||
+mlx5_mr_update_ext_mp(struct rte_eth_dev *dev, struct mlx5_mr_ctrl *mr_ctrl,
|
||||
+ struct rte_mempool *mp)
|
||||
+{
|
||||
+ struct mr_update_mp_data data = {
|
||||
+ .dev = dev,
|
||||
+ .mr_ctrl = mr_ctrl,
|
||||
+ .ret = 0,
|
||||
+ };
|
||||
+
|
||||
+ rte_mempool_mem_iter(mp, mlx5_mr_update_ext_mp_cb, &data);
|
||||
+ return data.ret;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * Register MR entire memory chunks in a Mempool having externally allocated
|
||||
+ * memory and search LKey of the address to return.
|
||||
+ *
|
||||
+ * @param dev
|
||||
+ * Pointer to Ethernet device.
|
||||
+ * @param addr
|
||||
+ * Search key.
|
||||
+ * @param mp
|
||||
+ * Pointer to registering Mempool where addr belongs.
|
||||
+ *
|
||||
+ * @return
|
||||
+ * LKey for address on success, UINT32_MAX on failure.
|
||||
+ */
|
||||
+uint32_t
|
||||
+mlx5_tx_update_ext_mp(struct mlx5_txq_data *txq, uintptr_t addr,
|
||||
+ struct rte_mempool *mp)
|
||||
+{
|
||||
+ struct mlx5_txq_ctrl *txq_ctrl =
|
||||
+ container_of(txq, struct mlx5_txq_ctrl, txq);
|
||||
+ struct mlx5_mr_ctrl *mr_ctrl = &txq->mr_ctrl;
|
||||
+ struct priv *priv = txq_ctrl->priv;
|
||||
+
|
||||
+ mlx5_mr_update_ext_mp(ETH_DEV(priv), mr_ctrl, mp);
|
||||
+ return mlx5_tx_addr2mr_bh(txq, addr);
|
||||
+}
|
||||
+
|
||||
/* Called during rte_mempool_mem_iter() by mlx5_mr_update_mp(). */
|
||||
static void
|
||||
mlx5_mr_update_mp_cb(struct rte_mempool *mp __rte_unused, void *opaque,
|
||||
@@ -1113,6 +1264,10 @@ mlx5_mr_update_mp(struct rte_eth_dev *dev, struct mlx5_mr_ctrl *mr_ctrl,
|
||||
};
|
||||
|
||||
rte_mempool_mem_iter(mp, mlx5_mr_update_mp_cb, &data);
|
||||
+ if (data.ret < 0 && rte_errno == ENXIO) {
|
||||
+ /* Mempool may have externally allocated memory. */
|
||||
+ return mlx5_mr_update_ext_mp(dev, mr_ctrl, mp);
|
||||
+ }
|
||||
return data.ret;
|
||||
}
|
||||
|
||||
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
|
||||
index f53bb43c3..b61c23b33 100644
|
||||
--- a/drivers/net/mlx5/mlx5_rxtx.h
|
||||
+++ b/drivers/net/mlx5/mlx5_rxtx.h
|
||||
@@ -347,6 +347,8 @@ uint16_t mlx5_rx_burst_vec(void *dpdk_txq, struct rte_mbuf **pkts,
|
||||
void mlx5_mr_flush_local_cache(struct mlx5_mr_ctrl *mr_ctrl);
|
||||
uint32_t mlx5_rx_addr2mr_bh(struct mlx5_rxq_data *rxq, uintptr_t addr);
|
||||
uint32_t mlx5_tx_addr2mr_bh(struct mlx5_txq_data *txq, uintptr_t addr);
|
||||
+uint32_t mlx5_tx_update_ext_mp(struct mlx5_txq_data *txq, uintptr_t addr,
|
||||
+ struct rte_mempool *mp);
|
||||
|
||||
#ifndef NDEBUG
|
||||
/**
|
||||
@@ -534,6 +536,24 @@ mlx5_tx_complete(struct mlx5_txq_data *txq)
|
||||
}
|
||||
|
||||
/**
|
||||
+ * Get Memory Pool (MP) from mbuf. If mbuf is indirect, the pool from which the
|
||||
+ * cloned mbuf is allocated is returned instead.
|
||||
+ *
|
||||
+ * @param buf
|
||||
+ * Pointer to mbuf.
|
||||
+ *
|
||||
+ * @return
|
||||
+ * Memory pool where data is located for given mbuf.
|
||||
+ */
|
||||
+static struct rte_mempool *
|
||||
+mlx5_mb2mp(struct rte_mbuf *buf)
|
||||
+{
|
||||
+ if (unlikely(RTE_MBUF_INDIRECT(buf)))
|
||||
+ return rte_mbuf_from_indirect(buf)->pool;
|
||||
+ return buf->pool;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* Query LKey from a packet buffer for Rx. No need to flush local caches for Rx
|
||||
* as mempool is pre-configured and static.
|
||||
*
|
||||
@@ -591,7 +611,20 @@ mlx5_tx_addr2mr(struct mlx5_txq_data *txq, uintptr_t addr)
|
||||
return mlx5_tx_addr2mr_bh(txq, addr);
|
||||
}
|
||||
|
||||
-#define mlx5_tx_mb2mr(rxq, mb) mlx5_tx_addr2mr(rxq, (uintptr_t)((mb)->buf_addr))
|
||||
+static __rte_always_inline uint32_t
|
||||
+mlx5_tx_mb2mr(struct mlx5_txq_data *txq, struct rte_mbuf *mb)
|
||||
+{
|
||||
+ uintptr_t addr = (uintptr_t)mb->buf_addr;
|
||||
+ uint32_t lkey = mlx5_tx_addr2mr(txq, addr);
|
||||
+
|
||||
+ if (likely(lkey != UINT32_MAX))
|
||||
+ return lkey;
|
||||
+ if (rte_errno == ENXIO) {
|
||||
+ /* Mempool may have externally allocated memory. */
|
||||
+ lkey = mlx5_tx_update_ext_mp(txq, addr, mlx5_mb2mp(mb));
|
||||
+ }
|
||||
+ return lkey;
|
||||
+}
|
||||
|
||||
/**
|
||||
* Ring TX queue doorbell and flush the update if requested.
|
||||
--
|
||||
2.11.0
|
||||
|
@ -0,0 +1,250 @@
|
||||
From c947fd2ec67e9bbacb8b106f320f6e6bae5a9731 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Smith <mgsmith@netgate.com>
|
||||
Date: Tue, 28 Aug 2018 13:21:04 -0500
|
||||
Subject: [PATCH] mlx4: support externally allocated mempool
|
||||
|
||||
Port Mellanox mlx5 PMD patch to work for mlx4 PMD.
|
||||
|
||||
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
|
||||
---
|
||||
drivers/net/mlx4/mlx4_mr.c | 150 +++++++++++++++++++++++++++++++++++++++++++
|
||||
drivers/net/mlx4/mlx4_rxtx.h | 35 +++++++++-
|
||||
2 files changed, 184 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/mlx4/mlx4_mr.c b/drivers/net/mlx4/mlx4_mr.c
|
||||
index d23d3c613..55e5555ce 100644
|
||||
--- a/drivers/net/mlx4/mlx4_mr.c
|
||||
+++ b/drivers/net/mlx4/mlx4_mr.c
|
||||
@@ -289,6 +289,23 @@ mr_find_next_chunk(struct mlx4_mr *mr, struct mlx4_mr_cache *entry,
|
||||
uintptr_t end = 0;
|
||||
uint32_t idx = 0;
|
||||
|
||||
+ /* MR for external memory doesn't have memseg list. */
|
||||
+ if (mr->msl == NULL) {
|
||||
+ struct ibv_mr *ibv_mr = mr->ibv_mr;
|
||||
+
|
||||
+ assert(mr->ms_bmp_n == 1);
|
||||
+ assert(mr->ms_n == 1);
|
||||
+ assert(base_idx == 0);
|
||||
+ /*
|
||||
+ * Can't search it from memseg list but get it directly from
|
||||
+ * verbs MR as there's only one chunk.
|
||||
+ */
|
||||
+ entry->start = (uintptr_t)ibv_mr->addr;
|
||||
+ entry->end = (uintptr_t)ibv_mr->addr + mr->ibv_mr->length;
|
||||
+ entry->lkey = rte_cpu_to_be_32(mr->ibv_mr->lkey);
|
||||
+ /* Returning 1 ends iteration. */
|
||||
+ return 1;
|
||||
+ }
|
||||
for (idx = base_idx; idx < mr->ms_bmp_n; ++idx) {
|
||||
if (rte_bitmap_get(mr->ms_bmp, idx)) {
|
||||
const struct rte_memseg_list *msl;
|
||||
@@ -809,6 +826,7 @@ mlx4_mr_mem_event_free_cb(struct rte_eth_dev *dev, const void *addr, size_t len)
|
||||
mr = mr_lookup_dev_list(dev, &entry, start);
|
||||
if (mr == NULL)
|
||||
continue;
|
||||
+ assert(mr->msl); /* Can't be external memory. */
|
||||
ms = rte_mem_virt2memseg((void *)start, msl);
|
||||
assert(ms != NULL);
|
||||
assert(msl->page_sz == ms->hugepage_sz);
|
||||
@@ -1055,6 +1073,134 @@ mlx4_mr_flush_local_cache(struct mlx4_mr_ctrl *mr_ctrl)
|
||||
(void *)mr_ctrl, mr_ctrl->cur_gen);
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * Called during rte_mempool_mem_iter() by mlx4_mr_update_ext_mp().
|
||||
+ *
|
||||
+ * Externally allocated chunk is registered and a MR is created for the chunk.
|
||||
+ * The MR object is added to the global list. If memseg list of a MR object
|
||||
+ * (mr->msl) is null, the MR object can be regarded as externally allocated
|
||||
+ * memory.
|
||||
+ *
|
||||
+ * Once external memory is registered, it should be static. If the memory is
|
||||
+ * freed and the virtual address range has different physical memory mapped
|
||||
+ * again, it may cause crash on device due to the wrong translation entry. PMD
|
||||
+ * can't track the free event of the external memory for now.
|
||||
+ */
|
||||
+static void
|
||||
+mlx4_mr_update_ext_mp_cb(struct rte_mempool *mp, void *opaque,
|
||||
+ struct rte_mempool_memhdr *memhdr,
|
||||
+ unsigned mem_idx __rte_unused)
|
||||
+{
|
||||
+ struct mr_update_mp_data *data = opaque;
|
||||
+ struct rte_eth_dev *dev = data->dev;
|
||||
+ struct priv *priv = dev->data->dev_private;
|
||||
+ struct mlx4_mr_ctrl *mr_ctrl = data->mr_ctrl;
|
||||
+ struct mlx4_mr *mr = NULL;
|
||||
+ uintptr_t addr = (uintptr_t)memhdr->addr;
|
||||
+ size_t len = memhdr->len;
|
||||
+ struct mlx4_mr_cache entry;
|
||||
+ uint32_t lkey;
|
||||
+
|
||||
+ /* If already registered, it should return. */
|
||||
+ rte_rwlock_read_lock(&priv->mr.rwlock);
|
||||
+ lkey = mr_lookup_dev(dev, &entry, addr);
|
||||
+ rte_rwlock_read_unlock(&priv->mr.rwlock);
|
||||
+ if (lkey != UINT32_MAX)
|
||||
+ return;
|
||||
+ mr = rte_zmalloc_socket(NULL,
|
||||
+ RTE_ALIGN_CEIL(sizeof(*mr),
|
||||
+ RTE_CACHE_LINE_SIZE),
|
||||
+ RTE_CACHE_LINE_SIZE, mp->socket_id);
|
||||
+ if (mr == NULL) {
|
||||
+ WARN("port %u unable to allocate memory for a new MR of"
|
||||
+ " mempool (%s).",
|
||||
+ dev->data->port_id, mp->name);
|
||||
+ data->ret = -1;
|
||||
+ return;
|
||||
+ }
|
||||
+ DEBUG("port %u register MR for chunk #%d of mempool (%s)",
|
||||
+ dev->data->port_id, mem_idx, mp->name);
|
||||
+ mr->ibv_mr = mlx4_glue->reg_mr(priv->pd, (void *)addr, len,
|
||||
+ IBV_ACCESS_LOCAL_WRITE);
|
||||
+ if (mr->ibv_mr == NULL) {
|
||||
+ WARN("port %u fail to create a verbs MR for address (%p)",
|
||||
+ dev->data->port_id, (void *)addr);
|
||||
+ rte_free(mr);
|
||||
+ data->ret = -1;
|
||||
+ return;
|
||||
+ }
|
||||
+ mr->msl = NULL; /* Mark it is external memory. */
|
||||
+ mr->ms_bmp = NULL;
|
||||
+ mr->ms_n = 1;
|
||||
+ mr->ms_bmp_n = 1;
|
||||
+ rte_rwlock_write_lock(&priv->mr.rwlock);
|
||||
+ LIST_INSERT_HEAD(&priv->mr.mr_list, mr, mr);
|
||||
+ DEBUG("port %u MR CREATED (%p) for external memory %p:\n"
|
||||
+ " [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
|
||||
+ " lkey=0x%x base_idx=%u ms_n=%u, ms_bmp_n=%u",
|
||||
+ dev->data->port_id, (void *)mr, (void *)addr,
|
||||
+ addr, addr + len, rte_cpu_to_be_32(mr->ibv_mr->lkey),
|
||||
+ mr->ms_base_idx, mr->ms_n, mr->ms_bmp_n);
|
||||
+ /* Insert to the global cache table. */
|
||||
+ mr_insert_dev_cache(dev, mr);
|
||||
+ rte_rwlock_write_unlock(&priv->mr.rwlock);
|
||||
+ /* Insert to the local cache table */
|
||||
+ mlx4_mr_addr2mr_bh(dev, mr_ctrl, addr);
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * Register MR for entire memory chunks in a Mempool having externally allocated
|
||||
+ * memory and fill in local cache.
|
||||
+ *
|
||||
+ * @param dev
|
||||
+ * Pointer to Ethernet device.
|
||||
+ * @param mr_ctrl
|
||||
+ * Pointer to per-queue MR control structure.
|
||||
+ * @param mp
|
||||
+ * Pointer to registering Mempool.
|
||||
+ *
|
||||
+ * @return
|
||||
+ * 0 on success, -1 on failure.
|
||||
+ */
|
||||
+static uint32_t
|
||||
+mlx4_mr_update_ext_mp(struct rte_eth_dev *dev, struct mlx4_mr_ctrl *mr_ctrl,
|
||||
+ struct rte_mempool *mp)
|
||||
+{
|
||||
+ struct mr_update_mp_data data = {
|
||||
+ .dev = dev,
|
||||
+ .mr_ctrl = mr_ctrl,
|
||||
+ .ret = 0,
|
||||
+ };
|
||||
+
|
||||
+ rte_mempool_mem_iter(mp, mlx4_mr_update_ext_mp_cb, &data);
|
||||
+ return data.ret;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * Register MR entire memory chunks in a Mempool having externally allocated
|
||||
+ * memory and search LKey of the address to return.
|
||||
+ *
|
||||
+ * @param dev
|
||||
+ * Pointer to Ethernet device.
|
||||
+ * @param addr
|
||||
+ * Search key.
|
||||
+ * @param mp
|
||||
+ * Pointer to registering Mempool where addr belongs.
|
||||
+ *
|
||||
+ * @return
|
||||
+ * LKey for address on success, UINT32_MAX on failure.
|
||||
+ */
|
||||
+uint32_t
|
||||
+mlx4_tx_update_ext_mp(struct txq *txq, uintptr_t addr,
|
||||
+ struct rte_mempool *mp)
|
||||
+{
|
||||
+ struct mlx4_mr_ctrl *mr_ctrl = &txq->mr_ctrl;
|
||||
+ struct priv *priv = txq->priv;
|
||||
+
|
||||
+ mlx4_mr_update_ext_mp(priv->dev, mr_ctrl, mp);
|
||||
+ return mlx4_tx_addr2mr_bh(txq, addr);
|
||||
+}
|
||||
+
|
||||
/* Called during rte_mempool_mem_iter() by mlx4_mr_update_mp(). */
|
||||
static void
|
||||
mlx4_mr_update_mp_cb(struct rte_mempool *mp __rte_unused, void *opaque,
|
||||
@@ -1098,6 +1244,10 @@ mlx4_mr_update_mp(struct rte_eth_dev *dev, struct mlx4_mr_ctrl *mr_ctrl,
|
||||
};
|
||||
|
||||
rte_mempool_mem_iter(mp, mlx4_mr_update_mp_cb, &data);
|
||||
+ if (data.ret < 0 && rte_errno == ENXIO) {
|
||||
+ /* Mempool may have externally allocated memory. */
|
||||
+ return mlx4_mr_update_ext_mp(dev, mr_ctrl, mp);
|
||||
+ }
|
||||
return data.ret;
|
||||
}
|
||||
|
||||
diff --git a/drivers/net/mlx4/mlx4_rxtx.h b/drivers/net/mlx4/mlx4_rxtx.h
|
||||
index ffa8abfca..1be060cda 100644
|
||||
--- a/drivers/net/mlx4/mlx4_rxtx.h
|
||||
+++ b/drivers/net/mlx4/mlx4_rxtx.h
|
||||
@@ -163,6 +163,26 @@ void mlx4_tx_queue_release(void *dpdk_txq);
|
||||
void mlx4_mr_flush_local_cache(struct mlx4_mr_ctrl *mr_ctrl);
|
||||
uint32_t mlx4_rx_addr2mr_bh(struct rxq *rxq, uintptr_t addr);
|
||||
uint32_t mlx4_tx_addr2mr_bh(struct txq *txq, uintptr_t addr);
|
||||
+uint32_t mlx4_tx_update_ext_mp(struct txq *txq, uintptr_t addr,
|
||||
+ struct rte_mempool *mp);
|
||||
+
|
||||
+/**
|
||||
+ * Get Memory Pool (MP) from mbuf. If mbuf is indirect, the pool from which the
|
||||
+ * cloned mbuf is allocated is returned instead.
|
||||
+ *
|
||||
+ * @param buf
|
||||
+ * Pointer to mbuf.
|
||||
+ *
|
||||
+ * @return
|
||||
+ * Memory pool where data is located for given mbuf.
|
||||
+ */
|
||||
+static struct rte_mempool *
|
||||
+mlx4_mb2mp(struct rte_mbuf *buf)
|
||||
+{
|
||||
+ if (unlikely(RTE_MBUF_INDIRECT(buf)))
|
||||
+ return rte_mbuf_from_indirect(buf)->pool;
|
||||
+ return buf->pool;
|
||||
+}
|
||||
|
||||
/**
|
||||
* Query LKey from a packet buffer for Rx. No need to flush local caches for Rx
|
||||
@@ -222,6 +242,19 @@ mlx4_tx_addr2mr(struct txq *txq, uintptr_t addr)
|
||||
return mlx4_tx_addr2mr_bh(txq, addr);
|
||||
}
|
||||
|
||||
-#define mlx4_tx_mb2mr(rxq, mb) mlx4_tx_addr2mr(rxq, (uintptr_t)((mb)->buf_addr))
|
||||
+static __rte_always_inline uint32_t
|
||||
+mlx4_tx_mb2mr(struct txq *txq, struct rte_mbuf *mb)
|
||||
+{
|
||||
+ uintptr_t addr = (uintptr_t)mb->buf_addr;
|
||||
+ uint32_t lkey = mlx4_tx_addr2mr(txq, addr);
|
||||
+
|
||||
+ if (likely(lkey != UINT32_MAX))
|
||||
+ return lkey;
|
||||
+ if (rte_errno == ENXIO) {
|
||||
+ /* Mempool may have externally allocated memory. */
|
||||
+ lkey = mlx4_tx_update_ext_mp(txq, addr, mlx4_mb2mp(mb));
|
||||
+ }
|
||||
+ return lkey;
|
||||
+}
|
||||
|
||||
#endif /* MLX4_RXTX_H_ */
|
||||
--
|
||||
2.15.2 (Apple Git-101.1)
|
||||
|
@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env python
|
||||
import os, fnmatch, subprocess
|
||||
|
||||
starttag = 'v18.04-rc0'
|
||||
endtag = 'v18.04-rc2'
|
||||
starttag = 'v18.07-rc0'
|
||||
endtag = 'v18.07'
|
||||
emit_md = True
|
||||
apifiles = []
|
||||
|
||||
|
@ -127,6 +127,8 @@ libvom_la_SOURCES = \
|
||||
neighbour_cmds.cpp \
|
||||
object_base.cpp \
|
||||
om.cpp \
|
||||
pipe.cpp \
|
||||
pipe_cmds.cpp \
|
||||
prefix.cpp \
|
||||
ra_config.cpp \
|
||||
ra_prefix.cpp \
|
||||
@ -214,6 +216,7 @@ vominclude_HEADERS = \
|
||||
neighbour.hpp \
|
||||
object_base.hpp \
|
||||
om.hpp \
|
||||
pipe.hpp \
|
||||
prefix.hpp \
|
||||
ra_config.hpp \
|
||||
ra_prefix.hpp \
|
||||
|
@ -34,9 +34,7 @@ l3_bind_cmd::issue(connection& con)
|
||||
|
||||
VAPI_CALL(req.execute());
|
||||
|
||||
m_hw_item.set(wait());
|
||||
|
||||
return rc_t::OK;
|
||||
return (wait());
|
||||
}
|
||||
|
||||
template <>
|
||||
@ -64,9 +62,7 @@ l3_unbind_cmd::issue(connection& con)
|
||||
|
||||
VAPI_CALL(req.execute());
|
||||
|
||||
m_hw_item.set(wait());
|
||||
|
||||
return rc_t::OK;
|
||||
return (wait());
|
||||
}
|
||||
|
||||
template <>
|
||||
@ -116,9 +112,7 @@ l2_bind_cmd::issue(connection& con)
|
||||
|
||||
VAPI_CALL(req.execute());
|
||||
|
||||
m_hw_item.set(wait());
|
||||
|
||||
return rc_t::OK;
|
||||
return (wait());
|
||||
}
|
||||
|
||||
template <>
|
||||
@ -145,9 +139,7 @@ l2_unbind_cmd::issue(connection& con)
|
||||
|
||||
VAPI_CALL(req.execute());
|
||||
|
||||
m_hw_item.set(wait());
|
||||
|
||||
return rc_t::OK;
|
||||
return (wait());
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@ -29,7 +29,7 @@ namespace binding_cmds {
|
||||
* A command class that binds the ACL to the interface
|
||||
*/
|
||||
template <typename BIND>
|
||||
class bind_cmd : public rpc_cmd<HW::item<bool>, rc_t, BIND>
|
||||
class bind_cmd : public rpc_cmd<HW::item<bool>, BIND>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@ -39,7 +39,7 @@ public:
|
||||
const direction_t& direction,
|
||||
const handle_t& itf,
|
||||
const handle_t& acl)
|
||||
: rpc_cmd<HW::item<bool>, rc_t, BIND>(item)
|
||||
: rpc_cmd<HW::item<bool>, BIND>(item)
|
||||
, m_direction(direction)
|
||||
, m_itf(itf)
|
||||
, m_acl(acl)
|
||||
@ -85,7 +85,7 @@ private:
|
||||
* A command class that binds the ACL to the interface
|
||||
*/
|
||||
template <typename BIND>
|
||||
class unbind_cmd : public rpc_cmd<HW::item<bool>, rc_t, BIND>
|
||||
class unbind_cmd : public rpc_cmd<HW::item<bool>, BIND>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@ -95,7 +95,7 @@ public:
|
||||
const direction_t& direction,
|
||||
const handle_t& itf,
|
||||
const handle_t& acl)
|
||||
: rpc_cmd<HW::item<bool>, rc_t, BIND>(item)
|
||||
: rpc_cmd<HW::item<bool>, BIND>(item)
|
||||
, m_direction(direction)
|
||||
, m_itf(itf)
|
||||
, m_acl(acl)
|
||||
|
@ -58,9 +58,7 @@ bind_cmd::issue(connection& con)
|
||||
|
||||
VAPI_CALL(req.execute());
|
||||
|
||||
m_hw_item.set(wait());
|
||||
|
||||
return rc_t::OK;
|
||||
return (wait());
|
||||
}
|
||||
|
||||
std::string
|
||||
|
@ -28,9 +28,8 @@ namespace acl_ethertype_cmds {
|
||||
/**
|
||||
* A command class that binds the ethertype list to the interface
|
||||
*/
|
||||
class bind_cmd : public rpc_cmd<HW::item<bool>,
|
||||
rc_t,
|
||||
vapi::Acl_interface_set_etype_whitelist>
|
||||
class bind_cmd
|
||||
: public rpc_cmd<HW::item<bool>, vapi::Acl_interface_set_etype_whitelist>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@ -69,9 +68,8 @@ private:
|
||||
/**
|
||||
* A command class that unbinds the ethertype list to the interface
|
||||
*/
|
||||
class unbind_cmd : public rpc_cmd<HW::item<bool>,
|
||||
rc_t,
|
||||
vapi::Acl_interface_set_etype_whitelist>
|
||||
class unbind_cmd
|
||||
: public rpc_cmd<HW::item<bool>, vapi::Acl_interface_set_etype_whitelist>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -74,7 +74,8 @@ l3_update_cmd::issue(connection& con)
|
||||
|
||||
VAPI_CALL(req.execute());
|
||||
|
||||
m_hw_item = wait();
|
||||
wait();
|
||||
|
||||
if (m_hw_item.rc() == rc_t::OK)
|
||||
insert_acl();
|
||||
|
||||
@ -140,7 +141,8 @@ l2_update_cmd::issue(connection& con)
|
||||
|
||||
VAPI_CALL(req.execute());
|
||||
|
||||
m_hw_item = wait();
|
||||
wait();
|
||||
|
||||
if (m_hw_item.rc() == rc_t::OK)
|
||||
insert_acl();
|
||||
|
||||
|
@ -29,8 +29,7 @@ namespace list_cmds {
|
||||
* A command class that Create the list
|
||||
*/
|
||||
template <typename RULE, typename UPDATE>
|
||||
class update_cmd
|
||||
: public rpc_cmd<HW::item<handle_t>, HW::item<handle_t>, UPDATE>
|
||||
class update_cmd : public rpc_cmd<HW::item<handle_t>, UPDATE>
|
||||
{
|
||||
public:
|
||||
typedef typename list<RULE>::rules_t cmd_rules_t;
|
||||
@ -42,7 +41,7 @@ public:
|
||||
update_cmd(HW::item<handle_t>& item,
|
||||
const cmd_key_t& key,
|
||||
const cmd_rules_t& rules)
|
||||
: rpc_cmd<HW::item<handle_t>, HW::item<handle_t>, UPDATE>(item)
|
||||
: rpc_cmd<HW::item<handle_t>, UPDATE>(item)
|
||||
, m_key(key)
|
||||
, m_rules(rules)
|
||||
{
|
||||
@ -78,7 +77,7 @@ public:
|
||||
|
||||
void succeeded()
|
||||
{
|
||||
rpc_cmd<HW::item<handle_t>, HW::item<handle_t>, UPDATE>::succeeded();
|
||||
rpc_cmd<HW::item<handle_t>, UPDATE>::succeeded();
|
||||
list<RULE>::add(m_key, this->item());
|
||||
}
|
||||
|
||||
@ -124,14 +123,14 @@ private:
|
||||
* A cmd class that Deletes an ACL
|
||||
*/
|
||||
template <typename RULE, typename DELETE>
|
||||
class delete_cmd : public rpc_cmd<HW::item<handle_t>, rc_t, DELETE>
|
||||
class delete_cmd : public rpc_cmd<HW::item<handle_t>, DELETE>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
delete_cmd(HW::item<handle_t>& item)
|
||||
: rpc_cmd<HW::item<handle_t>, rc_t, DELETE>(item)
|
||||
: rpc_cmd<HW::item<handle_t>, DELETE>(item)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -41,9 +41,7 @@ bind_cmd::issue(connection& con)
|
||||
|
||||
VAPI_CALL(req.execute());
|
||||
|
||||
m_hw_item.set(wait());
|
||||
|
||||
return rc_t::OK;
|
||||
return (wait());
|
||||
}
|
||||
|
||||
std::string
|
||||
|
@ -27,7 +27,7 @@ namespace arp_proxy_binding_cmds {
|
||||
* A command class that binds the LLDP config to the interface
|
||||
*/
|
||||
class bind_cmd
|
||||
: public rpc_cmd<HW::item<bool>, rc_t, vapi::Proxy_arp_intfc_enable_disable>
|
||||
: public rpc_cmd<HW::item<bool>, vapi::Proxy_arp_intfc_enable_disable>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@ -60,7 +60,7 @@ private:
|
||||
* A cmd class that Unbinds ArpProxy Config from an interface
|
||||
*/
|
||||
class unbind_cmd
|
||||
: public rpc_cmd<HW::item<bool>, rc_t, vapi::Proxy_arp_intfc_enable_disable>
|
||||
: public rpc_cmd<HW::item<bool>, vapi::Proxy_arp_intfc_enable_disable>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -48,7 +48,7 @@ config_cmd::issue(connection& con)
|
||||
|
||||
VAPI_CALL(req.execute());
|
||||
|
||||
m_hw_item.set(wait());
|
||||
wait();
|
||||
|
||||
return (rc_t::OK);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ namespace arp_proxy_config_cmds {
|
||||
/**
|
||||
* A command class that adds the ARP Proxy config
|
||||
*/
|
||||
class config_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::Proxy_arp_add_del>
|
||||
class config_cmd : public rpc_cmd<HW::item<bool>, vapi::Proxy_arp_add_del>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@ -62,8 +62,7 @@ private:
|
||||
/**
|
||||
* A cmd class that Unconfigs ArpProxy Config from an interface
|
||||
*/
|
||||
class unconfig_cmd
|
||||
: public rpc_cmd<HW::item<bool>, rc_t, vapi::Proxy_arp_add_del>
|
||||
class unconfig_cmd : public rpc_cmd<HW::item<bool>, vapi::Proxy_arp_add_del>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -161,7 +161,7 @@ bond_group_binding::event_handler::order() const
|
||||
* We want enslaved interfaces bind to bond after interface
|
||||
* but before anything else.
|
||||
*/
|
||||
return (dependency_t::BOND_BINDING);
|
||||
return (dependency_t::VIRTUAL_INTERFACE);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -45,9 +45,7 @@ bind_cmd::issue(connection& con)
|
||||
|
||||
VAPI_CALL(req.execute());
|
||||
|
||||
m_hw_item.set(wait());
|
||||
|
||||
return rc_t::OK;
|
||||
return (wait());
|
||||
}
|
||||
|
||||
std::string
|
||||
|
@ -26,7 +26,7 @@ namespace bond_group_binding_cmds {
|
||||
/**
|
||||
* A command class that binds the slave interface to the bond interface
|
||||
*/
|
||||
class bind_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::Bond_enslave>
|
||||
class bind_cmd : public rpc_cmd<HW::item<bool>, vapi::Bond_enslave>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@ -65,7 +65,7 @@ private:
|
||||
/**
|
||||
* A cmd class that detach slave from a bond interface
|
||||
*/
|
||||
class unbind_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::Bond_detach_slave>
|
||||
class unbind_cmd : public rpc_cmd<HW::item<bool>, vapi::Bond_detach_slave>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -51,7 +51,8 @@ create_cmd::issue(connection& con)
|
||||
|
||||
VAPI_CALL(req.execute());
|
||||
|
||||
m_hw_item = wait();
|
||||
wait();
|
||||
|
||||
if (m_hw_item.rc() == rc_t::OK) {
|
||||
insert_interface();
|
||||
}
|
||||
|
@ -49,9 +49,7 @@ create_cmd::issue(connection& con)
|
||||
|
||||
VAPI_CALL(req.execute());
|
||||
|
||||
m_hw_item.set(wait());
|
||||
|
||||
return rc_t::OK;
|
||||
return (wait());
|
||||
}
|
||||
|
||||
std::string
|
||||
|
@ -27,7 +27,7 @@ namespace bridge_domain_arp_entry_cmds {
|
||||
/**
|
||||
* A command class that creates or updates the bridge domain ARP Entry
|
||||
*/
|
||||
class create_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::Bd_ip_mac_add_del>
|
||||
class create_cmd : public rpc_cmd<HW::item<bool>, vapi::Bd_ip_mac_add_del>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@ -62,7 +62,7 @@ private:
|
||||
/**
|
||||
* A cmd class that deletes a bridge domain ARP entry
|
||||
*/
|
||||
class delete_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::Bd_ip_mac_add_del>
|
||||
class delete_cmd : public rpc_cmd<HW::item<bool>, vapi::Bd_ip_mac_add_del>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -55,9 +55,7 @@ create_cmd::issue(connection& con)
|
||||
|
||||
VAPI_CALL(req.execute());
|
||||
|
||||
m_hw_item.set(wait());
|
||||
|
||||
return (rc_t::OK);
|
||||
return (wait());
|
||||
}
|
||||
|
||||
std::string
|
||||
|
@ -28,7 +28,7 @@ namespace bridge_domain_cmds {
|
||||
* A command class that creates an Bridge-Domain
|
||||
*/
|
||||
class create_cmd
|
||||
: public rpc_cmd<HW::item<uint32_t>, rc_t, vapi::Bridge_domain_add_del>
|
||||
: public rpc_cmd<HW::item<uint32_t>, vapi::Bridge_domain_add_del>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@ -77,7 +77,7 @@ private:
|
||||
* A cmd class that Delete an Bridge-Domain
|
||||
*/
|
||||
class delete_cmd
|
||||
: public rpc_cmd<HW::item<uint32_t>, rc_t, vapi::Bridge_domain_add_del>
|
||||
: public rpc_cmd<HW::item<uint32_t>, vapi::Bridge_domain_add_del>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -51,9 +51,7 @@ create_cmd::issue(connection& con)
|
||||
|
||||
VAPI_CALL(req.execute());
|
||||
|
||||
m_hw_item.set(wait());
|
||||
|
||||
return rc_t::OK;
|
||||
return (wait());
|
||||
}
|
||||
|
||||
std::string
|
||||
|
@ -28,7 +28,7 @@ namespace bridge_domain_entry_cmds {
|
||||
/**
|
||||
* A command class that creates or updates the bridge_domain
|
||||
*/
|
||||
class create_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::L2fib_add_del>
|
||||
class create_cmd : public rpc_cmd<HW::item<bool>, vapi::L2fib_add_del>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@ -65,7 +65,7 @@ private:
|
||||
/**
|
||||
* A cmd class that deletes a bridge_domain
|
||||
*/
|
||||
class delete_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::L2fib_add_del>
|
||||
class delete_cmd : public rpc_cmd<HW::item<bool>, vapi::L2fib_add_del>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -63,9 +63,7 @@ bind_cmd::issue(connection& con)
|
||||
|
||||
VAPI_CALL(req.execute());
|
||||
|
||||
m_hw_item.set(wait());
|
||||
|
||||
return rc_t::OK;
|
||||
return (wait());
|
||||
}
|
||||
|
||||
std::string
|
||||
|
@ -29,7 +29,7 @@ namespace dhcp_client_cmds {
|
||||
/**
|
||||
* A command class that binds the DHCP config to the interface
|
||||
*/
|
||||
class bind_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::Dhcp_client_config>
|
||||
class bind_cmd : public rpc_cmd<HW::item<bool>, vapi::Dhcp_client_config>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@ -80,8 +80,7 @@ private:
|
||||
/**
|
||||
* A cmd class that Unbinds Dhcp Config from an interface
|
||||
*/
|
||||
class unbind_cmd
|
||||
: public rpc_cmd<HW::item<bool>, rc_t, vapi::Dhcp_client_config>
|
||||
class unbind_cmd : public rpc_cmd<HW::item<bool>, vapi::Dhcp_client_config>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user