Lines Matching +full:tx +full:- +full:mailbox +full:- +full:count

1 /* SPDX-License-Identifier: GPL-2.0-only */
25 #define GETMAXVAL(num_bits) GENMASK((num_bits) - 1, 0)
29 /* Default Mailbox settings */
31 #define IDPF_NUM_DFLT_MBX_Q 2 /* includes both TX and RX */
33 #define IDPF_DFLT_MBX_ID -1
34 /* maximum number of times to try before resetting mailbox */
37 ((IDPF_CTLQ_MAX_BUF_LEN - (struct_sz)) / (chunk_sz))
64 * enum idpf_state - State machine to handle bring up
78 * enum idpf_flags - Hard reset causes.
83 * @IDPF_MB_INTR_MODE: Mailbox in interrupt mode
98 * enum idpf_cap_field - Offsets into capabilities struct for specific caps
112 IDPF_BASE_CAPS = -1,
128 * enum idpf_vport_state - Current vport state
140 * struct idpf_netdev_priv - Struct to store vport back pointer
162 * struct idpf_reset_reg - Reset register offsets/masks
172 * struct idpf_vport_max_q - Queue limits
174 * @max_txq: Maixmum number of TX queues supported
186 * struct idpf_reg_ops - Device specific register operation function pointers
187 * @ctlq_reg_init: Mailbox control queue register initialization
189 * @mb_intr_reg_init: Mailbox interrupt register initialization
203 * struct idpf_dev_ops - Device specific operations
211 * enum idpf_vport_reset_cause - Vport soft reset causes
225 * enum idpf_vport_flags - Vport flags
227 * @IDPF_VPORT_SW_MARKER: Indicate TX pipe drain software marker packets
251 * struct idpf_vport - Handle for netdevices and queue resources
252 * @num_txq: Number of allocated TX queues
254 * @txq_desc_count: TX queue descriptor count
255 * @complq_desc_count: Completion queue descriptor count
257 * @num_txq_grp: Number of TX queue groups
258 * @txq_grps: Array of TX queue groups
264 * @rxq_desc_count: RX queue descriptor count. *MUST* have enough descriptors
268 * @bufq_desc_count: Buffer queue descriptor count
289 * @tx_itr_profile: TX profiles for Dynamic Interrupt Moderation
355 * struct idpf_rss_data - Associated RSS data
371 * struct idpf_vport_user_config_data - User defined configuration values for
374 * @num_req_tx_qs: Number of user requested TX queues through ethtool
376 * @num_req_txq_desc: Number of user requested TX queue descriptors through
396 * enum idpf_vport_config_flags - Vport config flags
410 * @avail_txq: Available TX queues
424 * struct idpf_vector_info - Utility structure to pass function arguments as a
440 * struct idpf_vector_lifo - Stack to maintain vector indexes used for vector
453 * vector indexes which can be allocated on-demand basis. Mailbox vector index
464 * struct idpf_vport_config - Vport configuration data
482 * struct idpf_adapter - Device data struct generated on probe
487 * @mb_wait_count: Number of times mailbox was attempted initialization
497 * @mb_vector: Mailbox vector data
499 * @irq_mb_handler: Handler for hard interrupt for mailbox
500 * @tx_timeout_count: Number of TX timeouts that have occurred
510 * @next_vport: Next free slot in pf->vport[] - 0-based!
515 * @mbx_task: Task to handle mailbox interrupts
516 * @mbx_wq: Workqueue for mailbox responses
527 * @req_tx_splitq: TX split or single queue model to request
593 * idpf_is_queue_model_split - check if queue model is split
658 * idpf_get_reserved_vecs - Get reserved vectors
663 return le16_to_cpu(adapter->caps.num_allocated_vectors); in idpf_get_reserved_vecs()
667 * idpf_get_default_vports - Get default number of vports
672 return le16_to_cpu(adapter->caps.default_num_vports); in idpf_get_default_vports()
676 * idpf_get_max_vports - Get max number of vports
681 return le16_to_cpu(adapter->caps.max_vports); in idpf_get_max_vports()
685 * idpf_get_max_tx_bufs - Get max scatter-gather buffers supported by the device
690 return adapter->caps.max_sg_bufs_per_tx_pkt; in idpf_get_max_tx_bufs()
694 * idpf_get_min_tx_pkt_len - Get min packet length supported by the device
699 u8 pkt_len = adapter->caps.min_sso_packet_len; in idpf_get_min_tx_pkt_len()
705 * idpf_get_reg_addr - Get BAR0 register address
714 return (void __iomem *)(adapter->hw.hw_addr + reg_offset); in idpf_get_reg_addr()
718 * idpf_is_reset_detected - check if we were reset at some point
725 if (!adapter->hw.arq) in idpf_is_reset_detected()
728 return !(readl(idpf_get_reg_addr(adapter, adapter->hw.arq->reg.len)) & in idpf_is_reset_detected()
729 adapter->hw.arq->reg.len_mask); in idpf_is_reset_detected()
733 * idpf_is_reset_in_prog - check if reset is in progress
740 return (test_bit(IDPF_HR_RESET_IN_PROG, adapter->flags) || in idpf_is_reset_in_prog()
741 test_bit(IDPF_HR_FUNC_RESET, adapter->flags) || in idpf_is_reset_in_prog()
742 test_bit(IDPF_HR_DRV_LOAD, adapter->flags)); in idpf_is_reset_in_prog()
746 * idpf_netdev_to_vport - get a vport handle from a netdev
753 return np->vport; in idpf_netdev_to_vport()
757 * idpf_netdev_to_adapter - Get adapter handle from a netdev
764 return np->adapter; in idpf_netdev_to_adapter()
768 * idpf_is_feature_ena - Determine if a particular feature is enabled
777 return vport->netdev->features & feature; in idpf_is_feature_ena()
781 * idpf_get_max_tx_hdr_size -- get the size of tx header
786 return le16_to_cpu(adapter->caps.max_tx_hdr_size); in idpf_get_max_tx_hdr_size()
790 * idpf_vport_ctrl_lock - Acquire the vport control lock
793 * This lock should be used by non-datapath code to protect against vport
800 mutex_lock(&np->adapter->vport_ctrl_lock); in idpf_vport_ctrl_lock()
804 * idpf_vport_ctrl_unlock - Release the vport control lock
811 mutex_unlock(&np->adapter->vport_ctrl_lock); in idpf_vport_ctrl_unlock()
832 u16 itr, bool tx);