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

Function ena_com_set_llq

dpdk/drivers/net/ena/base/ena_com.c:620–653  ·  view source on GitHub ↗

* Set the LLQ configurations of the firmware * * The driver provides only the enabled feature values to the device, * which in turn, checks if they are supported. */

Source from the content-addressed store, hash-verified

618 * which in turn, checks if they are supported.
619 */
620static int ena_com_set_llq(struct ena_com_dev *ena_dev)
621{
622 struct ena_com_admin_queue *admin_queue;
623 struct ena_admin_set_feat_cmd cmd;
624 struct ena_admin_set_feat_resp resp;
625 struct ena_com_llq_info *llq_info = &ena_dev->llq_info;
626 int ret;
627
628 memset(&cmd, 0x0, sizeof(cmd));
629 admin_queue = &ena_dev->admin_queue;
630
631 cmd.aq_common_descriptor.opcode = ENA_ADMIN_SET_FEATURE;
632 cmd.feat_common.feature_id = ENA_ADMIN_LLQ;
633
634 cmd.u.llq.header_location_ctrl_enabled = llq_info->header_location_ctrl;
635 cmd.u.llq.entry_size_ctrl_enabled = llq_info->desc_list_entry_size_ctrl;
636 cmd.u.llq.desc_num_before_header_enabled = llq_info->descs_num_before_header;
637 cmd.u.llq.descriptors_stride_ctrl_enabled = llq_info->desc_stride_ctrl;
638
639 cmd.u.llq.accel_mode.u.set.enabled_flags =
640 BIT(ENA_ADMIN_DISABLE_META_CACHING) |
641 BIT(ENA_ADMIN_LIMIT_TX_BURST);
642
643 ret = ena_com_execute_admin_command(admin_queue,
644 (struct ena_admin_aq_entry *)&cmd,
645 sizeof(cmd),
646 (struct ena_admin_acq_entry *)&resp,
647 sizeof(resp));
648
649 if (unlikely(ret))
650 ena_trc_err(ena_dev, "Failed to set LLQ configurations: %d\n", ret);
651
652 return ret;
653}
654
655static int ena_com_config_llq_info(struct ena_com_dev *ena_dev,
656 struct ena_admin_feature_llq_desc *llq_features,

Callers 1

ena_com_config_llq_infoFunction · 0.70

Calls 2

memsetFunction · 0.85

Tested by

no test coverage detected