idpf_vc_queues_ena_dis() has no caller. The idpf and cpfl drivers enable queue groups through idpf_vc_queue_switch().
Signed-off-by: Stephen Hemminger <[email protected]> --- drivers/net/intel/idpf/idpf_common_virtchnl.c | 68 ------------------- drivers/net/intel/idpf/idpf_common_virtchnl.h | 1 - 2 files changed, 69 deletions(-) diff --git a/drivers/net/intel/idpf/idpf_common_virtchnl.c b/drivers/net/intel/idpf/idpf_common_virtchnl.c index b1a13d1c56..986ceede7d 100644 --- a/drivers/net/intel/idpf/idpf_common_virtchnl.c +++ b/drivers/net/intel/idpf/idpf_common_virtchnl.c @@ -887,74 +887,6 @@ idpf_vc_queue_switch(struct idpf_vport *vport, uint16_t qid, } #define IDPF_RXTX_QUEUE_CHUNKS_NUM 2 -int -idpf_vc_queues_ena_dis(struct idpf_vport *vport, bool enable) -{ - struct idpf_adapter *adapter = vport->adapter; - struct virtchnl2_del_ena_dis_queues *queue_select; - struct virtchnl2_queue_chunk *queue_chunk; - uint32_t type; - struct idpf_cmd_info args; - uint16_t num_chunks; - int err, len; - - num_chunks = IDPF_RXTX_QUEUE_CHUNKS_NUM; - if (vport->txq_model == VIRTCHNL2_QUEUE_MODEL_SPLIT) - num_chunks++; - if (vport->rxq_model == VIRTCHNL2_QUEUE_MODEL_SPLIT) - num_chunks++; - - len = sizeof(struct virtchnl2_del_ena_dis_queues) + - sizeof(struct virtchnl2_queue_chunk) * (num_chunks - 1); - queue_select = rte_zmalloc("queue_select", len, 0); - if (queue_select == NULL) - return -ENOMEM; - - queue_chunk = queue_select->chunks.chunks; - queue_select->chunks.num_chunks = num_chunks; - queue_select->vport_id = vport->vport_id; - - type = VIRTCHNL_QUEUE_TYPE_RX; - queue_chunk[type].type = type; - queue_chunk[type].start_queue_id = vport->chunks_info.rx_start_qid; - queue_chunk[type].num_queues = vport->num_rx_q; - - type = VIRTCHNL2_QUEUE_TYPE_TX; - queue_chunk[type].type = type; - queue_chunk[type].start_queue_id = vport->chunks_info.tx_start_qid; - queue_chunk[type].num_queues = vport->num_tx_q; - - if (vport->rxq_model == VIRTCHNL2_QUEUE_MODEL_SPLIT) { - type = VIRTCHNL2_QUEUE_TYPE_RX_BUFFER; - queue_chunk[type].type = type; - queue_chunk[type].start_queue_id = - vport->chunks_info.rx_buf_start_qid; - queue_chunk[type].num_queues = vport->num_rx_bufq; - } - - if (vport->txq_model == VIRTCHNL2_QUEUE_MODEL_SPLIT) { - type = VIRTCHNL2_QUEUE_TYPE_TX_COMPLETION; - queue_chunk[type].type = type; - queue_chunk[type].start_queue_id = - vport->chunks_info.tx_compl_start_qid; - queue_chunk[type].num_queues = vport->num_tx_complq; - } - - args.ops = enable ? VIRTCHNL2_OP_ENABLE_QUEUES : - VIRTCHNL2_OP_DISABLE_QUEUES; - args.in_args = (uint8_t *)queue_select; - args.in_args_size = len; - args.out_buffer = adapter->mbx_resp; - args.out_size = IDPF_DFLT_MBX_BUF_SIZE; - err = idpf_vc_cmd_execute(adapter, &args); - if (err != 0) - DRV_LOG(ERR, "Failed to execute command of VIRTCHNL2_OP_%s_QUEUES", - enable ? "ENABLE" : "DISABLE"); - - rte_free(queue_select); - return err; -} - RTE_EXPORT_INTERNAL_SYMBOL(idpf_vc_vport_ena_dis) int idpf_vc_vport_ena_dis(struct idpf_vport *vport, bool enable) diff --git a/drivers/net/intel/idpf/idpf_common_virtchnl.h b/drivers/net/intel/idpf/idpf_common_virtchnl.h index a8c693240a..c683c0dd2b 100644 --- a/drivers/net/intel/idpf/idpf_common_virtchnl.h +++ b/drivers/net/intel/idpf/idpf_common_virtchnl.h @@ -27,7 +27,6 @@ int idpf_vc_cmd_execute(struct idpf_adapter *adapter, __rte_internal int idpf_vc_queue_switch(struct idpf_vport *vport, uint16_t qid, bool rx, bool on, uint32_t type); -int idpf_vc_queues_ena_dis(struct idpf_vport *vport, bool enable); __rte_internal int idpf_vc_vport_ena_dis(struct idpf_vport *vport, bool enable); __rte_internal -- 2.53.0

