summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-02-27 11:29:20 +0100
committerNeale Ranns <nranns@cisco.com>2017-02-27 12:27:43 +0000
commitff542707733102b2573dca2496ea427b3dba3b10 (patch)
treedf4267e0a6111dd95bc17f6c787ad882c685fec4
parent39f9d8bd226ab5aa366f181a5cbf7c873f599e06 (diff)
vlib: add VLIB_BUFFER_EXT_HDR_VALID flag
Change-Id: If56c66dd12eded1cc997087de5fd1b975766c4e2 Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--src/vlib/buffer.h2
-rw-r--r--src/vnet/buffer.h3
-rw-r--r--src/vnet/devices/dpdk/device.c2
-rwxr-xr-xsrc/vnet/devices/dpdk/init.c2
4 files changed, 4 insertions, 5 deletions
diff --git a/src/vlib/buffer.h b/src/vlib/buffer.h
index fffb50c8fe5..8ea79502455 100644
--- a/src/vlib/buffer.h
+++ b/src/vlib/buffer.h
@@ -77,6 +77,7 @@ typedef struct
<br> VLIB_BUFFER_REPL_FAIL: packet replication failure
<br> VLIB_BUFFER_RECYCLE: as it says
<br> VLIB_BUFFER_FLOW_REPORT: buffer is a flow report,
+ <br> VLIB_BUFFER_EXT_HDR_VALID: buffer contains valid external buffer manager header,
set to avoid adding it to a flow report
<br> VLIB_BUFFER_FLAG_USER(n): user-defined bit N
*/
@@ -88,6 +89,7 @@ typedef struct
#define VLIB_BUFFER_REPL_FAIL (1 << 4)
#define VLIB_BUFFER_RECYCLE (1 << 5)
#define VLIB_BUFFER_FLOW_REPORT (1 << 6)
+#define VLIB_BUFFER_EXT_HDR_VALID (1 << 7)
/* User defined buffer flags. */
#define LOG2_VLIB_BUFFER_FLAG_USER(n) (32 - (n))
diff --git a/src/vnet/buffer.h b/src/vnet/buffer.h
index 45fc352acf7..f1cc637179a 100644
--- a/src/vnet/buffer.h
+++ b/src/vnet/buffer.h
@@ -61,9 +61,6 @@
#define ETH_BUFFER_VLAN_BITS (ETH_BUFFER_VLAN_1_DEEP | \
ETH_BUFFER_VLAN_2_DEEP)
-#define LOG2_VNET_BUFFER_RTE_MBUF_VALID LOG2_VLIB_BUFFER_FLAG_USER(5)
-#define VNET_BUFFER_RTE_MBUF_VALID (1 << LOG2_VNET_BUFFER_RTE_MBUF_VALID)
-
#define LOG2_BUFFER_HANDOFF_NEXT_VALID LOG2_VLIB_BUFFER_FLAG_USER(6)
#define BUFFER_HANDOFF_NEXT_VALID (1 << LOG2_BUFFER_HANDOFF_NEXT_VALID)
diff --git a/src/vnet/devices/dpdk/device.c b/src/vnet/devices/dpdk/device.c
index cd32389c69d..c9d9a567b7a 100644
--- a/src/vnet/devices/dpdk/device.c
+++ b/src/vnet/devices/dpdk/device.c
@@ -159,7 +159,7 @@ dpdk_validate_rte_mbuf (vlib_main_t * vm, vlib_buffer_t * b,
/* buffer is coming from non-dpdk source so we need to init
rte_mbuf header */
- if (PREDICT_FALSE ((b->flags & VNET_BUFFER_RTE_MBUF_VALID) == 0))
+ if (PREDICT_FALSE ((b->flags & VLIB_BUFFER_EXT_HDR_VALID) == 0))
{
vlib_buffer_t *b2 = b;
last_mb = mb = rte_mbuf_from_vlib_buffer (b2);
diff --git a/src/vnet/devices/dpdk/init.c b/src/vnet/devices/dpdk/init.c
index c50c0659696..ec008c20707 100755
--- a/src/vnet/devices/dpdk/init.c
+++ b/src/vnet/devices/dpdk/init.c
@@ -1790,7 +1790,7 @@ dpdk_init (vlib_main_t * vm)
/* Default vlib_buffer_t flags, DISABLES tcp/udp checksumming... */
dm->buffer_flags_template =
- (VLIB_BUFFER_TOTAL_LENGTH_VALID | VNET_BUFFER_RTE_MBUF_VALID
+ (VLIB_BUFFER_TOTAL_LENGTH_VALID | VLIB_BUFFER_EXT_HDR_VALID
| IP_BUFFER_L4_CHECKSUM_COMPUTED | IP_BUFFER_L4_CHECKSUM_CORRECT);
dm->stat_poll_interval = DPDK_STATS_POLL_INTERVAL;