| 1295 | } |
| 1296 | |
| 1297 | int |
| 1298 | ice_dcf_switch_queue(struct ice_dcf_hw *hw, uint16_t qid, bool rx, bool on) |
| 1299 | { |
| 1300 | struct virtchnl_queue_select queue_select; |
| 1301 | struct dcf_virtchnl_cmd args; |
| 1302 | int err; |
| 1303 | |
| 1304 | memset(&queue_select, 0, sizeof(queue_select)); |
| 1305 | queue_select.vsi_id = hw->vsi_res->vsi_id; |
| 1306 | if (rx) |
| 1307 | queue_select.rx_queues |= 1 << qid; |
| 1308 | else |
| 1309 | queue_select.tx_queues |= 1 << qid; |
| 1310 | |
| 1311 | memset(&args, 0, sizeof(args)); |
| 1312 | if (on) |
| 1313 | args.v_op = VIRTCHNL_OP_ENABLE_QUEUES; |
| 1314 | else |
| 1315 | args.v_op = VIRTCHNL_OP_DISABLE_QUEUES; |
| 1316 | |
| 1317 | args.req_msg = (u8 *)&queue_select; |
| 1318 | args.req_msglen = sizeof(queue_select); |
| 1319 | |
| 1320 | err = ice_dcf_execute_virtchnl_cmd(hw, &args); |
| 1321 | if (err) |
| 1322 | PMD_DRV_LOG(ERR, "Failed to execute command of %s", |
| 1323 | on ? "OP_ENABLE_QUEUES" : "OP_DISABLE_QUEUES"); |
| 1324 | |
| 1325 | return err; |
| 1326 | } |
| 1327 | |
| 1328 | int |
| 1329 | ice_dcf_disable_queues(struct ice_dcf_hw *hw) |
no test coverage detected