i40e/virtchnl: refactor code for validate checks
This change updates the arguments passed to the validate function and fixes the caller, as well as uses the new return values added to virtchnl.h One other minor tweak, remove a duplicate set to zero of valid_len. This is in preparation for moving the function to virtchnl.h. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:

committed by
Jeff Kirsher

parent
eedcfef85b
commit
764430ce6f
@@ -53,6 +53,23 @@
|
||||
* its queues, optionally add MAC and VLAN filters, and process traffic.
|
||||
*/
|
||||
|
||||
/* START GENERIC DEFINES
|
||||
* Need to ensure the following enums and defines hold the same meaning and
|
||||
* value in current and future projects
|
||||
*/
|
||||
|
||||
/* Error Codes */
|
||||
enum virtchnl_status_code {
|
||||
VIRTCHNL_STATUS_SUCCESS = 0,
|
||||
VIRTCHNL_ERR_PARAM = -5,
|
||||
VIRTCHNL_STATUS_ERR_OPCODE_MISMATCH = -38,
|
||||
VIRTCHNL_STATUS_ERR_CQP_COMPL_ERROR = -39,
|
||||
VIRTCHNL_STATUS_ERR_INVALID_VF_ID = -40,
|
||||
VIRTCHNL_STATUS_NOT_SUPPORTED = -64,
|
||||
};
|
||||
|
||||
/* END GENERIC DEFINES */
|
||||
|
||||
/* Opcodes for VF-PF communication. These are placed in the v_opcode field
|
||||
* of the virtchnl_msg structure.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user