It is only used in the testsuite and it can be replaced by a dpctl command.
Signed-off-by: Daniele Di Proietto <diproiet...@vmware.com> --- lib/dpif-netdev.c | 33 --------------------------------- tests/bridge.at | 4 ++-- 2 files changed, 2 insertions(+), 35 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 77a6731..52b8d19 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -3985,37 +3985,6 @@ exit: } static void -dpif_dummy_delete_port(struct unixctl_conn *conn, int argc OVS_UNUSED, - const char *argv[], void *aux OVS_UNUSED) -{ - struct dp_netdev_port *port; - struct dp_netdev *dp; - - ovs_mutex_lock(&dp_netdev_mutex); - dp = shash_find_data(&dp_netdevs, argv[1]); - if (!dp || !dpif_netdev_class_is_dummy(dp->class)) { - ovs_mutex_unlock(&dp_netdev_mutex); - unixctl_command_reply_error(conn, "unknown datapath or not a dummy"); - return; - } - ovs_refcount_ref(&dp->ref_cnt); - ovs_mutex_unlock(&dp_netdev_mutex); - - ovs_mutex_lock(&dp->port_mutex); - if (get_port_by_name(dp, argv[2], &port)) { - unixctl_command_reply_error(conn, "unknown port"); - } else if (port->port_no == ODPP_LOCAL) { - unixctl_command_reply_error(conn, "can't delete local port"); - } else { - do_del_port(dp, port); - unixctl_command_reply(conn, NULL); - } - ovs_mutex_unlock(&dp->port_mutex); - - dp_netdev_unref(dp); -} - -static void dpif_dummy_register__(const char *type) { struct dpif_class *class; @@ -4063,8 +4032,6 @@ dpif_dummy_register(enum dummy_level level) unixctl_command_register("dpif-dummy/change-port-number", "dp port new-number", 3, 3, dpif_dummy_change_port_number, NULL); - unixctl_command_register("dpif-dummy/delete-port", "dp port", - 2, 2, dpif_dummy_delete_port, NULL); } /* Datapath Classifier. */ diff --git a/tests/bridge.at b/tests/bridge.at index c9ad1e6..87cff50 100644 --- a/tests/bridge.at +++ b/tests/bridge.at @@ -17,9 +17,9 @@ dummy@ovs-dummy: hit:0 missed:0 p2 2/2: (dummy) ]) -# Delete p1 from the datapath as if by "ovs-dpctl del-port" +# Delete p1 from the datapath with "ovs-dpctl del-if" # and check that it disappeared. -AT_CHECK([ovs-appctl dpif-dummy/delete-port ovs-dummy p1]) +AT_CHECK([ovs-appctl dpctl/del-if dummy@ovs-dummy p1]) AT_CHECK([ovs-appctl dpif/show], [0], [dnl dummy@ovs-dummy: hit:0 missed:0 br0: -- 2.1.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev