Skip to content

Commit

Permalink
Add TODO comment about marking buffer as sampled for tracing purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
sflow committed Oct 8, 2024
1 parent 4656ba5 commit d4f7472
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sflow/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ VLIB_NODE_FN (sflow_node) (vlib_main_t * vm,
.header_bytes = hdr
};

// TODO: what bit in the buffer can we set right here to indicate
// that this packet was sampled (and perhaps another bit to say if it
// was dropped or sucessfully enqueued)? That way we can check it
// below if the packet is traced, and indicate that in the trace output.

// TODO: we end up copying the header twice here. Consider allowing the
// enqueue to be just a little more complex. Like this:
// if(!sflow_fifo_enqueue(&sfwk->fifo, &sample, en, hdr).
Expand Down Expand Up @@ -298,7 +303,7 @@ VLIB_NODE_FN (sflow_node) (vlib_main_t * vm,

en0 = vlib_buffer_get_current (b0);

// Are we supposed to tweak this buffer metadata?
// TODO: Are we supposed to tweak this buffer metadata?
// clib_warning("TX ifIndex currently=%u", vnet_buffer(b0)->sw_if_index[VLIB_TX]);
// vnet_buffer(b0)->sw_if_index[VLIB_TX] = ~0; // sw_if_index0;

Expand Down

0 comments on commit d4f7472

Please sign in to comment.