| 935 | } |
| 936 | |
| 937 | int |
| 938 | idpf_vc_stats_query(struct idpf_vport *vport, |
| 939 | struct virtchnl2_vport_stats **pstats) |
| 940 | { |
| 941 | struct idpf_adapter *adapter = vport->adapter; |
| 942 | struct virtchnl2_vport_stats vport_stats; |
| 943 | struct idpf_cmd_info args; |
| 944 | int err; |
| 945 | |
| 946 | vport_stats.vport_id = vport->vport_id; |
| 947 | args.ops = VIRTCHNL2_OP_GET_STATS; |
| 948 | args.in_args = (u8 *)&vport_stats; |
| 949 | args.in_args_size = sizeof(vport_stats); |
| 950 | args.out_buffer = adapter->mbx_resp; |
| 951 | args.out_size = IDPF_DFLT_MBX_BUF_SIZE; |
| 952 | |
| 953 | err = idpf_vc_cmd_execute(adapter, &args); |
| 954 | if (err) { |
| 955 | DRV_LOG(ERR, "Failed to execute command of VIRTCHNL2_OP_GET_STATS"); |
| 956 | *pstats = NULL; |
| 957 | return err; |
| 958 | } |
| 959 | *pstats = (struct virtchnl2_vport_stats *)args.out_buffer; |
| 960 | return 0; |
| 961 | } |
| 962 | |
| 963 | #define IDPF_RX_BUF_STRIDE 64 |
| 964 | int |
no test coverage detected