aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEyal Bari <ebari@cisco.com>2017-06-21 15:32:13 +0300
committerJohn Lo <loj@cisco.com>2017-06-22 09:14:06 +0000
commita11832fe134bb5923ddd2b3816b0967234bd8e6e (patch)
treea33caa99fe487484c91387d16582941fcdf02d2b
parent4e53a0d0f01c8c81842d1f50fb5cf0d26e0c1713 (diff)
VNET:explicitly pad l2_classify
Change-Id: I77412aa8c17b45b1533604e7bfe8fe052ed0f80a Signed-off-by: Eyal Bari <ebari@cisco.com>
-rw-r--r--src/vnet/buffer.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/vnet/buffer.h b/src/vnet/buffer.h
index 795bbd9610b..9aba34da930 100644
--- a/src/vnet/buffer.h
+++ b/src/vnet/buffer.h
@@ -170,7 +170,7 @@ typedef struct
} swt;
/* l2 bridging path, only valid there */
- struct
+ struct opaque_l2
{
u32 feature_bitmap;
u16 bd_index; /* bridge-domain index */
@@ -195,8 +195,7 @@ typedef struct
/* L2 classify */
struct
{
- u64 pad; /* paddind for l2 */
- u16 pad1;
+ struct opaque_l2 pad;
union
{
u32 table_index;
@@ -297,14 +296,9 @@ typedef struct
* The opaque field of the vlib_buffer_t is intepreted as a
* vnet_buffer_opaque_t. Hence it should be big enough to accommodate one.
*/
-STATIC_ASSERT (sizeof (vnet_buffer_opaque_t) <= STRUCT_SIZE_OF (vlib_buffer_t,
- opaque),
+STATIC_ASSERT (sizeof (vnet_buffer_opaque_t) <=
+ STRUCT_SIZE_OF (vlib_buffer_t, opaque),
"VNET buffer meta-data too large for vlib_buffer");
-STATIC_ASSERT (STRUCT_OFFSET_OF
- (vnet_buffer_opaque_t,
- l2_classify.table_index) >=
- STRUCT_SIZE_OF (vnet_buffer_opaque_t, l2),
- "l2_classify padding smaller than l2");
#define vnet_buffer(b) ((vnet_buffer_opaque_t *) (b)->opaque)