You can set the bandwidth share for a flow only if the underlying datalink supports offloading of SLAs and the flow has a dedicated ring group. You can specify the bandwidth share by using the bw-share property while creating the flow. All the hardware resource consumers of the physical datalink such as VF VNIC, ring group VNIC, and hardware flows share the total bandwidth of the datalink.
The following examples show how to set the bandwidth share for the hardware flows with dedicated ring groups.
Check whether the underlying datalink support offloading of hardware SLAs by using the dladm show-linkprop command.
$ dladm show-linkprop -H -pbw-share net3 LINK PROPERTY MODE HWPOSSIBLE HWFLAGS SWPOSSIBLE SWFLAGS net3 bw-share none 1-100 o -- -- $ dladm show-linkprop -H -pmax-bw net3 LINK PROPERTY MODE HWPOSSIBLE HWFLAGS SWPOSSIBLE SWFLAGS net3 max-bw sw 50-10000:50 o 0-10000:0.001 oi
Set the bandwidth share for the flow while creating the flow by using the bw-share property.
$ flowadm add-flow -lnet3 -a transport=tcp,local_ip=203.0.113.2/27, \ local_port=5002,remote_ip=203.0.113.35/27,remote_port=5001 -p hw-flow=on,bw-share=10 tcpflow1
You can set the bandwidth share for the existing flows by using the flowadm set-flowprop command.
$ flowadm set-flowprop -p bw-share=10 tcpflow1
$ flowadm set-flowprop -p bw-share=40 udpflow1
$ flowadm show-flowprop -p bw-share FLOW PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE tcpflow1 bw-share rw 10 20% -- 1-100 udpflow1 bw-share rw 40 80% -- 1-100