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