Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixl/if_ixl.c
Show First 20 Lines • Show All 5,512 Lines • ▼ Show 20 Lines | ixl_vf_version_msg(struct ixl_pf *pf, struct ixl_vf *vf, void *msg, | ||||
reply.major = I40E_VIRTCHNL_VERSION_MAJOR; | reply.major = I40E_VIRTCHNL_VERSION_MAJOR; | ||||
reply.minor = I40E_VIRTCHNL_VERSION_MINOR; | reply.minor = I40E_VIRTCHNL_VERSION_MINOR; | ||||
ixl_send_vf_msg(pf, vf, I40E_VIRTCHNL_OP_VERSION, I40E_SUCCESS, &reply, | ixl_send_vf_msg(pf, vf, I40E_VIRTCHNL_OP_VERSION, I40E_SUCCESS, &reply, | ||||
sizeof(reply)); | sizeof(reply)); | ||||
} | } | ||||
static void | static void | ||||
ixl_vf_reset_msg(struct ixl_pf *pf, struct ixl_vf *vf, void *msg, | |||||
uint16_t msg_size) | |||||
{ | |||||
if (msg_size != 0) { | |||||
i40e_send_vf_nack(pf, vf, I40E_VIRTCHNL_OP_RESET_VF, | |||||
I40E_ERR_PARAM); | |||||
return; | |||||
} | |||||
ixl_reset_vf(pf, vf); | |||||
/* No response to a reset message. */ | |||||
} | |||||
static void | |||||
ixl_handle_vf_msg(struct ixl_pf *pf, struct i40e_arq_event_info *event) | ixl_handle_vf_msg(struct ixl_pf *pf, struct i40e_arq_event_info *event) | ||||
{ | { | ||||
struct ixl_vf *vf; | struct ixl_vf *vf; | ||||
void *msg; | void *msg; | ||||
uint16_t vf_num, msg_size; | uint16_t vf_num, msg_size; | ||||
uint32_t opcode; | uint32_t opcode; | ||||
vf_num = le16toh(event->desc.retval); | vf_num = le16toh(event->desc.retval); | ||||
Show All 10 Lines | ixl_handle_vf_msg(struct ixl_pf *pf, struct i40e_arq_event_info *event) | ||||
I40E_VC_DEBUG(pf, ixl_vc_opcode_level(opcode), | I40E_VC_DEBUG(pf, ixl_vc_opcode_level(opcode), | ||||
"Got msg %s(%d) from VF-%d of size %d\n", | "Got msg %s(%d) from VF-%d of size %d\n", | ||||
ixl_vc_opcode_str(opcode), opcode, vf_num, msg_size); | ixl_vc_opcode_str(opcode), opcode, vf_num, msg_size); | ||||
switch (opcode) { | switch (opcode) { | ||||
case I40E_VIRTCHNL_OP_VERSION: | case I40E_VIRTCHNL_OP_VERSION: | ||||
ixl_vf_version_msg(pf, vf, msg, msg_size); | ixl_vf_version_msg(pf, vf, msg, msg_size); | ||||
break; | |||||
case I40E_VIRTCHNL_OP_RESET_VF: | |||||
ixl_vf_reset_msg(pf, vf, msg, msg_size); | |||||
break; | break; | ||||
default: | default: | ||||
i40e_send_vf_nack(pf, vf, opcode, I40E_ERR_NOT_IMPLEMENTED); | i40e_send_vf_nack(pf, vf, opcode, I40E_ERR_NOT_IMPLEMENTED); | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
static int | static int | ||||
▲ Show 20 Lines • Show All 149 Lines • Show Last 20 Lines |