1 /*******************************************************************************
3 * Copyright (c) 2015-2016 Intel Corporation. All rights reserved.
5 * This software is available to you under a choice of one of two
6 * licenses. You may choose to be licensed under the terms of the GNU
7 * General Public License (GPL) Version 2, available from the file
8 * COPYING in the main directory of this source tree, or the
9 * OpenFabrics.org BSD license below:
11 * Redistribution and use in source and binary forms, with or
12 * without modification, are permitted provided that the following
15 * - Redistributions of source code must retain the above
16 * copyright notice, this list of conditions and the following
19 * - Redistributions in binary form must reproduce the above
20 * copyright notice, this list of conditions and the following
21 * disclaimer in the documentation and/or other materials
22 * provided with the distribution.
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
28 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
29 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
30 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33 *******************************************************************************/
35 #ifndef I40IW_VIRTCHNL_H
36 #define I40IW_VIRTCHNL_H
38 #include "i40iw_hmc.h"
42 struct i40iw_virtchnl_op_buf
{
48 /* Member alignment MUST be maintained above this location */
52 struct i40iw_virtchnl_resp_buf
{
56 /* Member alignment MUST be maintained above this location */
61 enum i40iw_virtchnl_ops
{
62 I40IW_VCHNL_OP_GET_VER
= 0,
63 I40IW_VCHNL_OP_GET_HMC_FCN
,
64 I40IW_VCHNL_OP_ADD_HMC_OBJ_RANGE
,
65 I40IW_VCHNL_OP_DEL_HMC_OBJ_RANGE
,
66 I40IW_VCHNL_OP_GET_STATS
69 #define I40IW_VCHNL_OP_GET_VER_V0 0
70 #define I40IW_VCHNL_OP_GET_HMC_FCN_V0 0
71 #define I40IW_VCHNL_OP_ADD_HMC_OBJ_RANGE_V0 0
72 #define I40IW_VCHNL_OP_DEL_HMC_OBJ_RANGE_V0 0
73 #define I40IW_VCHNL_OP_GET_STATS_V0 0
74 #define I40IW_VCHNL_CHNL_VER_V0 0
76 struct i40iw_dev_hw_stats
;
78 struct i40iw_virtchnl_hmc_obj_range
{
85 enum i40iw_status_code
i40iw_vchnl_recv_pf(struct i40iw_sc_dev
*dev
,
90 enum i40iw_status_code
i40iw_vchnl_recv_vf(struct i40iw_sc_dev
*dev
,
95 struct i40iw_virtchnl_req
{
96 struct i40iw_sc_dev
*dev
;
97 struct i40iw_virtchnl_op_buf
*vchnl_msg
;
106 enum i40iw_status_code
i40iw_vchnl_vf_get_ver(struct i40iw_sc_dev
*dev
,
109 enum i40iw_status_code
i40iw_vchnl_vf_get_hmc_fcn(struct i40iw_sc_dev
*dev
,
112 enum i40iw_status_code
i40iw_vchnl_vf_add_hmc_objs(struct i40iw_sc_dev
*dev
,
113 enum i40iw_hmc_rsrc_type rsrc_type
,
117 enum i40iw_status_code
i40iw_vchnl_vf_del_hmc_obj(struct i40iw_sc_dev
*dev
,
118 enum i40iw_hmc_rsrc_type rsrc_type
,
122 enum i40iw_status_code
i40iw_vchnl_vf_get_pe_stats(struct i40iw_sc_dev
*dev
,
123 struct i40iw_dev_hw_stats
*hw_stats
);