MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ice_dcf_switch_queue

Function ice_dcf_switch_queue

dpdk/drivers/net/ice/ice_dcf.c:1297–1326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1295}
1296
1297int
1298ice_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
1328int
1329ice_dcf_disable_queues(struct ice_dcf_hw *hw)

Callers 4

ice_dcf_rx_queue_startFunction · 0.85
ice_dcf_rx_queue_stopFunction · 0.85
ice_dcf_tx_queue_startFunction · 0.85
ice_dcf_tx_queue_stopFunction · 0.85

Calls 2

memsetFunction · 0.85

Tested by

no test coverage detected