Port scheduler policies

This chapter provides information to configure port scheduler policies using the command line interface.

Configuring port scheduler policies

The port-scheduler-policy command creates a port scheduler template which may be assigned to an egress port. Only one port scheduler policy is allowed per port. There is a ‟default” port-scheduler policy (which services the queues of the port in a Strict order) associated with each port. To change the behavior, users can associate the port with another port-scheduler policy. The policy contains mode commands to set the mode of scheduling (RR, Strict, WRR, WDRR) and queue commands to set the weight of the queue (only 8 queues per port and queue settings only for WRR/WDRR modes). In WRR/WDRR, a strict option treats that particular queue as a strict queue, this leads to a hybrid mode of scheduling (WRR+Strict, WDRR+Strict).

Basic configurations

A basic QoS port scheduler policy must conform to the rule that each QoS port scheduler policy must have a unique policy name.

Creating a QoS port scheduler policy

To create a port scheduler policy, define the following:

  • a port scheduler policy name

  • include a description - the description provides a brief overview of policy features

Use the following syntax to create a QoS port scheduler policy.

Note that the create keyword is included in the command syntax upon creation of a policy.

A port scheduler policy cannot be deleted unless it is removed from all ports where it is applied. The ‟default” port-scheduler policy cannot be deleted.

 config>qos
     port-scheduler-policy port-scheduler-name [create]
         description description-string
         mode {strict | rr | wrr | wdrr}
         queue queue-id [strict | weight weight]

The following is a sample port scheduler policy configuration output.

*A:card-1>config>qos>port-sched-plcy# info
----------------------------------------------
            mode WRR
            queue 1 weight 1
            queue 2 weight 3
            queue 3 weight 5
            queue 5 weight 5
            queue 6 weight 1
----------------------------------------------
*A:card-1>config>qos>port-sched-plcy#

Service management tasks

This section describes the service management tasks.

Copying and overwriting port scheduler policies

You can copy an existing QoS policy, rename it with a new QoS policy value, or overwrite an existing policy. The overwrite option must be specified or an error occurs if the destination policy exists.

 config>qos> copy port-scheduler-policy src-name dst-name [overwrite]
 config>qos# copy port-scheduler-policy psp psp1
*A:card-1>config# qos port-scheduler-policy psp create
*A:card-1>config>qos>port-sched-plcy# mode WRR
*A:card-1>config>qos>port-sched-plcy# queue 1 weight 1
*A:card-1>config>qos>port-sched-plcy# queue 2 weight 3
*A:card-1>config>qos>port-sched-plcy# queue 3 weight 5
*A:card-1>config>qos>port-sched-plcy# exit
*A:card-1>config# qos copy port-scheduler-policy psp psp1
*A:card-1>config# qos copy port-scheduler-policy psp psp1
MINOR: CLI Destination "psp1" exists - use {overwrite}.
*A:card-1>config# qos copy port-scheduler-policy psp psp1 overwrite
*A:card-1>config# show qos port-scheduler-policy
===============================================================
Port Scheduler Policies
===============================================================
Policy-Id     Description                           Mode
-------------------------------------------------------------------------------
default       Default Port Scheduler policy.        STRICT
psp                                                 WRR
psp1                                                WRR
===============================================================
*A:card-1>config# 

*A:card-1>config# show qos port-scheduler-policy psp
===============================================================
QoS Port Scheduler Policy
===============================================================
Policy-Name : psp
Accounting: packet-based
Mode : WRR
Last changed : 01/01/2000 22:13:01
Queue 1 Weight: 1
Queue 2 Weight: 3
Queue 3 Weight: 5
Queue 4 Weight: strict
Queue 5 Weight: strict
Queue 6 Weight: strict
Queue 7 Weight: strict
Queue 8 Weight: strict
===============================================================
*A:card-1>config# 
*A:card-1>config# show qos port-scheduler-policy psp1
===============================================================
QoS Port Scheduler Policy
===============================================================
Policy-Name : psp1
Accounting: packet-based
Mode : WRR
Last changed : 01/01/2000 22:13:17
Queue 1 Weight: 1
Queue 2 Weight: 3
Queue 3 Weight: 5
Queue 4 Weight: strict
Queue 5 Weight: strict
Queue 6 Weight: strict
Queue 7 Weight: strict
Queue 8 Weight: strict
===============================================================================
*A:card-1>config#

Editing QoS policies

You can edit a port-scheduler policy, the modifications are done and it affects the port where it is applied. The ‟default” port-scheduler policy cannot be modified.

To prevent configuration errors use the copy command to make a duplicate of the original policy to a work area, make the edits, and then overwrite the original policy.

QoS port scheduler policy command reference

Command hierarchies

Operational commands

    - config
        - qos
            - copy port-scheduler-policy src-name dst-name [overwrite]

Command descriptions

Configuration commands

Generic commands

description
Syntax

description description-string

no description

Context

config>qos>port-scheduler-policy

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command creates a text description stored in the configuration file for a configuration context.

The description command associates a text string with a configuration context to help identify the context in the configuration file.

The no form of this command removes any description string from the context.

Parameters
description-string

Specifies a text string describing the entity. Allowed values are any string up to 80 characters composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, and so on), the entire string must be enclosed within double quotes.

Operational commands

copy
Syntax

copy port-scheduler-policy src-name dst-name [overwrite]

Context

config>qos

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command copies existing port scheduler QoS policy entries for a port scheduler QoS policy to another port scheduler QoS policy. It also allows bulk modifications to an existing policy with the use of the overwrite keyword.

Parameters
port-scheduler-policy src-name dst-name

Specifies that the source policy and the destination policy are port scheduler policy IDs. Specifies the source policy that the copy command will attempt to copy from and specify the destination policy name to which the command will copy a duplicate of the policy.

overwrite

Specifies that everything in the existing destination policy will be overwritten with the contents of the source policy. If overwrite is not specified, a message is generated saying that the destination policy ID exists

Port scheduler policy commands

port-scheduler-policy
Syntax

[no] port-scheduler-policy port-scheduler-name [create]

Context

config>qos

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures the port-scheduler policy. The default scheduling done for a port is strict scheduling. When a port-scheduler policy is applied to a port, it overrides the default scheduling and determines the type of scheduling (Strict, RR, WRR, WDRR, WRR/WDRR + Strict) to be done between the 8 CoS queues of that particular port. When a port scheduler policy is detached from a port, the port reverts back to the default scheduling (strict).

The no form of this command removes the policy from the system.

Parameters
port-scheduler-name

Specifies an existing policy name. Each port-scheduler policy name should be unique and can go up to 32 ASCII characters.

create

Specifies that a port scheduler policy is created.

mode
Syntax

mode {strict | rr | wrr | wdrr}

no mode

Context

config>qos>port-sched-plcy

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures a particular mode of scheduling for the policy. For example, this implies that when a policy with a mode RR is applied to a port then that port will follow the round robin type of scheduling between its queues.

Parameters
strict

Specifies that the port follows a strict scheduler mode.

rr

Specifies that the port follows round robin scheduling.

wrr

Specifies that the port follows weighted round robin scheduling.

wdrr

Specifies that the port follows weighted deficit round robin scheduling.

queue
Syntax

queue queue-id [strict |weight weight]

no queue queue-id

Context

config>qos>port-sched-plcy

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures a port scheduler queue. The queue and its weights can be configured only for WRR/WDRR modes. The weight specified in case of WRR corresponds to the number of packets that needs to be sent out in a cycle for that particular queue.

For WDRR, the weight specified is the ratio of traffic that will be sent out for that particular queue. For example, in WDRR, if a weight value for queue 1 is 1 and a weight value for queue 2 is 5, then traffic out of the port is in the ratio of 1:5 between the queues (1 and 2) provided no traffic is flowing in the other queues. If the keyword strict is specified in any of the queues, then that particular queue will be treated as strict. This set of strict priority queues is serviced first in the order of their CoS numbering (the higher numbered CoS queue receives service before smaller numbered queues).

The no form of this command under a WRR/WDRR mode will set the queue weights to default (for example, 1).

Parameters
queue-id

Specifies the queue ID.

Values

1 to 8 (8 is the highest)

strict

Specifies strict access.

weight weight

Specifies the number of packets in case of WRR and ratio of traffic out in WDRR.

Values

1 to 15

Show commands

port-scheduler-policy
Syntax

port-scheduler-policy [port-scheduler-policy-name] [association]

Context

show>qos

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command displays port-scheduler policy information

Parameters
port-scheduler-policy-name

Displays information for the specified existing port scheduler policy.

association

Displays associations related to the specified port scheduler policy.

Output

The following outputs are examples of port scheduler policy information, and Output fields: show port scheduler policy describes the output fields.

Sample output
*A:card-1>config# show qos port-scheduler-policy
===============================================================================
Port Scheduler Policies
===============================================================================
Policy-Id                 Description                              Mode
default                   Default Port Scheduler Policy.           STRICT
psp                                                                WRR
test                      psp                                      WRR
===============================================================================
*A:card-1>config#
*A:card-1>config# show qos port-scheduler-policy psp association
===============================================================================
QoS Port Scheduler Policy
===============================================================================
Policy-Name : psp
Mode : WRR
Accounting: packet-based
-------------------------------------------------------------------------------
Associations
-------------------------------------------------------------------------------
- Port : 1/1/1
===============================================================================
*A:card-1>config#
*A:card-1>config# show qos port-scheduler-policy psp
===============================================================================
QoS Port Scheduler Policy
===============================================================================
Policy-Name : psp
Mode : WRR
Accounting : packet-based
Last changed : 01/01/2000 05:14:06
Queue 1:          Weight: 1
Queue 2:          Weight: 3
Queue 3:          Weight: 5
Queue 4:          Weight: 0
Queue 5:          Weight: 5
Queue 6:          Weight: 5
Queue 7:          Weight: strict
Queue 8:          Weight: strict
===============================================================================
*A:card-1>config#
*A:SN12345678>config# show qos port-scheduler-policy default
=============================================================================
QoS Port Scheduler Policy
=============================================================================
Policy-Name       : default
Accounting        : frame-based
Description       : Default Port Scheduler policy.
Mode              : STRICT
Last changed      : 08/04/2009 20:55:46                                        
Number Of Queues  : 8                                                          
=============================================================================
*A:SN12345678>config#
Sample output for 7210 SAS-D

*A:SAS-D>show>qos# port-scheduler-policy abc

===============================================================================
QoS Port Scheduler Policy
===============================================================================
Policy-Name       : abc
Description       : (Not Specified)
Accounting        : packet-based
Mode              : STRICT
Last changed      : 01/01/1970 04:57:48
Number Of Queues  : 8
===============================================================================
*A:SAS-D>show>qos# port-scheduler-policy abc association

===============================================================================
QoS Port Scheduler Policy
===============================================================================
Policy-Name       : abc
Description       : (Not Specified)
Accounting        : packet-based
Mode              : STRICT

-------------------------------------------------------------------------------
Associations
-------------------------------------------------------------------------------
No Association Found.

===============================================================================
*A:SAS-D>show>qos#
Table 1. Output fields: show port scheduler policy

Label

Description

Policy Name

Displays the port scheduler policy name

Associations

Displays associations related to the specified port scheduler policy

Mode

Displays the port scheduler policy mode (STRICT, RR, WRR, WDRR)

Accounting

Displays whether the accounting mode is frame-based or packet-based

Last Changed

Displays the last time the configuration changed

Queue #

Displays the weight of the queue if configured