The qos settings are managed using the 'options' fields in the
"Port_Binding" table.
Signed-off-by: Babu Shanmugam <bscha...@redhat.com>
This seems more complicated than necessary. In the
SBREC_PORT_BINDING_FOR_EACH loop in binding_run(), I think that we only
need to be able to find the ovsrec_interface associated with the
binding_rec. Then we can check and possibly update the
ovsrec_interface's ingress_policing_rate and ingress_policing_burst.
Can you explain why there's this more complicated data structure?
If not for this iface_qos hash map, we need to run a loop OVSREC
Interface_table entries for every iteration of SBREC Port_Binding entry
to check against its policing_values and update it if needed.
If we have an api to fetch the Interface_table entry with the interface
id, this hash map wouldn't be needed. I was not able find such an api,
but is there any such api?
Below is a summary on the use of this hash map;
* At the start of binding_run(), policing values of all the interfaces
are hashed inside this map with the interface_id as the key.
* On each iteration of SBREC Port_Binding, this hash map is looked up
and policing values of the SBREC port_binding and OVSREC
Interface_table are compared and one of the following actions are taken
o If both the values are equal, then the hash map entry
corresponding to this interface id is removed
o If there is a difference, the difference is noted in the hash
map entry
* After looping SBREC_Port_Binding, the OVSREC Inteface_table is
looped for all the entries, and if the interface_id is present in
the hash map, its policing values are updated.
Thank you,
Babu
Thanks,
Ben.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev