- struct flow flow;
-
- /* Pull odp_msg header. */
- ofpbuf_use_const(&b, msg, msg->length);
- ofpbuf_pull(&b, sizeof *msg);
-
- /* Pull odp_sflow_sample_header. */
- hdr = ofpbuf_try_pull(&b, sizeof *hdr);
- if (!hdr) {
- VLOG_WARN_RL(&rl, "missing odp_sflow_sample_header");
- return;
- }
-
- /* Pull actions. */
- actions = ofpbuf_try_pull(&b, hdr->actions_len);
- if (!actions) {
- VLOG_WARN_RL(&rl, "missing odp actions");
- return;
- }
-
- /* Now only the payload is left. */
- flow_extract(&b, 0, msg->port, &flow);