From 0892704d167cdc1e28c1889cfd400b8476e6bdb4 Mon Sep 17 00:00:00 2001 From: Krzysztof Rutka Date: Mon, 25 Jun 2012 14:52:33 +0200 Subject: [PATCH] Add default queue when creating a port --- apps/of_switch/src/ofs_userspace_port.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/of_switch/src/ofs_userspace_port.erl b/apps/of_switch/src/ofs_userspace_port.erl index 71e2ea8..f5d9e43 100644 --- a/apps/of_switch/src/ofs_userspace_port.erl +++ b/apps/of_switch/src/ofs_userspace_port.erl @@ -58,7 +58,7 @@ rate_bps :: integer(), throttling_ets :: ets:tid()}). --define(DEFAULT_QUEUE, 0). +-define(DEFAULT_QUEUE, default). %%%----------------------------------------------------------------------------- %%% API functions @@ -295,6 +295,10 @@ init({OfsPortNo, ConfigOpts}) -> ofs_port_no = OfsPortNo, rate_bps = Rate, throttling_ets = ThrottlingEts}, + + %% Add default queue with no min or max rate + do_attach_queue(State1, default, []), + State2 = lists:foldl(fun({QueueId, QueueOpts}, StateAcc) -> do_attach_queue(StateAcc, QueueId,