[Intel-wired-lan] [PATCH net-next 01/15] virtchnl: add virtchnl version 2 ops
Simon Horman
simon.horman at corigine.com
Fri Mar 31 15:25:33 UTC 2023
On Wed, Mar 29, 2023 at 07:03:50AM -0700, Pavan Kumar Linga wrote:
> Virtchnl version 1 is an interface used by the current generation of
> foundational NICs to negotiate the capabilities and configure the
> HW resources such as queues, vectors, RSS LUT, etc between the PF
> and VF drivers. It is not extensible to enable new features supported
> in the next generation of NICs/IPUs and to negotiate descriptor types,
> packet types and register offsets.
>
> To overcome the limitations of the existing interface, introduce
> the virtchnl version 2 and add the necessary opcodes, structures,
> definitions, and descriptor formats. The driver also learns the
> data queue and other register offsets to use instead of hardcoding
> them. The advantage of this approach is that it gives the flexibility
> to modify the register offsets if needed, restrict the use of
> certain descriptor types and negotiate the supported packet types.
>
> Following are the links to the specifications for reference
>
> Virtchnl version1:
> https://www.intel.com/content/dam/www/public/us/en/documents/
> product-specifications/ethernet-adaptive-virtual-function-hardware-spec.pdf
>
> Virtchnl version2:
> https://www.oasis-open.org/committees/documents.php?wg_abbrev=idpf
>
> Co-developed-by: Alan Brady <alan.brady at intel.com>
> Signed-off-by: Alan Brady <alan.brady at intel.com>
> Co-developed-by: Joshua Hay <joshua.a.hay at intel.com>
> Signed-off-by: Joshua Hay <joshua.a.hay at intel.com>
> Co-developed-by: Madhu Chittim <madhu.chittim at intel.com>
> Signed-off-by: Madhu Chittim <madhu.chittim at intel.com>
> Co-developed-by: Phani Burra <phani.r.burra at intel.com>
> Signed-off-by: Phani Burra <phani.r.burra at intel.com>
> Co-developed-by: Sridhar Samudrala <sridhar.samudrala at intel.com>
> Signed-off-by: Sridhar Samudrala <sridhar.samudrala at intel.com>
> Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga at intel.com>
> Reviewed-by: Sridhar Samudrala <sridhar.samudrala at intel.com>
I guess this patchset has a while to run in review.
Some initial nits from my side, in case they are of any use to you.
...
> +/* Transmit queue config info */
> +struct virtchnl2_txq_info {
> + __le64 dma_ring_addr;
> +
> + /* See VIRTCHNL2_QUEUE_TYPE definitions */
> + __le32 type;
> +
> + __le32 queue_id;
> + /* Valid only if queue model is split and type is trasmit queue. Used
nit: s/trasmit/transmit/
...
> +/* Receive Descriptors */
> +/* Splitq buf
> + * | 16| 0|
> + * ----------------------------------------------------------------
> + * | RSV | Buffer ID |
> + * ----------------------------------------------------------------
> + * | Rx packet buffer adresss |
nit: s/adresss/address
> + * ----------------------------------------------------------------
> + * | Rx header buffer adresss |
ditto
> + * ----------------------------------------------------------------
> + * | RSV |
> + * ----------------------------------------------------------------
> + * | 0|
> + */
> +struct virtchnl2_splitq_rx_buf_desc {
> + struct {
> + /* Buffer Identifier */
> + __le16 buf_id;
> + __le16 rsvd0;
> + __le32 rsvd1;
> + } qword0;
> +
> + /* Packet buffer address */
ditto
> + __le64 pkt_addr;
> + /* Header buffer address */
ditto
> + __le64 hdr_addr;
> + __le64 rsvd2;
> +}; /* RX buffer descriptor format */
More information about the Intel-wired-lan
mailing list