[ovs-dev] [PATCH] ofproto-dpif-ipfix: add support for per-flow drop counters

Ben Pfaff blp at ovn.org
Wed Jun 14 21:22:32 UTC 2017


On Tue, Jun 13, 2017 at 02:25:15PM +0100, Przemyslaw Szczerbik wrote:
> Patch based on RFC 5102, section 5.10. It implements per-flow drop counters:
> - droppedPacketDeltaCount
> - droppedPacketTotalCount
> - droppedOctetDeltaCount
> - droppedOctetTotalCount
> 
> In order to determine if packet is going to be dropped, flow actions associated
> with packet are read. If there is no OVS_ACTION_ATTR_OUTPUT action, packet will
> be dropped.
> 
> Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik at intel.com>

Thanks for working on making the IPFIX support more complete.

The code in this patch that detects whether an output action is present
is incomplete, for a couple of reasons.  First, it skips over "clone"
and "sample" actions that might contain output actions.  An output
action inside "clone" is truly an output.  An output action inside
"sample" is truly an output if the sampling probability is 100% (and the
datapath sometimes uses such a probability for technical reasons).
Whether an output action inside "sample" with a lower probability should
be considered an output is more questionable, but I don't think OVS ever
actually does that.

The "userspace" and "recirc" actions raise bigger questions.  Either of
these can yield absolutely any kind of behavior, since userspace or the
recirculated flow table lookup's actions can do anything.  There's not
an easy way to decide whether a flow that executes one of these actions
truly drops anything.  Without taking a different approach, when one of
these actions is seen (and there isn't another clear output), the most
one can say is that the flow "might" drop the packet.

I am not sure the best way forward.

Thanks,

Ben.


More information about the dev mailing list