Hi ,
Please use below comamnd
lshwres -r sriov --rsubtype physport -m <system> --level roce -F capacity_sum,adapter_id,phys_port_id,curr_eth_logical_ports,max_eth_logical_ports
If you want more info on attributes availability , please use below commands and parse it accordingly.
lshwres -r sriov --rsubtype physport -m <system> --level roce -F --header
Thanks,
Raghu