4 * Copyright (C) Hubertus Franke, IBM Corp. 2003
6 * This files contains the type definition of the record
7 * created by the CRBCE CKRM classification engine
11 * 2003-11-11 Created by H.Franke
12 * 2003-12-01 Sanitized for Delivery by H.Franke
16 #ifndef CRBCE_RECORDS_H
17 #define CRBCE_RECORDS_H
19 #include <linux/autoconf.h>
20 #include <linux/types.h>
21 #include <linux/ckrm.h>
22 #include <linux/ckrm_ce.h>
24 #define CRBCE_UKCC_NAME "crbce_ukcc"
25 #define CRBCE_UKCC_PATH "/mnt/relayfs"
27 #define CRBCE_UKCC_PATH_NAME CRBCE_UKCC_PATH"/"CRBCE_UKCC_NAME
29 #define CRBCE_MAX_CLASS_NAME_LEN 256
31 /****************************************************************
33 * CRBCE EVENT SET is and extension to the standard CKRM_EVENTS
35 ****************************************************************/
38 /* we use the standard CKRM_EVENT_<..>
39 * to identify reclassification cause actions
40 * and extend by additional ones we need
45 CRBCE_REC_EXIT = CKRM_NUM_EVENTS,
46 CRBCE_REC_DATA_DELIMITER,
51 CRBCE_REC_KERNEL_CMD_DONE,
54 /* down command issueance */
60 struct task_sample_info {
64 uint32_t memio_delayed;
67 /*********************************************
68 * KERNEL -> USER records *
69 *********************************************/
71 /* we have records with either a time stamp or not */
84 /* individual records */
86 struct crbce_rec_fork {
87 struct crbce_hdr_ts hdr;
91 struct crbce_rec_data_delim {
92 struct crbce_hdr_ts hdr;
93 int is_stop; /* 0 start, 1 stop */
96 struct crbce_rec_task_data {
97 struct crbce_hdr_ts hdr;
98 struct task_sample_info sample;
99 struct task_delay_info delay;
102 struct crbce_ukcc_full {
103 struct crbce_hdr_ts hdr;
106 struct crbce_class_info {
107 struct crbce_hdr_ts hdr;
110 char name[CRBCE_MAX_CLASS_NAME_LEN];
113 /*********************************************
114 * USER -> KERNEL records *
115 *********************************************/
117 enum crbce_kernel_cmd {
124 struct crbce_command {
125 int type; /* we need this for the K->U reflection */
127 uint32_t len; /* added in the kernel for reflection */
130 #define set_cmd_hdr(rec,tok) \
131 ((rec).hdr.type=CRBCE_REC_KERNEL_CMD,(rec).hdr.cmd=(tok))
133 struct crbce_cmd_done {
134 struct crbce_command hdr;
139 struct crbce_command hdr;
142 struct crbce_cmd_send_data {
143 struct crbce_command hdr;
147 struct crbce_cmd_settimer {
148 struct crbce_command hdr;
149 uint32_t interval; /* in msec .. 0 means stop */