Skip to content

Commit d4f7472

Browse files
committed
Add TODO comment about marking buffer as sampled for tracing purposes
1 parent 4656ba5 commit d4f7472

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sflow/node.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ VLIB_NODE_FN (sflow_node) (vlib_main_t * vm,
120120
.header_bytes = hdr
121121
};
122122

123+
// TODO: what bit in the buffer can we set right here to indicate
124+
// that this packet was sampled (and perhaps another bit to say if it
125+
// was dropped or sucessfully enqueued)? That way we can check it
126+
// below if the packet is traced, and indicate that in the trace output.
127+
123128
// TODO: we end up copying the header twice here. Consider allowing the
124129
// enqueue to be just a little more complex. Like this:
125130
// if(!sflow_fifo_enqueue(&sfwk->fifo, &sample, en, hdr).
@@ -298,7 +303,7 @@ VLIB_NODE_FN (sflow_node) (vlib_main_t * vm,
298303

299304
en0 = vlib_buffer_get_current (b0);
300305

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

0 commit comments

Comments
 (0)