diff mbox series

[ovs-dev,v1,4/6] controller: set sampling port to OFP_NONE for drops

Message ID 20230124151632.695912-5-amorenoz@redhat.com
State Accepted
Headers show
Series drop sampling: Fixes and optimizations | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes fail github build: failed

Commit Message

Adrian Moreno Jan. 24, 2023, 3:16 p.m. UTC
From: Adrian Moreno <amorenoz@redhat.com>

The default zero value would likely match an existing openflow port and
end up generating a sample with wrong output interface information.
Since in this case we're sampling in the middle of the pipeline, the
correct value for sampling port is OFP_NONE.

Fixes: a42c808f30b4 ("northd: add drop sampling")
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
---
 controller/physical.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/controller/physical.c b/controller/physical.c
index cb2cddb9f..e718268ea 100644
--- a/controller/physical.c
+++ b/controller/physical.c
@@ -843,6 +843,7 @@  put_drop(const struct physical_debug *debug, uint8_t table_id,
         os->collector_set_id = debug->collector_set_id;
         os->obs_domain_id = (debug->obs_domain_id << 24);
         os->obs_point_id = table_id;
+        os->sampling_port = OFPP_NONE;
     }
 }