linux/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c

// SPDX-License-Identifier: GPL-2.0+
// Copyright (c) 2016-2017 Hisilicon Limited.

#include "hclge_main.h"
#include "hclge_mbx.h"
#include "hnae3.h"
#include "hclge_comm_rss.h"

#define CREATE_TRACE_POINTS
#include "hclge_trace.h"

static u16 hclge_errno_to_resp(int errno)
{}

/* hclge_gen_resp_to_vf: used to generate a synchronous response to VF when PF
 * receives a mailbox message from VF.
 * @vport: pointer to struct hclge_vport
 * @vf_to_pf_req: pointer to hclge_mbx_vf_to_pf_cmd of the original mailbox
 *		  message
 * @resp_status: indicate to VF whether its request success(0) or failed.
 */
static int hclge_gen_resp_to_vf(struct hclge_vport *vport,
				struct hclge_mbx_vf_to_pf_cmd *vf_to_pf_req,
				struct hclge_respond_to_vf_msg *resp_msg)
{}

static int hclge_send_mbx_msg(struct hclge_vport *vport, u8 *msg, u16 msg_len,
			      u16 mbx_opcode, u8 dest_vfid)
{}

int hclge_inform_vf_reset(struct hclge_vport *vport, u16 reset_type)
{}

int hclge_inform_reset_assert_to_vf(struct hclge_vport *vport)
{}

static void hclge_free_vector_ring_chain(struct hnae3_ring_chain_node *head)
{}

/* hclge_get_ring_chain_from_mbx: get ring type & tqp id & int_gl idx
 * from mailbox message
 * msg[0]: opcode
 * msg[1]: <not relevant to this function>
 * msg[2]: ring_num
 * msg[3]: first ring type (TX|RX)
 * msg[4]: first tqp id
 * msg[5]: first int_gl idx
 * msg[6] ~ msg[14]: other ring type, tqp id and int_gl idx
 */
static int hclge_get_ring_chain_from_mbx(
			struct hclge_mbx_vf_to_pf_cmd *req,
			struct hnae3_ring_chain_node *ring_chain,
			struct hclge_vport *vport)
{}

static int hclge_map_unmap_ring_to_vf_vector(struct hclge_vport *vport, bool en,
					     struct hclge_mbx_vf_to_pf_cmd *req)
{}

static int hclge_query_ring_vector_map(struct hclge_vport *vport,
				       struct hnae3_ring_chain_node *ring_chain,
				       struct hclge_desc *desc)
{}

static int hclge_get_vf_ring_vector_map(struct hclge_vport *vport,
					struct hclge_mbx_vf_to_pf_cmd *req,
					struct hclge_respond_to_vf_msg *resp)
{}

static void hclge_set_vf_promisc_mode(struct hclge_vport *vport,
				      struct hclge_mbx_vf_to_pf_cmd *req)
{}

static int hclge_set_vf_uc_mac_addr(struct hclge_vport *vport,
				    struct hclge_mbx_vf_to_pf_cmd *mbx_req)
{}

static int hclge_set_vf_mc_mac_addr(struct hclge_vport *vport,
				    struct hclge_mbx_vf_to_pf_cmd *mbx_req)
{}

int hclge_push_vf_port_base_vlan_info(struct hclge_vport *vport, u8 vfid,
				      u16 state,
				      struct hclge_vlan_info *vlan_info)
{}

static int hclge_set_vf_vlan_cfg(struct hclge_vport *vport,
				 struct hclge_mbx_vf_to_pf_cmd *mbx_req,
				 struct hclge_respond_to_vf_msg *resp_msg)
{}

static int hclge_set_vf_alive(struct hclge_vport *vport,
			      struct hclge_mbx_vf_to_pf_cmd *mbx_req)
{}

static void hclge_get_basic_info(struct hclge_vport *vport,
				 struct hclge_respond_to_vf_msg *resp_msg)
{}

static void hclge_get_vf_queue_info(struct hclge_vport *vport,
				    struct hclge_respond_to_vf_msg *resp_msg)
{}

static void hclge_get_vf_mac_addr(struct hclge_vport *vport,
				  struct hclge_respond_to_vf_msg *resp_msg)
{}

static void hclge_get_vf_queue_depth(struct hclge_vport *vport,
				     struct hclge_respond_to_vf_msg *resp_msg)
{}

static void hclge_get_vf_media_type(struct hclge_vport *vport,
				    struct hclge_respond_to_vf_msg *resp_msg)
{}

int hclge_push_vf_link_status(struct hclge_vport *vport)
{}

static void hclge_get_link_mode(struct hclge_vport *vport,
				struct hclge_mbx_vf_to_pf_cmd *mbx_req)
{}

static int hclge_mbx_reset_vf_queue(struct hclge_vport *vport,
				    struct hclge_mbx_vf_to_pf_cmd *mbx_req,
				    struct hclge_respond_to_vf_msg *resp_msg)
{}

static int hclge_reset_vf(struct hclge_vport *vport)
{}

static void hclge_notify_vf_config(struct hclge_vport *vport)
{}

static void hclge_vf_keep_alive(struct hclge_vport *vport)
{}

static int hclge_set_vf_mtu(struct hclge_vport *vport,
			    struct hclge_mbx_vf_to_pf_cmd *mbx_req)
{}

static int hclge_get_queue_id_in_pf(struct hclge_vport *vport,
				    struct hclge_mbx_vf_to_pf_cmd *mbx_req,
				    struct hclge_respond_to_vf_msg *resp_msg)
{}

static int hclge_get_rss_key(struct hclge_vport *vport,
			     struct hclge_mbx_vf_to_pf_cmd *mbx_req,
			     struct hclge_respond_to_vf_msg *resp_msg)
{}

static void hclge_link_fail_parse(struct hclge_dev *hdev, u8 link_fail_code)
{}

static void hclge_handle_link_change_event(struct hclge_dev *hdev,
					   struct hclge_mbx_vf_to_pf_cmd *req)
{}

static bool hclge_cmd_crq_empty(struct hclge_hw *hw)
{}

static void hclge_handle_ncsi_error(struct hclge_dev *hdev)
{}

static void hclge_handle_vf_tbl(struct hclge_vport *vport,
				struct hclge_mbx_vf_to_pf_cmd *mbx_req)
{}

static int
hclge_mbx_map_ring_to_vector_handler(struct hclge_mbx_ops_param *param)
{}

static int
hclge_mbx_unmap_ring_to_vector_handler(struct hclge_mbx_ops_param *param)
{}

static int
hclge_mbx_get_ring_vector_map_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_set_promisc_mode_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_set_unicast_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_set_multicast_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_set_vlan_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_set_alive_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_get_qinfo_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_get_qdepth_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_get_basic_info_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_get_link_status_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_queue_reset_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_reset_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_keep_alive_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_set_mtu_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_get_qid_in_pf_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_get_rss_key_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_get_link_mode_handler(struct hclge_mbx_ops_param *param)
{}

static int
hclge_mbx_get_vf_flr_status_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_vf_uninit_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_get_media_type_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_push_link_status_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_get_mac_addr_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_ncsi_error_handler(struct hclge_mbx_ops_param *param)
{}

static int hclge_mbx_handle_vf_tbl_handler(struct hclge_mbx_ops_param *param)
{}

static const hclge_mbx_ops_fn hclge_mbx_ops_list[HCLGE_MBX_OPCODE_MAX] =;

static void hclge_mbx_request_handling(struct hclge_mbx_ops_param *param)
{}

void hclge_mbx_handler(struct hclge_dev *hdev)
{}