Skip to content

Commit

Permalink
ofproto-dpif-xlate: Include controller traffic for NetFlow.
Browse files Browse the repository at this point in the history
The code previously did not include packets forwarded to the controller
in NetFlow, as it considered this control traffic.  That is debatable for
deployments where the first packet of every flow is sent to the
controller for a forwarding decision that may eventually be executed on
the switch.

However, we are starting to send more traffic to local controllers for
non-forwarding purposes such as logging.  These packets are already
being forwarded (and only copies are being sent to the controller), so
not accounting for them will incorrectly under-report NetFlow
statistics.

Signed-off-by: Justin Pettit <jpettit@ovn.org>
Acked-by: Jarno Rajahalme <jarno@ovn.org>
  • Loading branch information
justinpettit committed Mar 23, 2017
1 parent 9526303 commit 64fb5f8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions ofproto/ofproto-dpif-xlate.c
Expand Up @@ -6464,12 +6464,8 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout)
ctx.xout->slow |= SLOW_ACTION;
}

/* Do netflow only for packets on initial reception, that are not sent to
* the controller. We consider packets sent to the controller to be part
* of the control plane rather than the data plane. */
if (!xin->frozen_state
&& xbridge->netflow
&& !(xout->slow & SLOW_CONTROLLER)) {
/* Update NetFlow for non-frozen traffic. */
if (xbridge->netflow && !xin->frozen_state) {
if (ctx.xin->resubmit_stats) {
netflow_flow_update(xbridge->netflow, flow,
ctx.nf_output_iface,
Expand Down

0 comments on commit 64fb5f8

Please sign in to comment.