Lines Matching refs:cfg

14  * @cfg: defining a full Key Generation profile (rule)
23 int dpni_prepare_key_cfg(const struct dpkg_profile_cfg *cfg, u8 *key_cfg_buf)
29 if (cfg->num_extracts > DPKG_MAX_NUM_OF_EXTRACTS)
33 dpni_ext->num_extracts = cfg->num_extracts;
35 for (i = 0; i < cfg->num_extracts; i++) {
38 switch (cfg->extracts[i].type) {
40 extr->prot = cfg->extracts[i].extract.from_hdr.prot;
42 cfg->extracts[i].extract.from_hdr.type);
43 extr->size = cfg->extracts[i].extract.from_hdr.size;
44 extr->offset = cfg->extracts[i].extract.from_hdr.offset;
46 cfg->extracts[i].extract.from_hdr.field);
48 cfg->extracts[i].extract.from_hdr.hdr_index;
51 extr->size = cfg->extracts[i].extract.from_data.size;
53 cfg->extracts[i].extract.from_data.offset;
56 extr->size = cfg->extracts[i].extract.from_parse.size;
58 cfg->extracts[i].extract.from_parse.offset;
64 extr->num_of_byte_masks = cfg->extracts[i].num_of_byte_masks;
66 cfg->extracts[i].type);
69 extr->masks[j].mask = cfg->extracts[i].masks[j].mask;
71 cfg->extracts[i].masks[j].offset;
154 * @cfg: Buffer pools configuration
164 const struct dpni_pools_cfg *cfg)
175 cmd_params->num_dpbp = cfg->num_dpbp;
176 cmd_params->pool_options = cfg->pool_options;
179 cpu_to_le16(cfg->pools[i].dpbp_id);
181 cfg->pools[i].priority_mask;
183 cpu_to_le16(cfg->pools[i].buffer_size);
185 DPNI_BACKUP_POOL(cfg->pools[i].backup_pool, i);
579 * @cfg: Errors configuration
589 struct dpni_error_cfg *cfg)
599 cmd_params->errors = cpu_to_le32(cfg->errors);
600 dpni_set_field(cmd_params->flags, ERROR_ACTION, cfg->error_action);
601 dpni_set_field(cmd_params->flags, FRAME_ANN, cfg->set_frame_annotation);
838 * @cfg: Link configuration
845 const struct dpni_link_cfg *cfg)
855 cmd_params->rate = cpu_to_le32(cfg->rate);
856 cmd_params->options = cpu_to_le64(cfg->options);
867 * @cfg: Link configuration from dpni object
874 struct dpni_link_cfg *cfg)
892 cfg->rate = le32_to_cpu(rsp_params->rate);
893 cfg->options = le64_to_cpu(rsp_params->options);
1425 * @cfg: Traffic class distribution configuration
1436 const struct dpni_rx_tc_dist_cfg *cfg)
1446 cmd_params->dist_size = cpu_to_le16(cfg->dist_size);
1448 dpni_set_field(cmd_params->flags, DIST_MODE, cfg->dist_mode);
1449 dpni_set_field(cmd_params->flags, MISS_ACTION, cfg->fs_cfg.miss_action);
1450 cmd_params->default_flow_id = cpu_to_le16(cfg->fs_cfg.default_flow_id);
1451 cmd_params->key_cfg_iova = cpu_to_le64(cfg->key_cfg_iova);
1465 * @cfg: Congestion notification configuration
1475 const struct dpni_congestion_notification_cfg *cfg)
1488 cmd_params->dest_id = cpu_to_le32(cfg->dest_cfg.dest_id);
1489 cmd_params->notification_mode = cpu_to_le16(cfg->notification_mode);
1490 cmd_params->dest_priority = cfg->dest_cfg.priority;
1492 cfg->dest_cfg.dest_type);
1493 dpni_set_field(cmd_params->type_units, CONG_UNITS, cfg->units);
1494 cmd_params->message_iova = cpu_to_le64(cfg->message_iova);
1495 cmd_params->message_ctx = cpu_to_le64(cfg->message_ctx);
1496 cmd_params->threshold_entry = cpu_to_le32(cfg->threshold_entry);
1497 cmd_params->threshold_exit = cpu_to_le32(cfg->threshold_exit);
1789 * @cfg: Distribution configuration
1795 * If cfg.enable is set to 1 the command will create a flow steering table
1799 * If cfg.enable is set to 0 the command will clear flow steering table.
1808 const struct dpni_rx_dist_cfg *cfg)
1818 cmd_params->dist_size = cpu_to_le16(cfg->dist_size);
1819 dpni_set_field(cmd_params->enable, RX_FS_DIST_ENABLE, cfg->enable);
1820 cmd_params->tc = cfg->tc;
1821 cmd_params->miss_flow_id = cpu_to_le16(cfg->fs_miss_flow_id);
1822 cmd_params->key_cfg_iova = cpu_to_le64(cfg->key_cfg_iova);
1833 * @cfg: Distribution configuration
1834 * If cfg.enable is set to 1 the packets will be classified using a hash
1835 * function based on the key received in cfg.key_cfg_iova parameter.
1836 * If cfg.enable is set to 0 the packets will be sent to the default queue
1843 const struct dpni_rx_dist_cfg *cfg)
1853 cmd_params->dist_size = cpu_to_le16(cfg->dist_size);
1854 dpni_set_field(cmd_params->enable, RX_HASH_DIST_ENABLE, cfg->enable);
1855 cmd_params->tc = cfg->tc;
1856 cmd_params->key_cfg_iova = cpu_to_le64(cfg->key_cfg_iova);
1872 * @cfg: Flow steering rule to add
1882 const struct dpni_rule_cfg *cfg,
1894 cmd_params->key_size = cfg->key_size;
1896 cmd_params->key_iova = cpu_to_le64(cfg->key_iova);
1897 cmd_params->mask_iova = cpu_to_le64(cfg->mask_iova);
1913 * @cfg: Flow steering rule to remove
1921 const struct dpni_rule_cfg *cfg)
1932 cmd_params->key_size = cfg->key_size;
1933 cmd_params->key_iova = cpu_to_le64(cfg->key_iova);
1934 cmd_params->mask_iova = cpu_to_le64(cfg->mask_iova);
1945 * @cfg: QoS table configuration
1958 const struct dpni_qos_tbl_cfg *cfg)
1968 cmd_params->default_tc = cfg->default_tc;
1969 cmd_params->key_cfg_iova = cpu_to_le64(cfg->key_cfg_iova);
1971 cfg->discard_on_miss);
1982 * @cfg: QoS rule to add
1993 const struct dpni_rule_cfg *cfg,
2006 cmd_params->key_size = cfg->key_size;
2008 cmd_params->key_iova = cpu_to_le64(cfg->key_iova);
2009 cmd_params->mask_iova = cpu_to_le64(cfg->mask_iova);
2020 * @cfg: QoS rule to remove
2027 const struct dpni_rule_cfg *cfg)
2037 cmd_params->key_size = cfg->key_size;
2038 cmd_params->key_iova = cpu_to_le64(cfg->key_iova);
2039 cmd_params->mask_iova = cpu_to_le64(cfg->mask_iova);