I want the sFlow module to know when a sampled packet was a cache miss in
the datapath.  That way we can include this information with the sFlow
sample feed that is sent out,  and applications can analyze the data to see
what mix of traffic is suffering cache misses.    Any ideas on how to add
this?

When a cache miss is upcall'd to userspace (from In
datapath/datapath.c:ovs_dp_process_packet()),   then userspace reacts by
pushing down operations to create a new flow and send that packet
(lib/dpif-netlink.c:dpif_operate()).   But if that packet is then sampled
and upcall'd to sFlow there does not seem to be a flag we can inspect to
know that it was a cache miss in the first place.

If the datapath were to include the number of packets seen by the flow so
far when it upcalls a sample (that number is kept in struct sw_flow in the
datapath flow cache) then we could infer it was a cache miss when we see
that number == 1.

Alternatively,  if we could set a bit somewhere when we pass the cache-miss
back down to be sent,  so that the bit is preserved and visible if that
same packet is then sampled,  then we could do it that way.   Trying to
avoid datapath changes I looked to see if there was a way to set a bit in
the skbuff that would survive and come back in a sample,  but I'm not sure
how to go about doing that.

Or maybe there is another way?

Neil

------
Neil McKee
InMon Corp.
http://www.inmon.com
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to