summaryrefslogtreecommitdiffstats
path: root/src/vnet/dpo/dpo.h
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2020-11-26 09:41:01 +0000
committerBeno�t Ganne <bganne@cisco.com>2020-11-26 13:12:27 +0000
commitab4fbedf27ece4ea623d7c3b54cc54f0133ba1f7 (patch)
treeeb7db2763ca43d9fb87671e4e6d23637be57a9b1 /src/vnet/dpo/dpo.h
parente1ab06c14deaff5cc0870f7ec76f36613ffcc2d3 (diff)
fib: DPO layout add u64 parameter.
Type: improvement Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Change-Id: Iee04af801814b6360b045cf7dc8bcad6f517229e
Diffstat (limited to 'src/vnet/dpo/dpo.h')
-rw-r--r--src/vnet/dpo/dpo.h39
1 files changed, 22 insertions, 17 deletions
diff --git a/src/vnet/dpo/dpo.h b/src/vnet/dpo/dpo.h
index e5a9bdc1ca1..ee4990d0058 100644
--- a/src/vnet/dpo/dpo.h
+++ b/src/vnet/dpo/dpo.h
@@ -168,23 +168,28 @@ typedef enum dpo_type_t_ {
* instance number/index of objects of that type
*/
typedef struct dpo_id_t_ {
- /**
- * the type
- */
- dpo_type_t dpoi_type;
- /**
- * the data-path protocol of the type.
- */
- dpo_proto_t dpoi_proto;
- /**
- * The next VLIB node to follow.
- */
- u16 dpoi_next_node;
- /**
- * the index of objects of that type
- */
- index_t dpoi_index;
-} __attribute__ ((aligned(sizeof(u64)))) dpo_id_t;
+ union {
+ struct {
+ /**
+ * the type
+ */
+ dpo_type_t dpoi_type;
+ /**
+ * the data-path protocol of the type.
+ */
+ dpo_proto_t dpoi_proto;
+ /**
+ * The next VLIB node to follow.
+ */
+ u16 dpoi_next_node;
+ /**
+ * the index of objects of that type
+ */
+ index_t dpoi_index;
+ };
+ u64 as_u64;
+ };
+} dpo_id_t;
STATIC_ASSERT(sizeof(dpo_id_t) <= sizeof(u64),
"DPO ID is greater than sizeof u64 "