diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2017-05-11 11:23:14 -0700 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2017-06-01 14:17:02 -0700 |
commit | 764430ce6f8c38d7ed3b6d2cfe9450b9d3c78809 (patch) | |
tree | b67e0b10a130a2205aa49d54ea58423e7731ac5a /include | |
parent | eedcfef85b15ae02c488625556702594a618c616 (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/avf/virtchnl.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h index 8ffa670c2ffd..f1cc1f02036e 100644 --- a/include/linux/avf/virtchnl.h +++ b/include/linux/avf/virtchnl.h @@ -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. */ |