[ofa-general] QoS RFC

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Wed Jul 25 17:06:50 PDT 2007


Sean Hefty wrote:
>> QoS Policy file syntax
>>
>> * Empty lines are ignored
>> * Leading and trailing blanks, as well as empty lines, are ignored, so 
>> the
>>   indentation in the example is just for better readability
>> * Comments are started with the pound sign (#) and terminated by EOL
>> * Comments may appear only in a separate line
>> * Keywords that denote section/subsection start have matching closing 
>> keywords
>> * Any keyword should be the first non-blank in the line
>>
>> QoS Policy file example
>>
>>     # Port Groups define sets of ports to be used later in the settings
>>     port-groups
>>         # using port GUIDs
>>         port-group
>>             name: Storage
>>             # "use" is just a description that is used for logging.
>>             #  Other than that, it is just a commentary
>>             use: our SRP storage targets
>>             port-guid: 0x1000000000000001
>>             port-guid: 0x1000000000000002
>>         end-port-group
>>
>>         port-group
>>             name: Virtual Servers
>>             use: node desc and IB port num
>>             # The syntax of the port name is as follows: 
>> "hostname/CA-num/Pnum".
>>             # "hostname" and "CA-num" are compared to the first 2 
>> words of
>>             # NodeDescription, and "Pnum" is a port number on that node.
>>             port-name: vs1/HCA-1/P1
>>             port-name: vs3/HCA-1/P1
>>             port-name: vs3/HCA-2/P2
>>         end-port-group
>>
>>         # using partitions defined in the partition policy
>>         port-group
>>             name: Group for Partition 1
>>             use: default settings
>>             partition: Part1
>>         end-port-group
>>
>>         # using node types CA|ROUTER|SWITCH
>>         port-group
>>             name: Routers
>>             use: all routers
>>             node-type: ROUTER
>>         end-port-group
>>
>>     end-port-groups
>>
>>     qos-setup
>>
>>         # define all types of VLArb tables. The length of the tables 
>> should
>>         # match the physically supported tables by their target ports
>>         vlarb-tables
>>             # scope defines the exact ports the VLArb tables apply to
>>             vlarb-scope
>>                 # defining VLArb tables on all the ports that belong to
>>                 # port group 'Storage', and on all the ports connected
>>                 # to ports of port group 'Storage'
>>                 group: Storage
>>                 # "across" means all the ports that are connected to 
>> ports
>>                 # that belong to the specified port group
>>                 across: Storage
>>                 # VLArb table holds VL and weight pairs
>>                 vlarb-high: 0:255,1:127,2:63,3:31,4:15,5:7,6:3,7:1
>>                 vlarb-low: 8:255,9:127,10:63,11:31,12:15,13:7,14:3
>>                 vl-high-limit: 10
>>             end-vlarb-scope
>>             # There can be several scopes
>>         end-vlarb-tables
>>
>>         sl2vl-tables
>>             # Scope defines the exact devices and in/out ports tables 
>> apply to.
>>             # Note: if the same port is matching several rules the 
>> *FIRST* one applies.
>>             sl2vl-scope
>>                 # SL2VL tables are orgnized as SL2VL(in-port,out-port)
>>                 # "from: n,m" means we define the SL2VL(n,*) and 
>> SL2VL(m,*)
>>                 # "to: n,m" means we define the SL2VL(*,n) and SL2VL(*,m)
>>                 #
>>                 # The following example specifies that all the SL2VL 
>> tables
>>                 # entries should be defined for all the ports of group 
>> Part1:
>>                 group: Part1
>>                 from: *
>>                 to: *
>>                 # SL2VL table has to have 16 values at max - one for 
>> each SL.
>>                 # If the user specifies less than 16 values, all the 
>> missing
>>                 # VL values will be implicitly set to 0
>>                 sl2vl-table: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,7
>>             end-sl2vl-scope
>>
>>             sl2vl-scope
>>                 # "across-to" is a combination of "across" keyword 
>> (definition can be found
>>                 # in VLArb tables section) and "to" keyword.
>>                 # "across: PortGroupName" refers to all the ports that 
>> are connected
>>                 # to ports that belong to PortGroupName.
>>                 #
>>                 # Example of "across-to" usage:
>>                 #   A user has a set of 'special' nodes (e.g. storage 
>> nodes), and all
>>                 #   the traffic to these nodes has to get specific VL.
>>                 #   The solution is to define port group (i.g. 
>> "Storage") that will
>>                 #   include all the ports of these nodes, and then to 
>> configure SL2VL
>>                 #   tables on all the switch ports that are connected 
>> to the Storage
>>                 #   port group by specifying "across-to: Storage".
>>                 #
>>                 across-to: Storage2
>>                 # Similar to "across-to", "across-from" is a 
>> combination of "across"
>>                 # and "to" keywords
>>                 across-from: Storage1
>>                 sl2vl-table: 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0
>>             end-sl2vl-scope
>>         end-sl2vl-tables
>>
>>     end-qos-setup
>>
>>
>>     qos-levels
>>
>>         # the first one is just setting SL
>>         qos-level
>>             use: for the lowest priority communication
>>             sl: 15
>>             packet-life: 16
>>         end-qos-level
>>         # the second sets SL and QoS Class
>>         qos-level
>>             use: low latency best bandwidth
>>             sl: 0
>>         end-qos-level
>>         # the whole set: SL, MTU-Limit, Rate-Limit, Packet Lifetime, 
>> Path Bits
>>         qos-level
>>             use: just an example
>>             sl: 0
>>             mtu-limit: 1
>>             rate-limit: 1
>>             packet-life: 12
>>             # Path Bits can be used e.g. to provide a different routes 
>> through the
>>             # subnet to a particular port
>>             path-bits: 2,4,8-32
>>         end-qos-level
>>
>>     end-qos-levels
>>
>>
>>     # Match rules are scanned in a first-fit manner (like firewall 
>> rules table)
>>     qos-match-rules
>>
>>         # matching by single criteria: class (list of values and ranges)
>>         qos-match-rule
>>             # just a description
>>             use: low latency by class 7-9 or 11
>>             qos-class: 7-9,11
>>             # number of qos-level to apply to the matching PR/MPR
>>             qos-level-sn: 1
>>         end-qos-match-rule
>>         # show matching by destination group AND service-ids
>>         qos-match-rule
>>             use: Storage targets connection
>>             destination: Storage
>>             service-id: 22,4719-5000
>>             qos-level-sn: 2
>>         end-qos-match-rule
>>         # show matching by source group only
>>         qos-match-rule
>>             use: bla bla
>>             source: Storage
>>             qos-level-sn: 3
>>         end-qos-match-rule
>>
>>     end-qos-match-rules
> 
> What creates this file?  If we expect an administrator to create this 
> manually, then I think we something much, much simpler.

This file has *all* the possible keywords.
The administrator really doesn't have to use them all.
For instance, there are three different ways to define port groups:
  - by guid list
  - by node type
  - by port names
You could stick with the guids only - this gives you all the functionality
you need, but by doing so you loose some flexibility.

-- Yevgeny

> - Sean
> 




More information about the general mailing list