#ifndef _QED_VF_H
#define _QED_VF_H
#include "qed_l2.h"
#include "qed_mcp.h"
#define T_ETH_INDIRECTION_TABLE_SIZE …
#define T_ETH_RSS_KEY_SIZE …
struct vf_pf_resc_request { … };
struct hw_sb_info { … };
#define TLV_BUFFER_SIZE …
enum { … };
struct channel_tlv { … };
struct vfpf_first_tlv { … };
struct pfvf_tlv { … };
struct pfvf_def_resp_tlv { … };
struct channel_list_end_tlv { … };
#define VFPF_ACQUIRE_OS_LINUX …
#define VFPF_ACQUIRE_OS_WINDOWS …
#define VFPF_ACQUIRE_OS_ESX …
#define VFPF_ACQUIRE_OS_SOLARIS …
#define VFPF_ACQUIRE_OS_LINUX_USERSPACE …
struct vfpf_acquire_tlv { … };
struct vfpf_vport_update_rss_tlv { … };
struct pfvf_storm_stats { … };
struct pfvf_stats_info { … };
struct pfvf_acquire_resp_tlv { … };
struct pfvf_start_queue_resp_tlv { … };
struct vfpf_qid_tlv { … };
struct vfpf_start_rxq_tlv { … };
struct vfpf_start_txq_tlv { … };
struct vfpf_stop_rxqs_tlv { … };
struct vfpf_stop_txqs_tlv { … };
struct vfpf_update_rxq_tlv { … };
struct vfpf_q_mac_vlan_filter { … };
struct vfpf_vport_start_tlv { … };
struct vfpf_vport_update_activate_tlv { … };
struct vfpf_vport_update_tx_switch_tlv { … };
struct vfpf_vport_update_vlan_strip_tlv { … };
struct vfpf_vport_update_mcast_bin_tlv { … };
struct vfpf_vport_update_accept_param_tlv { … };
struct vfpf_vport_update_accept_any_vlan_tlv { … };
struct vfpf_vport_update_sge_tpa_tlv { … };
struct vfpf_vport_update_tlv { … };
struct vfpf_ucast_filter_tlv { … };
struct vfpf_update_tunn_param_tlv { … };
struct pfvf_update_tunn_param_tlv { … };
struct tlv_buffer_size { … };
struct vfpf_update_coalesce { … };
struct vfpf_read_coal_req_tlv { … };
struct pfvf_read_coal_resp_tlv { … };
struct vfpf_bulletin_update_mac_tlv { … };
vfpf_tlvs;
pfvf_tlvs;
enum qed_bulletin_bit { … };
struct qed_bulletin_content { … };
struct qed_bulletin { … };
enum { … };
#define QED_ETH_VF_DEFAULT_NUM_CIDS …
#define QED_ETH_VF_MAX_NUM_CIDS …
struct qed_vf_iov { … };
int qed_vf_pf_set_coalesce(struct qed_hwfn *p_hwfn,
u16 rx_coal,
u16 tx_coal, struct qed_queue_cid *p_cid);
int qed_vf_pf_get_coalesce(struct qed_hwfn *p_hwfn,
u16 *p_coal, struct qed_queue_cid *p_cid);
#ifdef CONFIG_QED_SRIOV
int qed_vf_read_bulletin(struct qed_hwfn *p_hwfn, u8 *p_change);
void qed_vf_get_link_params(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_params *params);
void qed_vf_get_link_state(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_state *link);
void qed_vf_get_link_caps(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_capabilities *p_link_caps);
void qed_vf_get_num_rxqs(struct qed_hwfn *p_hwfn, u8 *num_rxqs);
void qed_vf_get_num_txqs(struct qed_hwfn *p_hwfn, u8 *num_txqs);
void qed_vf_get_num_cids(struct qed_hwfn *p_hwfn, u8 *num_cids);
void qed_vf_get_port_mac(struct qed_hwfn *p_hwfn, u8 *port_mac);
void qed_vf_get_num_vlan_filters(struct qed_hwfn *p_hwfn,
u8 *num_vlan_filters);
void qed_vf_get_num_mac_filters(struct qed_hwfn *p_hwfn, u8 *num_mac_filters);
bool qed_vf_check_mac(struct qed_hwfn *p_hwfn, u8 *mac);
void qed_vf_get_fw_version(struct qed_hwfn *p_hwfn,
u16 *fw_major, u16 *fw_minor,
u16 *fw_rev, u16 *fw_eng);
int qed_vf_hw_prepare(struct qed_hwfn *p_hwfn);
int qed_vf_pf_rxq_start(struct qed_hwfn *p_hwfn,
struct qed_queue_cid *p_cid,
u16 bd_max_bytes,
dma_addr_t bd_chain_phys_addr,
dma_addr_t cqe_pbl_addr,
u16 cqe_pbl_size, void __iomem **pp_prod);
int
qed_vf_pf_txq_start(struct qed_hwfn *p_hwfn,
struct qed_queue_cid *p_cid,
dma_addr_t pbl_addr,
u16 pbl_size, void __iomem **pp_doorbell);
int qed_vf_pf_rxq_stop(struct qed_hwfn *p_hwfn,
struct qed_queue_cid *p_cid, bool cqe_completion);
int qed_vf_pf_txq_stop(struct qed_hwfn *p_hwfn, struct qed_queue_cid *p_cid);
int qed_vf_pf_vport_update(struct qed_hwfn *p_hwfn,
struct qed_sp_vport_update_params *p_params);
int qed_vf_pf_reset(struct qed_hwfn *p_hwfn);
int qed_vf_pf_release(struct qed_hwfn *p_hwfn);
u16 qed_vf_get_igu_sb_id(struct qed_hwfn *p_hwfn, u16 sb_id);
void qed_vf_set_sb_info(struct qed_hwfn *p_hwfn,
u16 sb_id, struct qed_sb_info *p_sb);
int qed_vf_pf_vport_start(struct qed_hwfn *p_hwfn,
u8 vport_id,
u16 mtu,
u8 inner_vlan_removal,
enum qed_tpa_mode tpa_mode,
u8 max_buffers_per_cqe, u8 only_untagged);
int qed_vf_pf_vport_stop(struct qed_hwfn *p_hwfn);
int qed_vf_pf_filter_ucast(struct qed_hwfn *p_hwfn,
struct qed_filter_ucast *p_param);
void qed_vf_pf_filter_mcast(struct qed_hwfn *p_hwfn,
struct qed_filter_mcast *p_filter_cmd);
int qed_vf_pf_int_cleanup(struct qed_hwfn *p_hwfn);
void __qed_vf_get_link_params(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_params *p_params,
struct qed_bulletin_content *p_bulletin);
void __qed_vf_get_link_state(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_state *p_link,
struct qed_bulletin_content *p_bulletin);
void __qed_vf_get_link_caps(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_capabilities *p_link_caps,
struct qed_bulletin_content *p_bulletin);
void qed_iov_vf_task(struct work_struct *work);
void qed_vf_set_vf_start_tunn_update_param(struct qed_tunnel_info *p_tun);
int qed_vf_pf_tunnel_param_update(struct qed_hwfn *p_hwfn,
struct qed_tunnel_info *p_tunn);
u32 qed_vf_hw_bar_size(struct qed_hwfn *p_hwfn, enum BAR_ID bar_id);
int qed_vf_pf_bulletin_update_mac(struct qed_hwfn *p_hwfn, const u8 *p_mac);
#else
static inline void qed_vf_get_link_params(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_params *params)
{
}
static inline void qed_vf_get_link_state(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_state *link)
{
}
static inline void
qed_vf_get_link_caps(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_capabilities *p_link_caps)
{
}
static inline void qed_vf_get_num_rxqs(struct qed_hwfn *p_hwfn, u8 *num_rxqs)
{
}
static inline void qed_vf_get_num_txqs(struct qed_hwfn *p_hwfn, u8 *num_txqs)
{
}
static inline void qed_vf_get_num_cids(struct qed_hwfn *p_hwfn, u8 *num_cids)
{
}
static inline void qed_vf_get_port_mac(struct qed_hwfn *p_hwfn, u8 *port_mac)
{
}
static inline void qed_vf_get_num_vlan_filters(struct qed_hwfn *p_hwfn,
u8 *num_vlan_filters)
{
}
static inline void qed_vf_get_num_mac_filters(struct qed_hwfn *p_hwfn,
u8 *num_mac_filters)
{
}
static inline bool qed_vf_check_mac(struct qed_hwfn *p_hwfn, u8 *mac)
{
return false;
}
static inline void qed_vf_get_fw_version(struct qed_hwfn *p_hwfn,
u16 *fw_major, u16 *fw_minor,
u16 *fw_rev, u16 *fw_eng)
{
}
static inline int qed_vf_hw_prepare(struct qed_hwfn *p_hwfn)
{
return -EINVAL;
}
static inline int qed_vf_pf_rxq_start(struct qed_hwfn *p_hwfn,
struct qed_queue_cid *p_cid,
u16 bd_max_bytes,
dma_addr_t bd_chain_phys_adr,
dma_addr_t cqe_pbl_addr,
u16 cqe_pbl_size, void __iomem **pp_prod)
{
return -EINVAL;
}
static inline int qed_vf_pf_txq_start(struct qed_hwfn *p_hwfn,
struct qed_queue_cid *p_cid,
dma_addr_t pbl_addr,
u16 pbl_size, void __iomem **pp_doorbell)
{
return -EINVAL;
}
static inline int qed_vf_pf_rxq_stop(struct qed_hwfn *p_hwfn,
struct qed_queue_cid *p_cid,
bool cqe_completion)
{
return -EINVAL;
}
static inline int qed_vf_pf_txq_stop(struct qed_hwfn *p_hwfn,
struct qed_queue_cid *p_cid)
{
return -EINVAL;
}
static inline int
qed_vf_pf_vport_update(struct qed_hwfn *p_hwfn,
struct qed_sp_vport_update_params *p_params)
{
return -EINVAL;
}
static inline int qed_vf_pf_reset(struct qed_hwfn *p_hwfn)
{
return -EINVAL;
}
static inline int qed_vf_pf_release(struct qed_hwfn *p_hwfn)
{
return -EINVAL;
}
static inline u16 qed_vf_get_igu_sb_id(struct qed_hwfn *p_hwfn, u16 sb_id)
{
return 0;
}
static inline void qed_vf_set_sb_info(struct qed_hwfn *p_hwfn, u16 sb_id,
struct qed_sb_info *p_sb)
{
}
static inline int qed_vf_pf_vport_start(struct qed_hwfn *p_hwfn,
u8 vport_id,
u16 mtu,
u8 inner_vlan_removal,
enum qed_tpa_mode tpa_mode,
u8 max_buffers_per_cqe,
u8 only_untagged)
{
return -EINVAL;
}
static inline int qed_vf_pf_vport_stop(struct qed_hwfn *p_hwfn)
{
return -EINVAL;
}
static inline int qed_vf_pf_filter_ucast(struct qed_hwfn *p_hwfn,
struct qed_filter_ucast *p_param)
{
return -EINVAL;
}
static inline void qed_vf_pf_filter_mcast(struct qed_hwfn *p_hwfn,
struct qed_filter_mcast *p_filter_cmd)
{
}
static inline int qed_vf_pf_int_cleanup(struct qed_hwfn *p_hwfn)
{
return -EINVAL;
}
static inline void __qed_vf_get_link_params(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_params
*p_params,
struct qed_bulletin_content
*p_bulletin)
{
}
static inline void __qed_vf_get_link_state(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_state *p_link,
struct qed_bulletin_content
*p_bulletin)
{
}
static inline void
__qed_vf_get_link_caps(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_capabilities *p_link_caps,
struct qed_bulletin_content *p_bulletin)
{
}
static inline void qed_iov_vf_task(struct work_struct *work)
{
}
static inline void
qed_vf_set_vf_start_tunn_update_param(struct qed_tunnel_info *p_tun)
{
}
static inline int qed_vf_pf_tunnel_param_update(struct qed_hwfn *p_hwfn,
struct qed_tunnel_info *p_tunn)
{
return -EINVAL;
}
static inline int qed_vf_pf_bulletin_update_mac(struct qed_hwfn *p_hwfn,
const u8 *p_mac)
{
return -EINVAL;
}
static inline u32
qed_vf_hw_bar_size(struct qed_hwfn *p_hwfn,
enum BAR_ID bar_id)
{
return 0;
}
#endif
#endif