summaryrefslogtreecommitdiff
path: root/include/internal
diff options
context:
space:
mode:
author陆秋文 <[email protected]>2023-02-03 03:20:37 +0000
committer陆秋文 <[email protected]>2023-02-03 03:20:37 +0000
commit8c9965b2e803f453e498b1e8d9a655c7a55f86f4 (patch)
treeab2f0dfdda6d437284f63c4ec605f12057c704ae /include/internal
parente188bc30f37e132d6d285a76fa12e0a643263221 (diff)
TSG-13437 增加读写ROUTE-CTX和SIDLIST的接口、示例程序并修正vxlan头部校验和错误的问题。
Diffstat (limited to 'include/internal')
-rw-r--r--include/internal/mrb_define.h35
-rw-r--r--include/internal/protect.h2
2 files changed, 27 insertions, 10 deletions
diff --git a/include/internal/mrb_define.h b/include/internal/mrb_define.h
index 6d49776..69890c4 100644
--- a/include/internal/mrb_define.h
+++ b/include/internal/mrb_define.h
@@ -1,6 +1,7 @@
#pragma once
#include <stdint.h>
#include <common.h>
+#include <ldbc.h>
#ifndef MRB_MAX_CTRLZONE_NUM
#define MRB_MAX_CTRLZONE_NUM 16
@@ -12,21 +13,37 @@ struct mrb_zone_idx
uint8_t size;
};
-/* Private Zone for DEBUG */
-struct mrb_zone_ts
+/* mbuf common metadata */
+struct mrb_metadata
{
- struct timespec ts_srv_rx_or_alloc;
- struct timespec ts_app_rx_or_alloc;
-};
+ /* status */
+ uint8_t dir : 1;
+ uint8_t packet_create_from_nf : 1;
+
+ /* for sid forwarder */
+ uint8_t start_sid;
+ uint8_t nr_sid;
+ uint16_t cur_sid;
+ uint16_t sids[8];
+
+ /* ingress, egress */
+ uint16_t port_ingress;
+ uint16_t port_egress;
+
+ /* for EF service */
+ uint16_t link_db_index;
+
+ /* pkt_parser result */
+ struct pkt_parser_result pkt_parser_result;
+} __rte_cache_aligned;
+
+#define MR_NODE_CTRLZONE_ID 1
struct mrb_priv_zone
{
- struct rte_mbuf * next;
- struct mrb_zone_ts ts;
-
uint8_t cz_num;
struct mrb_zone_idx idx[MRB_MAX_CTRLZONE_NUM];
-}__rte_packed;
+};
struct mrb_zone_info
{
diff --git a/include/internal/protect.h b/include/internal/protect.h
index ec23b4c..6dff4e7 100644
--- a/include/internal/protect.h
+++ b/include/internal/protect.h
@@ -42,7 +42,7 @@ if(g_in_protect_mode) \
static inline void PROTECT_rte_mempool_unpoison(struct rte_mempool *pool)
{
MR_ASAN_UNPOISON_MEMORY_REGION(pool, sizeof(struct rte_mempool));
- MR_ASAN_UNPOISON_MEMORY_REGION(pool, MEMPOOL_HEADER_SIZE(pool, pool->cache_size));
+ MR_ASAN_UNPOISON_MEMORY_REGION(pool, RTE_MEMPOOL_HEADER_SIZE(pool, pool->cache_size));
}
static inline void PROTECT_rte_mbuf_unpoison_meta(struct rte_mbuf *mbuf)