Commit 43fc70a2 authored by Jesse Brandeburg's avatar Jesse Brandeburg Committed by Tony Nguyen

virtchnl: update header and increase header clarity

We already have the SPDX header, so just leave a copyright notice with
an updated year and get rid of the boilerplate header (so 2002!).

In addition, update a couple of comments to clarify how the various
parts of the virtchannel header interaction work.

No functional changes.
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: default avatarMarek Szlosek <marek.szlosek@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 3a6a9b3b
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
/******************************************************************************* /* Copyright (c) 2013-2022, Intel Corporation. */
*
* Intel Ethernet Controller XL710 Family Linux Virtual Function Driver
* Copyright(c) 2013 - 2014 Intel Corporation.
*
* Contact Information:
* e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*
******************************************************************************/
#ifndef _VIRTCHNL_H_ #ifndef _VIRTCHNL_H_
#define _VIRTCHNL_H_ #define _VIRTCHNL_H_
/* Description: /* Description:
* This header file describes the VF-PF communication protocol used * This header file describes the Virtual Function (VF) - Physical Function
* by the drivers for all devices starting from our 40G product line * (PF) communication protocol used by the drivers for all devices starting
* from our 40G product line
* *
* Admin queue buffer usage: * Admin queue buffer usage:
* desc->opcode is always aqc_opc_send_msg_to_pf * desc->opcode is always aqc_opc_send_msg_to_pf
...@@ -29,8 +21,8 @@ ...@@ -29,8 +21,8 @@
* have a maximum of sixteen queues for all of its VSIs. * have a maximum of sixteen queues for all of its VSIs.
* *
* The PF is required to return a status code in v_retval for all messages * The PF is required to return a status code in v_retval for all messages
* except RESET_VF, which does not require any response. The return value * except RESET_VF, which does not require any response. The returned value
* is of status_code type, defined in the shared type.h. * is of virtchnl_status_code type, defined here.
* *
* In general, VF driver initialization should roughly follow the order of * In general, VF driver initialization should roughly follow the order of
* these opcodes. The VF driver must first validate the API version of the * these opcodes. The VF driver must first validate the API version of the
...@@ -323,6 +315,9 @@ VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_rxq_info); ...@@ -323,6 +315,9 @@ VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_rxq_info);
* PF configures queues and returns status. * PF configures queues and returns status.
* If the number of queues specified is greater than the number of queues * If the number of queues specified is greater than the number of queues
* associated with the VSI, an error is returned and no queues are configured. * associated with the VSI, an error is returned and no queues are configured.
* NOTE: The VF is not required to configure all queues in a single request.
* It may send multiple messages. PF drivers must correctly handle all VF
* requests.
*/ */
struct virtchnl_queue_pair_info { struct virtchnl_queue_pair_info {
/* NOTE: vsi_id and queue_id should be identical for both queues. */ /* NOTE: vsi_id and queue_id should be identical for both queues. */
...@@ -360,8 +355,13 @@ struct virtchnl_vf_res_request { ...@@ -360,8 +355,13 @@ struct virtchnl_vf_res_request {
* VF uses this message to map vectors to queues. * VF uses this message to map vectors to queues.
* The rxq_map and txq_map fields are bitmaps used to indicate which queues * The rxq_map and txq_map fields are bitmaps used to indicate which queues
* are to be associated with the specified vector. * are to be associated with the specified vector.
* The "other" causes are always mapped to vector 0. * The "other" causes are always mapped to vector 0. The VF may not request
* that vector 0 be used for traffic.
* PF configures interrupt mapping and returns status. * PF configures interrupt mapping and returns status.
* NOTE: due to hardware requirements, all active queues (both TX and RX)
* should be mapped to interrupts, even if the driver intends to operate
* only in polling mode. In this case the interrupt may be disabled, but
* the ITR timer will still run to trigger writebacks.
*/ */
struct virtchnl_vector_map { struct virtchnl_vector_map {
u16 vsi_id; u16 vsi_id;
...@@ -388,6 +388,9 @@ VIRTCHNL_CHECK_STRUCT_LEN(14, virtchnl_irq_map_info); ...@@ -388,6 +388,9 @@ VIRTCHNL_CHECK_STRUCT_LEN(14, virtchnl_irq_map_info);
* (Currently, we only support 16 queues per VF, but we make the field * (Currently, we only support 16 queues per VF, but we make the field
* u32 to allow for expansion.) * u32 to allow for expansion.)
* PF performs requested action and returns status. * PF performs requested action and returns status.
* NOTE: The VF is not required to enable/disable all queues in a single
* request. It may send multiple messages.
* PF drivers must correctly handle all VF requests.
*/ */
struct virtchnl_queue_select { struct virtchnl_queue_select {
u16 vsi_id; u16 vsi_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment