Lines Matching refs:msg
67 handle_sample_msg(const struct test_msg *msg) in handle_sample_msg() argument
69 switch (msg->msg_op) { in handle_sample_msg()
71 kern_mutated += msg->operand_64; in handle_sample_msg()
74 kern_mutated += msg->operand_32; in handle_sample_msg()
77 kern_mutated *= msg->operand_64; in handle_sample_msg()
80 kern_mutated *= msg->operand_32; in handle_sample_msg()
83 bpf_printk("Unrecognized op %d\n", msg->msg_op); in handle_sample_msg()
91 const struct test_msg *msg = NULL; in read_protocol_msg() local
93 msg = bpf_dynptr_data(dynptr, 0, sizeof(*msg)); in read_protocol_msg()
94 if (!msg) { in read_protocol_msg()
100 handle_sample_msg(msg); in read_protocol_msg()
107 struct test_msg *msg = NULL; in publish_next_kern_msg() local
111 msg = bpf_ringbuf_reserve(&kernel_ringbuf, sizeof(*msg), 0); in publish_next_kern_msg()
112 if (!msg) { in publish_next_kern_msg()
119 msg->operand_64 = operand_64; in publish_next_kern_msg()
120 msg->msg_op = TEST_MSG_OP_INC64; in publish_next_kern_msg()
124 msg->operand_32 = operand_32; in publish_next_kern_msg()
125 msg->msg_op = TEST_MSG_OP_INC32; in publish_next_kern_msg()
129 msg->operand_64 = operand_64; in publish_next_kern_msg()
130 msg->msg_op = TEST_MSG_OP_MUL64; in publish_next_kern_msg()
134 msg->operand_32 = operand_32; in publish_next_kern_msg()
135 msg->msg_op = TEST_MSG_OP_MUL32; in publish_next_kern_msg()
139 bpf_ringbuf_discard(msg, 0); in publish_next_kern_msg()
144 bpf_ringbuf_submit(msg, 0); in publish_next_kern_msg()