Message ID | CAMc2VtTaSd6jMUXVyTHk2SzQOkb9mi=PgbTEquGNeW4_Xi_Y3g@mail.gmail.com |
---|---|
State | Accepted |
Commit | 77610902b5d0db708544e349cc3b1bb2b06f13c6 |
Headers | show |
Series | [ovs-dev] connmgr: Count unsent async messages. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | warning | apply and check: warning |
ovsrobot/github-robot-_Build_and_Test | fail | github build: failed |
ovsrobot/intel-ovs-compilation | success | test: success |
On Sat, Aug 05, 2023 at 01:12:15PM +0200, Francois wrote: > Add an additional coverage counter for the case where no controller is > available to receive a OFPT_PACKET_IN/NXT_PACKET_IN2 message and so the > message is not sent at all. > > This should help investigate issues where controller actions are not > properly executed (for example an OVN reject ACL was supposed to be > executed but ovn-controller was not started and the client ended up timing > out). > > Signed-off-by: François Rigault <frigo@amadeus.com> Acked-by: Simon Horman <horms@ovn.org>
On 8/7/23 14:21, Simon Horman wrote: > On Sat, Aug 05, 2023 at 01:12:15PM +0200, Francois wrote: >> Add an additional coverage counter for the case where no controller is >> available to receive a OFPT_PACKET_IN/NXT_PACKET_IN2 message and so the >> message is not sent at all. >> >> This should help investigate issues where controller actions are not >> properly executed (for example an OVN reject ACL was supposed to be >> executed but ovn-controller was not started and the client ended up timing >> out). >> >> Signed-off-by: François Rigault <frigo@amadeus.com> > > Acked-by: Simon Horman <horms@ovn.org> Thanks, François and Simon! Applied. Since it's a very simple debugging-only change, I also backported it down to 2.17. Best regards, Ilya Maximets.
diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index 7b14cae..b092e9e 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -1649,6 +1649,8 @@ connmgr_send_table_status(struct connmgr *mgr, } } +COVERAGE_DEFINE(connmgr_async_unsent); + /* Given 'pin', sends an OFPT_PACKET_IN message to each OpenFlow controller as * necessary according to their individual configurations. */ void @@ -1656,6 +1658,7 @@ connmgr_send_async_msg(struct connmgr *mgr, const struct ofproto_async_msg *am) { struct ofconn *ofconn; + bool sent = false; LIST_FOR_EACH (ofconn, connmgr_node, &mgr->conns) { enum ofputil_protocol protocol = ofconn_get_protocol(ofconn); @@ -1677,6 +1680,11 @@ connmgr_send_async_msg(struct connmgr *mgr, am->pin.up.base.flow_metadata.flow.in_port.ofp_port, msg, &txq); do_send_packet_ins(ofconn, &txq); + sent = true; + } + + if (!sent) { + COVERAGE_INC(connmgr_async_unsent); } }
Add an additional coverage counter for the case where no controller is available to receive a OFPT_PACKET_IN/NXT_PACKET_IN2 message and so the message is not sent at all. This should help investigate issues where controller actions are not properly executed (for example an OVN reject ACL was supposed to be executed but ovn-controller was not started and the client ended up timing out). Signed-off-by: François Rigault <frigo@amadeus.com> --- ofproto/connmgr.c | 8 ++++++++ 1 file changed, 8 insertions(+)