需改ebpf程序探测内核,测试性能,验证想法,更新笔记。

This commit is contained in:
1iaan
2026-02-13 10:14:41 +00:00
parent 68bb4b3f9c
commit c72314291a
16 changed files with 560 additions and 230 deletions

View File

@@ -1,24 +1,21 @@
#ifndef __REPLICA_H__
#define __REPLICA_H__
#define MAX_CMD_LEN 256
#define MAX_CMD_LEN 4096
#define MAX_IP_LEN 64
enum event_type {
EVENT_COMPLETED_CMD,
EVENT_SSYNC,
EVENT_SREADY,
EVENT_COMPLETED_CMD = 1,
EVENT_SSYNC = 2,
EVENT_SREADY = 3,
};
struct complete_cmd_evt {
__u64 seq;
__u32 len;
__u8 cmd[MAX_CMD_LEN];
};
struct sync_evt {
__u64 seq;
char ip[MAX_IP_LEN];
__s32 port;
};
@@ -33,5 +30,4 @@ struct replica_event {
};
};
#endif