/* bnx2x_vfpf.h: Qlogic Everest network driver. * * Copyright (c) 2011-2013 Broadcom Corporation * Copyright (c) 2014 QLogic Corporation * All rights reserved * * Unless you and Qlogic execute a separate written software license * agreement governing use of this software, this software is licensed to you * under the terms of the GNU General Public License version 2 (the “GPL”), * available at http://www.gnu.org/licenses/gpl-2.0.html, with the following * added to such license: * * As a special exception, the copyright holders of this software give you * permission to link this software with independent modules, and to copy and * distribute the resulting executable under terms of your choice, provided that * you also meet, for each linked independent module, the terms and conditions * of the license of that module. An independent module is a module which is * not derived from this software. The special exception does not apply to any * modifications of the software. * * Maintained by: Ariel Elior <[email protected]> * Written by: Ariel Elior <[email protected]> */ #ifndef VF_PF_IF_H #define VF_PF_IF_H #ifdef CONFIG_BNX2X_SRIOV /* Common definitions for all HVs */ struct vf_pf_resc_request { … }; struct hw_sb_info { … }; /* HW VF-PF channel definitions * A.K.A VF-PF mailbox */ #define TLV_BUFFER_SIZE … #define PF_VF_BULLETIN_SIZE … #define VFPF_QUEUE_FLG_TPA … #define VFPF_QUEUE_FLG_TPA_IPV6 … #define VFPF_QUEUE_FLG_TPA_GRO … #define VFPF_QUEUE_FLG_CACHE_ALIGN … #define VFPF_QUEUE_FLG_STATS … #define VFPF_QUEUE_FLG_OV … #define VFPF_QUEUE_FLG_VLAN … #define VFPF_QUEUE_FLG_COS … #define VFPF_QUEUE_FLG_HC … #define VFPF_QUEUE_FLG_DHC … #define VFPF_QUEUE_FLG_LEADING_RSS … #define VFPF_QUEUE_DROP_IP_CS_ERR … #define VFPF_QUEUE_DROP_TCP_CS_ERR … #define VFPF_QUEUE_DROP_TTL0 … #define VFPF_QUEUE_DROP_UDP_CS_ERR … #define VFPF_RX_MASK_ACCEPT_NONE … #define VFPF_RX_MASK_ACCEPT_MATCHED_UNICAST … #define VFPF_RX_MASK_ACCEPT_MATCHED_MULTICAST … #define VFPF_RX_MASK_ACCEPT_ALL_UNICAST … #define VFPF_RX_MASK_ACCEPT_ALL_MULTICAST … #define VFPF_RX_MASK_ACCEPT_BROADCAST … #define VFPF_RX_MASK_ACCEPT_ANY_VLAN … #define BULLETIN_CONTENT_SIZE … #define BULLETIN_CONTENT_LEGACY_SIZE … #define BULLETIN_ATTEMPTS … #define BULLETIN_CRC_SEED … enum { … }; /* vf pf channel tlvs */ /* general tlv header (used for both vf->pf request and pf->vf response) */ struct channel_tlv { … }; /* header of first vf->pf tlv carries the offset used to calculate response * buffer address */ struct vfpf_first_tlv { … }; /* header of pf->vf tlvs, carries the status of handling the request */ struct pfvf_tlv { … }; /* response tlv used for most tlvs */ struct pfvf_general_resp_tlv { … }; /* used to terminate and pad a tlv list */ struct channel_list_end_tlv { … }; /* Acquire */ struct vfpf_acquire_tlv { … }; /* simple operation request on queue */ struct vfpf_q_op_tlv { … }; /* receive side scaling tlv */ struct vfpf_rss_tlv { … }; /* acquire response tlv - carries the allocated resources */ struct pfvf_acquire_resp_tlv { … }; struct vfpf_port_phys_id_resp_tlv { … }; struct vfpf_fp_hsi_resp_tlv { … }; #define VFPF_INIT_FLG_STATS_COALESCE … /* Init VF */ struct vfpf_init_tlv { … }; /* Setup Queue */ struct vfpf_setup_q_tlv { … }; /* Set Queue Filters */ struct vfpf_q_mac_vlan_filter { … }; /* configure queue filters */ struct vfpf_set_q_filters_tlv { … }; struct vfpf_tpa_tlv { … }; /* close VF (disable VF) */ struct vfpf_close_tlv { … }; /* release the VF's acquired resources */ struct vfpf_release_tlv { … }; struct tlv_buffer_size { … }; vfpf_tlvs; pfvf_tlvs; /* This is a structure which is allocated in the VF, which the PF may update * when it deems it necessary to do so. The bulletin board is sampled * periodically by the VF. A copy per VF is maintained in the PF (to prevent * loss of data upon multiple updates (or the need for read modify write)). */ struct pf_vf_bulletin_size { … }; struct pf_vf_bulletin_content { … }; pf_vf_bulletin; #define MAX_TLVS_IN_LIST … enum channel_tlvs { … }; #endif /* CONFIG_BNX2X_SRIOV */ #endif /* VF_PF_IF_H */