Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixl/ixlvc.c
Show First 20 Lines • Show All 172 Lines • ▼ Show 20 Lines | #ifdef IXL_DEBUG | ||||
val_err = ixl_vc_validate_vf_msg(sc, op, msg, len); | val_err = ixl_vc_validate_vf_msg(sc, op, msg, len); | ||||
if (val_err) | if (val_err) | ||||
device_printf(dev, "Error validating msg to PF for op %d," | device_printf(dev, "Error validating msg to PF for op %d," | ||||
" msglen %d: error %d\n", op, len, val_err); | " msglen %d: error %d\n", op, len, val_err); | ||||
#endif | #endif | ||||
err = i40e_aq_send_msg_to_pf(hw, op, I40E_SUCCESS, msg, len, NULL); | err = i40e_aq_send_msg_to_pf(hw, op, I40E_SUCCESS, msg, len, NULL); | ||||
if (err) | if (err) | ||||
device_printf(dev, "Unable to send opcode %d to PF, " | device_printf(dev, "Unable to send opcode %s to PF, " | ||||
"error %d, aq status %d\n", op, err, hw->aq.asq_last_status); | "status %s, aq error %s\n", | ||||
ixl_vc_opcode_str(op), | |||||
i40e_stat_str(hw, err), | |||||
i40e_aq_str(hw, hw->aq.asq_last_status)); | |||||
return err; | return err; | ||||
} | } | ||||
/* | /* | ||||
** ixlv_send_api_ver | ** ixlv_send_api_ver | ||||
** | ** | ||||
** Send API version admin queue message to the PF. The reply is not checked | ** Send API version admin queue message to the PF. The reply is not checked | ||||
▲ Show 20 Lines • Show All 675 Lines • ▼ Show 20 Lines | #endif | ||||
free(rss_key_msg, M_DEVBUF); | free(rss_key_msg, M_DEVBUF); | ||||
} | } | ||||
void | void | ||||
ixlv_set_rss_hena(struct ixlv_sc *sc) | ixlv_set_rss_hena(struct ixlv_sc *sc) | ||||
{ | { | ||||
struct i40e_virtchnl_rss_hena hena; | struct i40e_virtchnl_rss_hena hena; | ||||
hena.hena = IXL_DEFAULT_RSS_HENA; | hena.hena = IXL_DEFAULT_RSS_HENA_X722; | ||||
ixlv_send_pf_msg(sc, I40E_VIRTCHNL_OP_SET_RSS_HENA, | ixlv_send_pf_msg(sc, I40E_VIRTCHNL_OP_SET_RSS_HENA, | ||||
(u8 *)&hena, sizeof(hena)); | (u8 *)&hena, sizeof(hena)); | ||||
} | } | ||||
void | void | ||||
ixlv_config_rss_lut(struct ixlv_sc *sc) | ixlv_config_rss_lut(struct ixlv_sc *sc) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | #endif | ||||
} | } | ||||
return; | return; | ||||
} | } | ||||
/* Catch-all error response */ | /* Catch-all error response */ | ||||
if (v_retval) { | if (v_retval) { | ||||
device_printf(dev, | device_printf(dev, | ||||
"%s: AQ returned error %d to our request %d!\n", | "%s: AQ returned error %s to our request %s!\n", | ||||
__func__, v_retval, v_opcode); | __func__, i40e_stat_str(&sc->hw, v_retval), ixl_vc_opcode_str(v_opcode)); | ||||
} | } | ||||
#ifdef IXL_DEBUG | #ifdef IXL_DEBUG | ||||
if (v_opcode != I40E_VIRTCHNL_OP_GET_STATS) | if (v_opcode != I40E_VIRTCHNL_OP_GET_STATS) | ||||
DDPRINTF(dev, "opcode %d", v_opcode); | DDPRINTF(dev, "opcode %d", v_opcode); | ||||
#endif | #endif | ||||
switch (v_opcode) { | switch (v_opcode) { | ||||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | case I40E_VIRTCHNL_OP_SET_RSS_HENA: | ||||
break; | break; | ||||
case I40E_VIRTCHNL_OP_CONFIG_RSS_LUT: | case I40E_VIRTCHNL_OP_CONFIG_RSS_LUT: | ||||
ixl_vc_process_resp(&sc->vc_mgr, IXLV_FLAG_AQ_CONFIG_RSS_LUT, | ixl_vc_process_resp(&sc->vc_mgr, IXLV_FLAG_AQ_CONFIG_RSS_LUT, | ||||
v_retval); | v_retval); | ||||
break; | break; | ||||
default: | default: | ||||
#ifdef IXL_DEBUG | #ifdef IXL_DEBUG | ||||
device_printf(dev, | device_printf(dev, | ||||
"%s: Received unexpected message %d from PF.\n", | "%s: Received unexpected message %s from PF.\n", | ||||
__func__, v_opcode); | __func__, ixl_vc_opcode_str(v_opcode)); | ||||
#endif | #endif | ||||
break; | break; | ||||
} | } | ||||
return; | return; | ||||
} | } | ||||
static void | static void | ||||
ixl_vc_send_cmd(struct ixlv_sc *sc, uint32_t request) | ixl_vc_send_cmd(struct ixlv_sc *sc, uint32_t request) | ||||
▲ Show 20 Lines • Show All 185 Lines • Show Last 20 Lines |