71 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2/* Copyright (C) 2024 Intel Corporation */3 4#ifndef _IDPF_VIRTCHNL_H_5#define _IDPF_VIRTCHNL_H_6 7struct idpf_adapter;8struct idpf_netdev_priv;9struct idpf_vec_regs;10struct idpf_vport;11struct idpf_vport_max_q;12struct idpf_vport_user_config_data;13 14int idpf_init_dflt_mbx(struct idpf_adapter *adapter);15void idpf_deinit_dflt_mbx(struct idpf_adapter *adapter);16int idpf_vc_core_init(struct idpf_adapter *adapter);17void idpf_vc_core_deinit(struct idpf_adapter *adapter);18 19int idpf_get_reg_intr_vecs(struct idpf_vport *vport,20 struct idpf_vec_regs *reg_vals);21int idpf_queue_reg_init(struct idpf_vport *vport);22int idpf_vport_queue_ids_init(struct idpf_vport *vport);23 24int idpf_recv_mb_msg(struct idpf_adapter *adapter);25int idpf_send_mb_msg(struct idpf_adapter *adapter, u32 op,26 u16 msg_size, u8 *msg, u16 cookie);27 28void idpf_vport_init(struct idpf_vport *vport, struct idpf_vport_max_q *max_q);29u32 idpf_get_vport_id(struct idpf_vport *vport);30int idpf_send_create_vport_msg(struct idpf_adapter *adapter,31 struct idpf_vport_max_q *max_q);32int idpf_send_destroy_vport_msg(struct idpf_vport *vport);33int idpf_send_enable_vport_msg(struct idpf_vport *vport);34int idpf_send_disable_vport_msg(struct idpf_vport *vport);35 36int idpf_vport_adjust_qs(struct idpf_vport *vport);37int idpf_vport_alloc_max_qs(struct idpf_adapter *adapter,38 struct idpf_vport_max_q *max_q);39void idpf_vport_dealloc_max_qs(struct idpf_adapter *adapter,40 struct idpf_vport_max_q *max_q);41int idpf_send_add_queues_msg(const struct idpf_vport *vport, u16 num_tx_q,42 u16 num_complq, u16 num_rx_q, u16 num_rx_bufq);43int idpf_send_delete_queues_msg(struct idpf_vport *vport);44int idpf_send_enable_queues_msg(struct idpf_vport *vport);45int idpf_send_disable_queues_msg(struct idpf_vport *vport);46int idpf_send_config_queues_msg(struct idpf_vport *vport);47 48int idpf_vport_alloc_vec_indexes(struct idpf_vport *vport);49int idpf_get_vec_ids(struct idpf_adapter *adapter,50 u16 *vecids, int num_vecids,51 struct virtchnl2_vector_chunks *chunks);52int idpf_send_alloc_vectors_msg(struct idpf_adapter *adapter, u16 num_vectors);53int idpf_send_dealloc_vectors_msg(struct idpf_adapter *adapter);54int idpf_send_map_unmap_queue_vector_msg(struct idpf_vport *vport, bool map);55 56int idpf_add_del_mac_filters(struct idpf_vport *vport,57 struct idpf_netdev_priv *np,58 bool add, bool async);59int idpf_set_promiscuous(struct idpf_adapter *adapter,60 struct idpf_vport_user_config_data *config_data,61 u32 vport_id);62int idpf_check_supported_desc_ids(struct idpf_vport *vport);63int idpf_send_get_rx_ptype_msg(struct idpf_vport *vport);64int idpf_send_ena_dis_loopback_msg(struct idpf_vport *vport);65int idpf_send_get_stats_msg(struct idpf_vport *vport);66int idpf_send_set_sriov_vfs_msg(struct idpf_adapter *adapter, u16 num_vfs);67int idpf_send_get_set_rss_key_msg(struct idpf_vport *vport, bool get);68int idpf_send_get_set_rss_lut_msg(struct idpf_vport *vport, bool get);69 70#endif /* _IDPF_VIRTCHNL_H_ */71