summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/dpdk/buffer.c1
-rw-r--r--src/plugins/dpdk/buffer.h34
-rw-r--r--src/plugins/dpdk/device/cli.c1
-rw-r--r--src/plugins/dpdk/device/common.c2
-rw-r--r--src/plugins/dpdk/device/device.c2
-rw-r--r--src/plugins/dpdk/device/dpdk.h8
-rw-r--r--src/plugins/dpdk/device/dpdk_priv.h3
-rw-r--r--src/plugins/dpdk/device/init.c1
-rw-r--r--src/plugins/dpdk/device/node.c1
-rw-r--r--src/plugins/dpdk/ipsec/crypto_node.c1
-rw-r--r--src/plugins/dpdk/ipsec/esp_decrypt.c1
-rw-r--r--src/plugins/dpdk/ipsec/esp_encrypt.c1
12 files changed, 43 insertions, 13 deletions
diff --git a/src/plugins/dpdk/buffer.c b/src/plugins/dpdk/buffer.c
index 827e7e85923..aed194074cc 100644
--- a/src/plugins/dpdk/buffer.c
+++ b/src/plugins/dpdk/buffer.c
@@ -77,6 +77,7 @@
#include <vnet/vnet.h>
#include <dpdk/device/dpdk.h>
#include <dpdk/device/dpdk_priv.h>
+#include <dpdk/buffer.h>
STATIC_ASSERT (VLIB_BUFFER_PRE_DATA_SIZE == RTE_PKTMBUF_HEADROOM,
"VLIB_BUFFER_PRE_DATA_SIZE must be equal to RTE_PKTMBUF_HEADROOM");
diff --git a/src/plugins/dpdk/buffer.h b/src/plugins/dpdk/buffer.h
new file mode 100644
index 00000000000..56bf4fff3e6
--- /dev/null
+++ b/src/plugins/dpdk/buffer.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2017-2019 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef include_dpdk_buffer_h
+#define include_dpdk_buffer_h
+
+#define rte_mbuf_from_vlib_buffer(x) (((struct rte_mbuf *)x) - 1)
+#define vlib_buffer_from_rte_mbuf(x) ((vlib_buffer_t *)(x+1))
+
+clib_error_t *dpdk_buffer_pool_create (vlib_main_t * vm, unsigned num_mbufs,
+ unsigned socket_id);
+
+#endif /* include_dpdk_buffer_h */
+
+/** @endcond */
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */
diff --git a/src/plugins/dpdk/device/cli.c b/src/plugins/dpdk/device/cli.c
index 7e20f565a8c..bbe367f7ec5 100644
--- a/src/plugins/dpdk/device/cli.c
+++ b/src/plugins/dpdk/device/cli.c
@@ -24,6 +24,7 @@
#include <vppinfra/linux/sysfs.c>
#include <vnet/ethernet/ethernet.h>
+#include <dpdk/buffer.h>
#include <dpdk/device/dpdk.h>
#include <vnet/classify/vnet_classify.h>
#include <vnet/mpls/packet.h>
diff --git a/src/plugins/dpdk/device/common.c b/src/plugins/dpdk/device/common.c
index 57430eff977..25d5802899f 100644
--- a/src/plugins/dpdk/device/common.c
+++ b/src/plugins/dpdk/device/common.c
@@ -22,8 +22,8 @@
#include <vnet/ip/ip.h>
#include <vnet/ethernet/ethernet.h>
#include <vnet/ethernet/arp_packet.h>
+#include <dpdk/buffer.h>
#include <dpdk/device/dpdk.h>
-
#include <dpdk/device/dpdk_priv.h>
#include <vppinfra/error.h>
diff --git a/src/plugins/dpdk/device/device.c b/src/plugins/dpdk/device/device.c
index 9b54f34a5b2..86b9a50f41b 100644
--- a/src/plugins/dpdk/device/device.c
+++ b/src/plugins/dpdk/device/device.c
@@ -19,8 +19,8 @@
#include <assert.h>
#include <vnet/ethernet/ethernet.h>
+#include <dpdk/buffer.h>
#include <dpdk/device/dpdk.h>
-
#include <dpdk/device/dpdk_priv.h>
#include <vppinfra/error.h>
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index a1e07b42ca7..425cf265873 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -530,14 +530,6 @@ clib_error_t *unformat_rss_fn (unformat_input_t * input, uword * rss_fn);
clib_error_t *unformat_hqos (unformat_input_t * input,
dpdk_device_config_hqos_t * hqos);
-clib_error_t *dpdk_pool_create (vlib_main_t * vm, u8 * pool_name,
- u32 elt_size, u32 num_elts,
- u32 pool_priv_size, u16 cache_size, u8 numa,
- struct rte_mempool **_mp, u32 * map_index);
-
-clib_error_t *dpdk_buffer_pool_create (vlib_main_t * vm, unsigned num_mbufs,
- unsigned socket_id);
-
struct rte_pci_device *dpdk_get_pci_device (const struct rte_eth_dev_info
*info);
diff --git a/src/plugins/dpdk/device/dpdk_priv.h b/src/plugins/dpdk/device/dpdk_priv.h
index b44cd49142c..1956cca19c3 100644
--- a/src/plugins/dpdk/device/dpdk_priv.h
+++ b/src/plugins/dpdk/device/dpdk_priv.h
@@ -13,9 +13,6 @@
* limitations under the License.
*/
-#define rte_mbuf_from_vlib_buffer(x) (((struct rte_mbuf *)x) - 1)
-#define vlib_buffer_from_rte_mbuf(x) ((vlib_buffer_t *)(x+1))
-
#define DPDK_NB_RX_DESC_DEFAULT 1024
#define DPDK_NB_TX_DESC_DEFAULT 1024
#define DPDK_NB_RX_DESC_VIRTIO 256
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 93f020595a9..dcff0e52293 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -22,6 +22,7 @@
#include <vlib/log.h>
#include <vnet/ethernet/ethernet.h>
+#include <dpdk/buffer.h>
#include <dpdk/device/dpdk.h>
#include <vlib/pci/pci.h>
#include <vlib/vmbus/vmbus.h>
diff --git a/src/plugins/dpdk/device/node.c b/src/plugins/dpdk/device/node.c
index 250ded5048c..7db66ffab25 100644
--- a/src/plugins/dpdk/device/node.c
+++ b/src/plugins/dpdk/device/node.c
@@ -19,6 +19,7 @@
#include <vppinfra/xxhash.h>
#include <vnet/ethernet/ethernet.h>
+#include <dpdk/buffer.h>
#include <dpdk/device/dpdk.h>
#include <vnet/classify/vnet_classify.h>
#include <vnet/mpls/packet.h>
diff --git a/src/plugins/dpdk/ipsec/crypto_node.c b/src/plugins/dpdk/ipsec/crypto_node.c
index 966e86da288..84782b17ad4 100644
--- a/src/plugins/dpdk/ipsec/crypto_node.c
+++ b/src/plugins/dpdk/ipsec/crypto_node.c
@@ -22,6 +22,7 @@
#include <vnet/ethernet/ethernet.h>
#include <vnet/ipsec/ipsec.h>
+#include <dpdk/buffer.h>
#include <dpdk/device/dpdk.h>
#include <dpdk/device/dpdk_priv.h>
#include <dpdk/ipsec/ipsec.h>
diff --git a/src/plugins/dpdk/ipsec/esp_decrypt.c b/src/plugins/dpdk/ipsec/esp_decrypt.c
index dff22439ce4..d8d1d385f0f 100644
--- a/src/plugins/dpdk/ipsec/esp_decrypt.c
+++ b/src/plugins/dpdk/ipsec/esp_decrypt.c
@@ -21,6 +21,7 @@
#include <vnet/ipsec/ipsec.h>
#include <vnet/ipsec/esp.h>
+#include <dpdk/buffer.h>
#include <dpdk/ipsec/ipsec.h>
#include <dpdk/device/dpdk.h>
#include <dpdk/device/dpdk_priv.h>
diff --git a/src/plugins/dpdk/ipsec/esp_encrypt.c b/src/plugins/dpdk/ipsec/esp_encrypt.c
index cdeeb4022f6..fc12eece989 100644
--- a/src/plugins/dpdk/ipsec/esp_encrypt.c
+++ b/src/plugins/dpdk/ipsec/esp_encrypt.c
@@ -22,6 +22,7 @@
#include <vnet/ipsec/ipsec.h>
#include <vnet/ipsec/esp.h>
#include <vnet/udp/udp.h>
+#include <dpdk/buffer.h>
#include <dpdk/ipsec/ipsec.h>
#include <dpdk/device/dpdk.h>
#include <dpdk/device/dpdk_priv.h>