Skip to content

Commit

Permalink
Add default queue when creating a port
Browse files Browse the repository at this point in the history
  • Loading branch information
rpt committed Jun 25, 2012
1 parent 7fe4b23 commit 0892704
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/of_switch/src/ofs_userspace_port.erl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
rate_bps :: integer(),
throttling_ets :: ets:tid()}).

-define(DEFAULT_QUEUE, 0).
-define(DEFAULT_QUEUE, default).

%%%-----------------------------------------------------------------------------
%%% API functions
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 0892704

Please sign in to comment.