Lines Matching +full:rx +full:- +full:queues +full:- +full:to +full:- +full:use

1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * Copyright(c) 2013 - 2014 Intel Corporation.
8 * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
9 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
17 * This header file describes the VF-PF communication protocol used
21 * desc->opcode is always aqc_opc_send_msg_to_pf
24 * PF and VF, but uses all other fields internally. Due to this limitation,
27 * All the VSI indexes are relative to the VF. Each VF can have maximum of
28 * three VSIs. All the queue indexes are relative to the VSI. Each VF can
29 * have a maximum of sixteen queues for all of its VSIs.
31 * The PF is required to return a status code in v_retval for all messages
38 * queues and interrupts. After these operations are complete, the VF
39 * driver may start its queues, optionally add MAC and VLAN filters, and
44 * Need to ensure the following enums and defines hold the same meaning and
51 VIRTCHNL_STATUS_ERR_PARAM = -5,
52 VIRTCHNL_STATUS_ERR_NO_MEMORY = -18,
53 VIRTCHNL_STATUS_ERR_OPCODE_MISMATCH = -38,
54 VIRTCHNL_STATUS_ERR_CQP_COMPL_ERROR = -39,
55 VIRTCHNL_STATUS_ERR_INVALID_VF_ID = -40,
56 VIRTCHNL_STATUS_ERR_ADMIN_QUEUE_ERROR = -53,
57 VIRTCHNL_STATUS_ERR_NOT_SUPPORTED = -64,
85 /* for hsplit_0 field of Rx HMC context */
97 /* Opcodes for VF-PF communication. These are placed in the v_opcode field
101 /* The PF sends status change events to VFs using
103 * VFs send requests to the PF using the other ops.
104 * Use of "advanced opcode" features must be negotiated as part of capabilities
141 /* These macros are used to generate compilation errors if a structure/union
157 enum virtchnl_ops v_opcode; /* avoid confusion with desc->opcode */
158 enum virtchnl_status_code v_retval; /* ditto for desc->retval */
159 u32 vfid; /* used by PF when sending to VF */
167 * VF posts its version number to the PF. PF responds with its version number
172 * add a warning to the system log.
175 * changes in the API. The PF must always respond to this message without
189 #define VF_IS_V10(_v) (((_v)->major == 1) && ((_v)->minor == 0))
190 #define VF_IS_V11(_ver) (((_ver)->major == 1) && ((_ver)->minor == 1))
193 * VF sends this request to PF with no parameters
198 * When reset is complete, PF must ensure that all queues in all VSIs associated
199 * with the VF are stopped, all queue configurations in the HMC are set to 0,
204 /* VSI types that use VIRTCHNL interface for VF-PF communication. VSI_SRIOV
214 * Version 1.0 VF sends this request to PF with no parameters
215 * Version 1.1 VF sends this request to PF with u32 bitmap of its capabilities
233 * TX/RX Checksum offloading and TSO for non-tunnelled packets.
273 * VF sends this message to set up parameters for one TX queue.
291 * VF sends this message to set up parameters for one RX queue.
296 /* Rx queue config info */
314 * VF sends this message to set parameters for all active TX and RX queues
316 * PF configures queues and returns status.
317 * If the number of queues specified is greater than the number of queues
318 * associated with the VSI, an error is returned and no queues are configured.
321 /* NOTE: vsi_id and queue_id should be identical for both queues. */
338 * VF sends this message to request the PF to allocate additional queues to
339 * this VF. Each VF gets a guaranteed number of queues on init but asking for
340 * additional queues must be negotiated. This is a best effort request as it
341 * is possible the PF does not have enough queues left to support the request.
343 * maximum number it is able to support. If the request is successful, PF will
344 * then reset the VF to institute required changes.
353 * VF uses this message to map vectors to queues.
354 * The rxq_map and txq_map fields are bitmaps used to indicate which queues
355 * are to be associated with the specified vector.
356 * The "other" causes are always mapped to vector 0.
379 * VF sends these message to enable or disable TX/RX queue pairs.
380 * The queues fields are bitmaps indicating which queues to act upon.
381 * (Currently, we only support 16 queues per VF, but we make the field
382 * u32 to allow for expansion.)
395 * VF sends this message in order to add one or more unicast or multicast
401 * VF sends this message in order to remove one or more unicast or multicast
422 * VF sends this message to add one or more VLAN tag filters for receives.
425 * error to the VF.
429 * VF sends this message to remove one or more VLAN tag filters for receives.
432 * error to the VF.
459 * VF sends this message to request stats for the selected VSI. VF uses
460 * the virtchnl_queue_select struct to specify the VSI. The queue_id
468 * VF sends these messages to configure RSS. Only supported if both PF
472 * Both the key and LUT are initialized to 0 by the PF, meaning that
495 * VF sends these messages to get and set the hash filter enable bits for RSS.
496 * By default, the PF sets these to all possible traffic types that the
497 * hardware supports. The VF can query this value if it wants to change the
508 * VF sends these messages to enable or disable channels based on
511 * VF to create a channel.
514 u16 count; /* number of queues in a channel */
515 u16 offset; /* queues in a channel start from 'offset' */
532 * VF sends these messages to add or delete a cloud filter based on the
534 * all the information that the PF needs from the VF to add/delete a
542 __be16 pad; /* reserved for future use */
553 u8 buffer[128]; /* reserved for future use */
583 * PF sends this message to inform the VF driver of events that may affect it.
585 * messages in response to this one.
601 * capabilities then use link_event else use link_event_adv to
602 * get the speed and link information. The ability to understand
605 * in virtchnl_vf_resource struct and can be used to determine
606 * which link event struct to use below.
626 * VF uses this message to request PF to map IWARP vectors to IWARP queues.
629 * A vector could have an AEQ and CEQ attached to it although
633 * to a single vector.
654 /* VF reset states - these are written into the RSTAT register:
659 * VF checks this register periodically to determine if a reset has occurred,
660 * then polls it to know when the reset is complete.
675 * @msg: pointer to the msg buffer
709 valid_len += (vqc->num_queue_pairs * in virtchnl_vc_validate_vf_msg()
712 if (vqc->num_queue_pairs == 0) in virtchnl_vc_validate_vf_msg()
721 valid_len += (vimi->num_vectors * in virtchnl_vc_validate_vf_msg()
723 if (vimi->num_vectors == 0) in virtchnl_vc_validate_vf_msg()
737 valid_len += veal->num_elements * in virtchnl_vc_validate_vf_msg()
739 if (veal->num_elements == 0) in virtchnl_vc_validate_vf_msg()
749 valid_len += vfl->num_elements * sizeof(u16); in virtchnl_vc_validate_vf_msg()
750 if (vfl->num_elements == 0) in virtchnl_vc_validate_vf_msg()
761 /* These messages are opaque to us and will be validated in in virtchnl_vc_validate_vf_msg()
762 * the RDMA client code. We just need to check for nonzero in virtchnl_vc_validate_vf_msg()
777 if (qv->num_vectors == 0) { in virtchnl_vc_validate_vf_msg()
781 valid_len += ((qv->num_vectors - 1) * in virtchnl_vc_validate_vf_msg()
790 valid_len += vrk->key_len - 1; in virtchnl_vc_validate_vf_msg()
798 valid_len += vrl->lut_entries - 1; in virtchnl_vc_validate_vf_msg()
817 valid_len += (vti->num_tc - 1) * in virtchnl_vc_validate_vf_msg()
819 if (vti->num_tc == 0) in virtchnl_vc_validate_vf_msg()