Skip to content

Commit

Permalink
dpctl: Fix netdev reference leak in "show" command.
Browse files Browse the repository at this point in the history
This specific Netdev leak is causing us stale VHU entries, where it
is showing false limit reaching maximum and preventing us to create
new entries for us. This leak can impact other nics also.

Steps to reproduce,
While running a test with a continous VM creation/deletion using an
orchestration script with-in cloud environment. In parallel we have
some monitoring script calling ovs-appctl dpctl/show stats commands
every minute.

Root-cause analysis,
During VHU port delete, one of netdev references were not reduced to
0 as show_dpif call has not given-up the reference back or doing bad
cleanup. This pending deference preventing VHU deletion sequence, this
is found to be one of corner case inside dpctl code which results in
leaking up netdev which ultimately results in stale VHU entry. After
fixing this problematic cleanup, issue is not seen.

Fixes: fceef20 ("dpctl: add ovs-appctl dpctl/* commands to talk to dpif-netdev")
Signed-off-by: Vipul Ashri <vipul.ashri@ericsson.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Simon Horman <horms@ovn.org>
  • Loading branch information
Vipul Ashri authored and Simon Horman committed Jul 17, 2024
1 parent 5c20050 commit d7fa3c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dpctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,8 @@ show_dpif(struct dpif *dpif, struct dpctl_params *dpctl_p)
continue;
}
error = netdev_get_stats(netdev, &s);
netdev_close(netdev);
if (!error) {
netdev_close(netdev);
print_stat(dpctl_p, " RX packets:", s.rx_packets);
print_stat(dpctl_p, " errors:", s.rx_errors);
print_stat(dpctl_p, " dropped:", s.rx_dropped);
Expand Down

0 comments on commit d7fa3c3

Please sign in to comment.