Here are some hints and tips for configuring SRIOV adapters.
List the SRIOV Adapters.
This output will show you all the SRIOV adapters in your server. The default configuration is 'dedicated' and this means you cannot allocate the Logical Ports to Client LPARs. This needs to be changed to 'sriov' mode.
lshwres -m Server42A -r sriov --rsubtype adapter
adapter_id=null,slot_id=2104001e,adapter_max_logical_ports=null,config_state=dedicated,functional_state=1,logical_p
orts=null,phys_loc=U78CB.001.SERIAL-P1-C10,phys_ports=null,sriov_status=null,alternate_config=0
Change the SRIOV Adapter from dedicated to shared.
chhwres -m Server-42A -r sriov --rsubtype adapter -o a -a "slot_id=2104001e"
Possible Error Message.
You may received this error message if the SRIOV adapter is configured in to an existing LPAR profile. It will most likely be the Default system profile with LPAR id 1.
ERROR: HSCL1232 The command failed because the adapter is in use by partitions 84-SERIAL. Remove the adapter's resources from the specified partitions and try the operation again.
Follow these steps to remove the SRIOV adapter with slot ID 2104001e from the profile. You may have more than 1 SRIOV adapter, so you will need to remove them all with their unique slot ID.
chsyscfg -m Server-42A -r prof -i "lpar_id=1,name=84-SERIAL,io_slots-=2104001e/none/0"
chsysstate -m Server-42A -r lpar -o on -b sms -f 84-SERIAL --id 1
chsysstate -m Server-42A -r lpar -o shutdown --immed --id 1
List an SRIOV adapter.
This output shows the SRIOV adapter has been changed to SRIOV mode. You can now allocate SRIOV ports from this adapter to LPARs.
lshwres -m Server42A -r sriov --rsubtype adapter
adapter_id=2,slot_id=2104001e,adapter_max_logical_ports=48,config_state=sriov,functional_state=1,logical_ports=48,p
hys_loc=U78C9.001.SERIAL-P1-C10,phys_ports=4,sriov_status=running,alternate_config=0
List Physical Adapter Ports and Speed. 1Gb Ports.
lshwres -m Server-42A -r sriov --rsubtype physport --level eth
adapter_id=2,phys_port_id=2,phys_port_label=,phys_port_sub_label=,phys_port_loc=U78C9.001.SERIAL-P1-C10-
T3,phys_port_type=eth,state=1,config_logical_ports=1,phys_port_max_logical_ports=4,supported_max_eth_logical_ports=
4,max_eth_logical_ports=4,curr_eth_logical_ports=1,max_diag_ports=1,max_promisc_ports=1,"capabilities=pvid_priority
_capable,port_vlan_id_capable,mac_vlan_consistency_capable,clear_phys_port_stat_capable,clear_logical_port_stat_cap
able",conn_speed=1000,config_conn_speed=auto,max_recv_packet_size=1500,config_max_recv_packet_size=1500,recv_flow_c
ontrol=0,config_recv_flow_control=0,trans_flow_control=0,config_trans_flow_control=0,veb_mode=1,vepa_mode=0
List Physical Adapter Ports and Speed. 10Gb Ports.
lshwres -m Server-42A -r sriov --rsubtype physport --level ethc
adapter_id=2,phys_port_id=0,phys_port_label=,phys_port_sub_label=,phys_port_loc=U78C9.001.SERIAL-P1-C10-
T1,phys_port_type=ethc,state=1,config_logical_ports=1,phys_port_max_logical_ports=20,supported_max_eth_logical_port
s=20,max_eth_logical_ports=20,curr_eth_logical_ports=1,max_diag_ports=1,max_promisc_ports=1,"capabilities=pvid_prio
rity_capable,port_vlan_id_capable,mac_vlan_consistency_capable,clear_phys_port_stat_capable,clear_logical_port_stat
_capable",conn_speed=10000,config_conn_speed=auto,max_recv_packet_size=1500,config_max_recv_packet_size=1500,recv_f
low_control=0,config_recv_flow_control=0,trans_flow_control=0,config_trans_flow_control=0,veb_mode=1,vepa_mode=0,pr
iority_flow_control_active=0
Set the Required Adapter Attributes.
For the 10Gb adapters, you will probably need to turn on flow control and set the MTU size to 9014. Here is how to set the MTU to 9014. Repeat these steps for each adapter and attribute you wish to change.
chhwres -m Server-42A -r sriov --rsubtype physport -o s -a "adapter_id=2,phys_port_id=0,max_recv_packet_size=9014"
List all the Free Logical Ports
chhwres -m Server-42A -r sriov --rsubtype logport
adapter_id=2,logical_port_id=27008006,logical_port_type=unconfigured,drc_name=PHB 4230,location_code=U78CA.001.SERIAL-P1-C2-C1-T1-S6
adapter_id=2,logical_port_id=27008007,logical_port_type=unconfigured,drc_name=PHB 4231,location_code=U78CA.001.SERIAL-P1-C2-C1-T1-S7
List all the Assigned Logical Ports
lshwres -m Server-42A -r sriov --rsubtype logport --level eth -F lpar_name,adapter_id,logical_port_id,logical_port_type,location_code
TEST082,5,27014007,eth,U78CA.001.SERIAL-P1-C2-C1-T1-S7
TEST084,5,27014008,eth,U78CA.001.SERIAL-P1-C2-C1-T1-S8
How do you "List Physical Adapter Ports and Speed. 100Gb Ports."?
I've tried:
<code>lshwres -m FR24 -r sriov --rsubtype physport --level eth</code>
and
<code>lshwres -m FR24 -r sriov --rsubtype physport --level ethc</code>
And on the systems where we have 100GB SRIOV adapters, I get:
<code>no results were found.</code>
I'm still looking but I'm sure someone has the answer.
Thanks.