struct qed_public_vf_info { /* These copies will later be reflected in the bulletin board, * but this copy should be newer.
*/
u8 forced_mac[ETH_ALEN];
u16 forced_vlan;
u8 mac[ETH_ALEN];
/* IFLA_VF_LINK_STATE_<X> */ int link_state;
/* Currently configured Tx rate in MB/sec. 0 if unconfigured */ int tx_rate;
/* Trusted VFs can configure promiscuous mode. * Also store shadow promisc configuration if needed.
*/ bool is_trusted_configured; bool is_trusted_request;
u8 rx_accept_mode;
u8 tx_accept_mode; bool accept_any_vlan;
};
struct qed_iov_vf_init_params {
u16 rel_vf_id;
/* Number of requested Queues; Currently, don't support different * number of Rx/Tx queues.
*/
u16 num_queues;
/* Allow the client to choose which qzones to use for Rx/Tx, * and which queue_base to use for Tx queues on a per-queue basis. * Notice values should be relative to the PF resources.
*/
u16 req_rx_queue[QED_MAX_VF_CHAINS_PER_PF];
u16 req_tx_queue[QED_MAX_VF_CHAINS_PER_PF];
};
/* This struct is part of qed_dev and contains data relevant to all hwfns; * Initialized only if SR-IOV cpabability is exposed in PCIe config space.
*/ struct qed_hw_sriov_info { int pos; /* capability position */ int nres; /* number of resources */
u32 cap; /* SR-IOV Capabilities */
u16 ctrl; /* SR-IOV Control */
u16 total_vfs; /* total VFs associated with the PF */
u16 num_vfs; /* number of vfs that have been started */
u16 initial_vfs; /* initial VFs associated with the PF */
u16 nr_virtfn; /* number of VFs available */
u16 offset; /* first VF Routing ID offset */
u16 stride; /* following VF stride */
u16 vf_device_id; /* VF device id */
u32 pgsz; /* page size for BAR alignment */
u8 link; /* Function Dependency Link */
u32 first_vf_in_pf;
};
/* This mailbox is maintained per VF in its PF contains all information * required for sending / receiving a message.
*/ struct qed_iov_vf_mbx { union vfpf_tlvs *req_virt;
dma_addr_t req_phys; union pfvf_tlvs *reply_virt;
dma_addr_t reply_phys;
/* Address in VF where a pending message is located */
dma_addr_t pending_req;
/* Message from VF awaits handling */ bool b_pending_msg;
/* Stores the configuration requested by VF */ struct qed_vf_shadow_config shadow_config;
/* A bitfield using bulletin's valid-map bits, used to indicate * which of the bulletin board features have been configured.
*/
u64 configured_features; #define QED_IOV_CONFIGURED_FEATURES_MASK ((1 << MAC_ADDR_FORCED) | \
(1 << VLAN_ADDR_FORCED))
};
/* This structure is part of qed_hwfn and used only for PFs that have sriov * capability enabled.
*/ struct qed_pf_iov { struct qed_vf_info vfs_array[MAX_NUM_VFS];
u64 pending_flr[QED_VF_ARRAY_LENGTH];
/* Allocate message address continuosuly and split to each VF */ void *mbx_msg_virt_addr;
dma_addr_t mbx_msg_phys_addr;
u32 mbx_msg_size; void *mbx_reply_virt_addr;
dma_addr_t mbx_reply_phys_addr;
u32 mbx_reply_size; void *p_bulletins;
dma_addr_t bulletins_phys;
u32 bulletins_size;
};
#ifdef CONFIG_QED_SRIOV /** * qed_iov_is_valid_vfid(): Check if given VF ID @vfid is valid * w.r.t. @b_enabled_only value * if b_enabled_only = true - only enabled * VF id is valid. * else any VF id less than max_vfs is valid. * * @p_hwfn: HW device data. * @rel_vf_id: Relative VF ID. * @b_enabled_only: consider only enabled VF. * @b_non_malicious: true iff we want to validate vf isn't malicious. * * Return: bool - true for valid VF ID
*/ bool qed_iov_is_valid_vfid(struct qed_hwfn *p_hwfn, int rel_vf_id, bool b_enabled_only, bool b_non_malicious);
/** * qed_iov_get_next_active_vf(): Given a VF index, return index of * next [including that] active VF. * * @p_hwfn: HW device data. * @rel_vf_id: VF ID. * * Return: MAX_NUM_VFS in case no further active VFs, otherwise index.
*/
u16 qed_iov_get_next_active_vf(struct qed_hwfn *p_hwfn, u16 rel_vf_id);
void qed_iov_bulletin_set_udp_ports(struct qed_hwfn *p_hwfn, int vfid, u16 vxlan_port, u16 geneve_port);
/** * qed_iov_hw_info(): Read sriov related information and allocated resources * reads from configuration space, shmem, etc. * * @p_hwfn: HW device data. * * Return: Int.
*/ int qed_iov_hw_info(struct qed_hwfn *p_hwfn);
/** * qed_add_tlv(): place a given tlv on the tlv buffer at next offset * * @p_hwfn: HW device data. * @offset: offset. * @type: Type * @length: Length. * * Return: pointer to the newly placed tlv
*/ void *qed_add_tlv(struct qed_hwfn *p_hwfn, u8 **offset, u16 type, u16 length);
/** * qed_dp_tlv_list(): list the types and lengths of the tlvs on the buffer * * @p_hwfn: HW device data. * @tlvs_list: Tlvs_list. * * Return: Void.
*/ void qed_dp_tlv_list(struct qed_hwfn *p_hwfn, void *tlvs_list);
/** * qed_iov_free_hw_info(): free sriov related memory that was * allocated during hw_prepare * * @cdev: Qed dev pointer. * * Return: Void.
*/ void qed_iov_free_hw_info(struct qed_dev *cdev);
/** * qed_iov_mark_vf_flr(): Mark structs of vfs that have been FLR-ed. * * @p_hwfn: HW device data. * @disabled_vfs: bitmask of all VFs on path that were FLRed * * Return: true iff one of the PF's vfs got FLRed. false otherwise.
*/ bool qed_iov_mark_vf_flr(struct qed_hwfn *p_hwfn, u32 *disabled_vfs);
/** * qed_iov_search_list_tlvs(): Search extended TLVs in request/reply buffer. * * @p_hwfn: HW device data. * @p_tlvs_list: Pointer to tlvs list * @req_type: Type of TLV * * Return: pointer to tlv type if found, otherwise returns NULL.
*/ void *qed_iov_search_list_tlvs(struct qed_hwfn *p_hwfn, void *p_tlvs_list, u16 req_type);
void qed_iov_wq_stop(struct qed_dev *cdev, bool schedule_first); int qed_iov_wq_start(struct qed_dev *cdev);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.