+ struct odp_port *ports;
+ size_t n_ports;
+ int err;
+ int i;
+
+ err = dpif_port_list(dpif_, &ports, &n_ports);
+ if (err) {
+ return err;
+ }
+
+ for (i = 0; i < n_ports; i++) {
+ if (ports[i].port != ODPP_LOCAL) {
+ err = do_ioctl(dpif_, ODP_VPORT_DEL, ports[i].devname);
+ if (err) {
+ VLOG_WARN_RL(&error_rl, "%s: error deleting port %s (%s)",
+ dpif_name(dpif_), ports[i].devname, strerror(err));
+ }
+ }
+ }
+
+ free(ports);
+