perf: 优化session_ctx减少内存占用; 优化global metrics的结构
This commit is contained in:
@@ -12,6 +12,35 @@ extern "C"
|
||||
* Packet IO API for gtest
|
||||
******************************************************************************/
|
||||
|
||||
struct sids
|
||||
{
|
||||
sid_t elems[MR_SID_LIST_MAXLEN];
|
||||
int num;
|
||||
};
|
||||
|
||||
struct route_ctx
|
||||
{
|
||||
char data[64];
|
||||
int len;
|
||||
};
|
||||
|
||||
struct metadata
|
||||
{
|
||||
uint64_t session_id;
|
||||
uint32_t rehash_index;
|
||||
|
||||
char *raw_data; // refer to current packet data
|
||||
int raw_len;
|
||||
uint16_t l7offset;
|
||||
|
||||
int direction; // 1: E2I; 0: I2E
|
||||
int is_ctrl_pkt;
|
||||
int is_decrypted;
|
||||
|
||||
struct sids sids;
|
||||
struct route_ctx route_ctx;
|
||||
};
|
||||
|
||||
int mbuff_get_metadata(marsio_buff_t *rx_buff, struct metadata *meta);
|
||||
int mbuff_set_metadata(marsio_buff_t *tx_buff, struct metadata *meta);
|
||||
void vlan_encapsulate(marsio_buff_t *mbuff, int vlan_id, int replace_orig_vlan_header);
|
||||
|
||||
Reference in New Issue
Block a user