Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit number of meta flow-mod settings we push and to limit queue pus… #75

Merged
merged 1 commit into from
May 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main/tegu.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func usage( version string ) {

func main() {
var (
version string = "v3.1.9/14116"
version string = "v3.1.10/15116"
cfg_file *string = nil
api_port *string // command line option vars must be pointers
verbose *bool
Expand Down
19 changes: 14 additions & 5 deletions managers/fq_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ func Fq_mgr( my_chan chan *ipc.Chmsg, sdn_host *string ) {
send_all bool = false // send all flow-mods; false means send just ingress/egress and not intermediate switch f-mods
alt_table int = DEF_ALT_TABLE // meta data marking table
phost_suffix *string = nil // physical host suffix added to each host name in the list from openstack (config)
set_queues bool = false // queues need to be set only when using HTB

//max_link_used int64 = 0 // the current maximum link utilisation
)
Expand Down Expand Up @@ -665,6 +666,7 @@ func Fq_mgr( my_chan chan *ipc.Chmsg, sdn_host *string ) {
if dp := cfg_data["fqmgr"]["ssq_cmd"]; dp != nil { // set switch queue command
ssq_cmd = dp
}


/*
if p := cfg_data["fqmgr"]["default_dscp"]; p != nil { // this is a single value and should not be confused with the dscp list in the default section of the config
Expand All @@ -678,6 +680,11 @@ func Fq_mgr( my_chan chan *ipc.Chmsg, sdn_host *string ) {
qcheck_freq = 5
}
}

if p := cfg_data["fqmgr"]["set_queues"]; p != nil {
set_queues = *p == "true"
}


if p := cfg_data["fqmgr"]["host_check"]; p != nil { // frequency of checking for new _real_ hosts from openstack
hcheck_freq = clike.Atoi64( *p )
Expand Down Expand Up @@ -832,11 +839,13 @@ func Fq_mgr( my_chan chan *ipc.Chmsg, sdn_host *string ) {
}

case REQ_SETQUEUES: // request from reservation manager which indicates something changed and queues need to be reset
qlist := msg.Req_data.( []interface{} )[0].( []string )
if ssq_cmd != nil {
adjust_queues( qlist, ssq_cmd, host_list ) // if writing to a file and driving a local script
} else {
adjust_queues_agent( qlist, host_list, phost_suffix ) // if sending json to an agent
if set_queues {
qlist := msg.Req_data.( []interface{} )[0].( []string )
if ssq_cmd != nil {
adjust_queues( qlist, ssq_cmd, host_list ) // if writing to a file and driving a local script
} else {
adjust_queues_agent( qlist, host_list, phost_suffix ) // if sending json to an agent
}
}

case REQ_CHOSTLIST: // this is tricky as it comes from tickler as a request, and from osifmgr as a response, be careful!
Expand Down
8 changes: 7 additions & 1 deletion managers/res_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,7 @@ func Res_manager( my_chan chan *ipc.Chmsg, cookie *string ) {
}
}

send_meta_counter := 200; // send meta f-mods only now and again
rm_sheep.Baa( 1, "ovs table number %d used for metadata marking", alt_table )

res_refresh = time.Now().Unix() + int64( rr_rate ) // set first refresh in an hour (ignored if hto_limit not set
Expand Down Expand Up @@ -1217,7 +1218,12 @@ func Res_manager( my_chan chan *ipc.Chmsg, cookie *string ) {
rm_sheep.Baa( 1, "received queue map from network manager" )

qlist := msg.Response_data.( []string ) // get the qulist map for our use first
send_meta_fmods( qlist, alt_table ) // push meta rules
if send_meta_counter >= 200 {
send_meta_fmods( qlist, alt_table ) // push meta rules
send_meta_counter = 0
} else {
send_meta_counter++
}

msg.Response_ch = nil // immediately disable to prevent loop
fq_data := make( []interface{}, 1 )
Expand Down