History

i40e: Update status codes

Add a few new status code which will be used by the ice driver, and rename a few to make them more consistent. Error code are mapped to similar values as in i40e_status.h, so as to be compatible with older VF drivers not using this status enum.

Mitch Williams committed 8 years ago

Commit bb58fd71 parent 48e01e02 files · +10 −4Browse files

Unified · Split

2 files
  1. drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +1 −1
  2. include/linux/avf/virtchnl.h +9 −3
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c+1−1
@@ -3674,7 +3674,7 @@ int i40e_vc_process_vf_msg(struct i40e_pf *pf, s16 vf_id, u32 v_opcode, · 3673 unmodified lines
36743674 dev_err(&pf->pdev->dev, "Invalid message from VF %d, opcode %d, len %d\n",
36753675 local_vf_id, v_opcode, msglen);
36763676 switch (ret) {
3677− case VIRTCHNL_ERR_PARAM:
3677+ case VIRTCHNL_STATUS_ERR_PARAM:
36783678 return -EPERM;
36793679 default:
36803680 return -EINVAL;
include/linux/avf/virtchnl.h+9−3
@@ -62,13 +62,19 @@ · 61 unmodified lines
6262 /* Error Codes */
6363 enum virtchnl_status_code {
6464 VIRTCHNL_STATUS_SUCCESS = 0,
65− VIRTCHNL_ERR_PARAM = -5,
65+ VIRTCHNL_STATUS_ERR_PARAM = -5,
66+ VIRTCHNL_STATUS_ERR_NO_MEMORY = -18,
6667 VIRTCHNL_STATUS_ERR_OPCODE_MISMATCH = -38,
6768 VIRTCHNL_STATUS_ERR_CQP_COMPL_ERROR = -39,
6869 VIRTCHNL_STATUS_ERR_INVALID_VF_ID = -40,
69− VIRTCHNL_STATUS_NOT_SUPPORTED = -64,
70+ VIRTCHNL_STATUS_ERR_ADMIN_QUEUE_ERROR = -53,
71+ VIRTCHNL_STATUS_ERR_NOT_SUPPORTED = -64,
7072 };
7173
74+/* Backward compatibility */
75+#define VIRTCHNL_ERR_PARAM VIRTCHNL_STATUS_ERR_PARAM
76+#define VIRTCHNL_STATUS_NOT_SUPPORTED VIRTCHNL_STATUS_ERR_NOT_SUPPORTED
77+
7278 #define VIRTCHNL_LINK_SPEED_100MB_SHIFT 0x1
7379 #define VIRTCHNL_LINK_SPEED_1000MB_SHIFT 0x2
7480 #define VIRTCHNL_LINK_SPEED_10GB_SHIFT 0x3
@@ -831,7 +837,7 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode, · 756 unmodified lines
831837 case VIRTCHNL_OP_EVENT:
832838 case VIRTCHNL_OP_UNKNOWN:
833839 default:
834− return VIRTCHNL_ERR_PARAM;
840+ return VIRTCHNL_STATUS_ERR_PARAM;
835841 }
836842 /* few more checks */
837843 if (err_msg_format || valid_len != msglen)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t