Lines Matching full:sgi
715 struct enetc_psfp_gate *sgi, in enetc_streamgate_hw_set() argument
728 cbd.index = cpu_to_le16(sgi->index); in enetc_streamgate_hw_set()
737 if (!sgi->num_entries) in enetc_streamgate_hw_set()
740 if (sgi->num_entries > priv->psfp_cap.max_psfp_gatelist || in enetc_streamgate_hw_set()
741 !sgi->cycletime) in enetc_streamgate_hw_set()
750 sgi_config->oipv = (sgi->init_ipv < 0) ? in enetc_streamgate_hw_set()
751 0x0 : ((sgi->init_ipv & 0x7) | 0x8); in enetc_streamgate_hw_set()
762 cbd.index = cpu_to_le16(sgi->index); in enetc_streamgate_hw_set()
769 sgcl_config->acl_len = (sgi->num_entries - 1) & 0x3; in enetc_streamgate_hw_set()
771 data_size = struct_size(sgcl_data, sgcl, sgi->num_entries); in enetc_streamgate_hw_set()
795 sgcl_data->ct = cpu_to_le32(sgi->cycletime); in enetc_streamgate_hw_set()
796 sgcl_data->cte = cpu_to_le32(sgi->cycletimext); in enetc_streamgate_hw_set()
798 if (sgi->init_ipv >= 0) in enetc_streamgate_hw_set()
799 sgcl_config->aipv = (sgi->init_ipv & 0x7) | 0x8; in enetc_streamgate_hw_set()
801 for (i = 0; i < sgi->num_entries; i++) { in enetc_streamgate_hw_set()
802 struct action_gate_entry *from = &sgi->entries[i]; in enetc_streamgate_hw_set()
824 if (sgi->basetime < now) { in enetc_streamgate_hw_set()
827 err = get_start_ns(now, sgi->cycletime, &start); in enetc_streamgate_hw_set()
835 hi = upper_32_bits(sgi->basetime); in enetc_streamgate_hw_set()
836 lo = lower_32_bits(sgi->basetime); in enetc_streamgate_hw_set()
980 struct enetc_psfp_gate *sgi; in stream_gate_unref() local
983 sgi = enetc_get_gate_by_index(index); in stream_gate_unref()
984 WARN_ON(!sgi); in stream_gate_unref()
985 z = refcount_dec_and_test(&sgi->refcount); in stream_gate_unref()
987 enetc_streamgate_hw_set(priv, sgi, false); in stream_gate_unref()
988 hlist_del(&sgi->node); in stream_gate_unref()
989 kfree(sgi); in stream_gate_unref()
1024 struct enetc_psfp_gate *sgi, in enetc_psfp_hw_set() argument
1039 err = enetc_streamgate_hw_set(priv, sgi, true); in enetc_psfp_hw_set()
1052 enetc_streamgate_hw_set(priv, sgi, false); in enetc_psfp_hw_set()
1083 struct enetc_psfp_gate *sgi, *old_sgi; in enetc_psfp_parse_clsflower() local
1194 entries_size = struct_size(sgi, entries, entryg->gate.num_entries); in enetc_psfp_parse_clsflower()
1195 sgi = kzalloc(entries_size, GFP_KERNEL); in enetc_psfp_parse_clsflower()
1196 if (!sgi) { in enetc_psfp_parse_clsflower()
1201 refcount_set(&sgi->refcount, 1); in enetc_psfp_parse_clsflower()
1202 sgi->index = entryg->gate.index; in enetc_psfp_parse_clsflower()
1203 sgi->init_ipv = entryg->gate.prio; in enetc_psfp_parse_clsflower()
1204 sgi->basetime = entryg->gate.basetime; in enetc_psfp_parse_clsflower()
1205 sgi->cycletime = entryg->gate.cycletime; in enetc_psfp_parse_clsflower()
1206 sgi->num_entries = entryg->gate.num_entries; in enetc_psfp_parse_clsflower()
1208 e = sgi->entries; in enetc_psfp_parse_clsflower()
1216 filter->sgi_index = sgi->index; in enetc_psfp_parse_clsflower()
1225 sfi->gate_id = sgi->index; in enetc_psfp_parse_clsflower()
1279 sfi_overwrite ? NULL : sfi, sgi, fmi); in enetc_psfp_parse_clsflower()
1299 refcount_set(&sgi->refcount, in enetc_psfp_parse_clsflower()
1305 hlist_add_head(&sgi->node, &epsfp.psfp_gate_list); in enetc_psfp_parse_clsflower()
1331 kfree(sgi); in enetc_psfp_parse_clsflower()
1489 struct enetc_psfp_gate *sgi; in clean_sgi_list() local
1492 hlist_for_each_entry_safe(sgi, tmp, &epsfp.psfp_gate_list, node) { in clean_sgi_list()
1493 hlist_del(&sgi->node); in clean_sgi_list()
1494 kfree(sgi); in clean_sgi_list()