Using priority queueing
An OSA-Express CHPID in QDIO mode has up to four output queues (queues 0 - 3). The priority queueing feature gives these queues different priorities (queue 0 having the highest priority). The four output queues are available only if multiple priority is enabled for queues on the OSA-Express CHPID in QDIO mode.
Before you begin
- Priority queueing applies to OSA-Express CHPIDs in QDIO mode only.
- If more than 160 TCP/IP stacks per OSA-Express CHPID are defined in the IOCDS, priority queueing is disabled.
- The device must be offline while you set the queueing options.
About this task
Queueing is relevant mainly to high-traffic situations. When there is little traffic, queueing has no impact on processing. The qeth device driver can put data on one or more of the queues. By default, the driver uses queue 2 for all data.
Procedure
# chzdev -a <device_bus_id> priority_queueing=<method>
or,
using
sysfs:# echo <method> > /sys/bus/ccwgroup/drivers/qeth/<device_bus_id>/priority_queueing
where <method> can be any of these values:
- prio_queueing_vlan
- to base the queue assignment on the two most significant bits in the priority code point in the
IEEE 802.1Q header as used in VLANs. This value affects only traffic with VLAN headers, and hence
works only with qeth devices in layer 2 mode. You can set the priority code point in the IEEE 802.1Q headers of the traffic based on skb->priority by using a command of the form:
ip link add link <link> name <name> type vlan id <vlan-id> egress-qos-map <mapping>
Note: Enabling this option makes all traffic default to queue 3. - prio_queueing_skb
- to base the queue assignment on the priority flag of the skbs. An skb, or socket buffer, is a
Linux kernel-internal structure that represents network data. The mapping to the priority queues is
as follows:
You can use
Table 1. Mapping of flag value to priority queues Priority flag of the skb Priority queue 0-1 3 2-3 2 4-5 1 ≥6 0 prio_queueing_skb
for any network setups, including conventional LANs.Use either
sockopt SO_PRIORITY
or an appropriate iptables command to adjust the priority flag of the skb (skb->priority).Note: The priority flag of the skbs defaults to 0, hence enabling this option makes all traffic default to queue 3.
- prio_queueing_prec
- to base the queue assignment on the two most significant bits of each packet's IP header precedence field.
- prio_queueing_tos
- Deprecated; do not use for new setups.
- no_prio_queueing
- causes the qeth device driver to use queue 2 for all packets. This value is the default.
- no_prio_queueing:0
- causes the qeth device driver to use queue 0 for all packets.
- no_prio_queueing:1
- causes the qeth device driver to use queue 1 for all packets.
- no_prio_queueing:2
- causes the qeth device driver to use queue 2 for all packets. This value is equivalent to the default.
- no_prio_queueing:3
- causes the qeth device driver to use queue 3 for all packets.
Example
# cat /sys/bus/ccwgroup/drivers/qeth/0.0.a110/priority_queueing
Possible
results are: - by VLAN headers
- if prio_queueing_vlan is set.
- by skb-priority
- if prio_queueing_skb is set.
- by precedence
- if prio_queueing_prec is set.
- by type of service
- if prio_queuing_tos is set.
- always queue <x>
- otherwise.
# chzdev -a 0.0.a110 priority_queueing=prio_queueing_skb
# echo prio_queueing_skb > /sys/bus/ccwgroup/drivers/qeth/0.0.a110/priority_queueing