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
3674 dev_err(&pf->pdev->dev, "Invalid message from VF %d, opcode %d, len %d\n",3674 dev_err(&pf->pdev->dev, "Invalid message from VF %d, opcode %d, len %d\n",
3675 local_vf_id, v_opcode, msglen);3675 local_vf_id, v_opcode, msglen);
3676 switch (ret) {3676 switch (ret) {
3677 case VIRTCHNL_ERR_PARAM:3677 case VIRTCHNL_STATUS_ERR_PARAM:
3678 return -EPERM;3678 return -EPERM;
3679 default:3679 default:
3680 return -EINVAL;3680 return -EINVAL;
include/linux/avf/virtchnl.h+9−3
@@ -62,13 +62,19 @@ · 61 unmodified lines
62/* Error Codes */62/* Error Codes */
63enum virtchnl_status_code {63enum virtchnl_status_code {
64 VIRTCHNL_STATUS_SUCCESS = 0,64 VIRTCHNL_STATUS_SUCCESS = 0,
65 VIRTCHNL_ERR_PARAM = -5,65 VIRTCHNL_STATUS_ERR_PARAM = -5,
66 VIRTCHNL_STATUS_ERR_NO_MEMORY = -18,
66 VIRTCHNL_STATUS_ERR_OPCODE_MISMATCH = -38,67 VIRTCHNL_STATUS_ERR_OPCODE_MISMATCH = -38,
67 VIRTCHNL_STATUS_ERR_CQP_COMPL_ERROR = -39,68 VIRTCHNL_STATUS_ERR_CQP_COMPL_ERROR = -39,
68 VIRTCHNL_STATUS_ERR_INVALID_VF_ID = -40,69 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,
70};72};
71 73
74/* Backward compatibility */
75#define VIRTCHNL_ERR_PARAM VIRTCHNL_STATUS_ERR_PARAM
76#define VIRTCHNL_STATUS_NOT_SUPPORTED VIRTCHNL_STATUS_ERR_NOT_SUPPORTED
77
72#define VIRTCHNL_LINK_SPEED_100MB_SHIFT 0x178#define VIRTCHNL_LINK_SPEED_100MB_SHIFT 0x1
73#define VIRTCHNL_LINK_SPEED_1000MB_SHIFT 0x279#define VIRTCHNL_LINK_SPEED_1000MB_SHIFT 0x2
74#define VIRTCHNL_LINK_SPEED_10GB_SHIFT 0x380#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
831 case VIRTCHNL_OP_EVENT:837 case VIRTCHNL_OP_EVENT:
832 case VIRTCHNL_OP_UNKNOWN:838 case VIRTCHNL_OP_UNKNOWN:
833 default:839 default:
834 return VIRTCHNL_ERR_PARAM;840 return VIRTCHNL_STATUS_ERR_PARAM;
835 }841 }
836 /* few more checks */842 /* few more checks */
837 if (err_msg_format || valid_len != msglen)843 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