Lines Matching refs:sgi

683 				   struct enetc_psfp_gate *sgi,  in enetc_streamgate_hw_set()  argument
697 cbd.index = cpu_to_le16(sgi->index); in enetc_streamgate_hw_set()
706 if (!sgi->num_entries) in enetc_streamgate_hw_set()
709 if (sgi->num_entries > priv->psfp_cap.max_psfp_gatelist || in enetc_streamgate_hw_set()
710 !sgi->cycletime) in enetc_streamgate_hw_set()
719 sgi_config->oipv = (sgi->init_ipv < 0) ? in enetc_streamgate_hw_set()
720 0x0 : ((sgi->init_ipv & 0x7) | 0x8); in enetc_streamgate_hw_set()
731 cbd.index = cpu_to_le16(sgi->index); in enetc_streamgate_hw_set()
738 sgcl_config->acl_len = (sgi->num_entries - 1) & 0x3; in enetc_streamgate_hw_set()
740 data_size = struct_size(sgcl_data, sgcl, sgi->num_entries); in enetc_streamgate_hw_set()
750 sgcl_data->ct = sgi->cycletime; in enetc_streamgate_hw_set()
751 sgcl_data->cte = sgi->cycletimext; in enetc_streamgate_hw_set()
753 if (sgi->init_ipv >= 0) in enetc_streamgate_hw_set()
754 sgcl_config->aipv = (sgi->init_ipv & 0x7) | 0x8; in enetc_streamgate_hw_set()
756 for (i = 0; i < sgi->num_entries; i++) { in enetc_streamgate_hw_set()
757 struct action_gate_entry *from = &sgi->entries[i]; in enetc_streamgate_hw_set()
779 if (sgi->basetime < now) { in enetc_streamgate_hw_set()
782 err = get_start_ns(now, sgi->cycletime, &start); in enetc_streamgate_hw_set()
790 hi = upper_32_bits(sgi->basetime); in enetc_streamgate_hw_set()
791 lo = lower_32_bits(sgi->basetime); in enetc_streamgate_hw_set()
934 struct enetc_psfp_gate *sgi; in stream_gate_unref() local
937 sgi = enetc_get_gate_by_index(index); in stream_gate_unref()
938 WARN_ON(!sgi); in stream_gate_unref()
939 z = refcount_dec_and_test(&sgi->refcount); in stream_gate_unref()
941 enetc_streamgate_hw_set(priv, sgi, false); in stream_gate_unref()
942 hlist_del(&sgi->node); in stream_gate_unref()
943 kfree(sgi); in stream_gate_unref()
978 struct enetc_psfp_gate *sgi, in enetc_psfp_hw_set() argument
993 err = enetc_streamgate_hw_set(priv, sgi, true); in enetc_psfp_hw_set()
1006 enetc_streamgate_hw_set(priv, sgi, false); in enetc_psfp_hw_set()
1077 struct enetc_psfp_gate *sgi, *old_sgi; in enetc_psfp_parse_clsflower() local
1188 entries_size = struct_size(sgi, entries, entryg->gate.num_entries); in enetc_psfp_parse_clsflower()
1189 sgi = kzalloc(entries_size, GFP_KERNEL); in enetc_psfp_parse_clsflower()
1190 if (!sgi) { in enetc_psfp_parse_clsflower()
1195 refcount_set(&sgi->refcount, 1); in enetc_psfp_parse_clsflower()
1196 sgi->index = entryg->hw_index; in enetc_psfp_parse_clsflower()
1197 sgi->init_ipv = entryg->gate.prio; in enetc_psfp_parse_clsflower()
1198 sgi->basetime = entryg->gate.basetime; in enetc_psfp_parse_clsflower()
1199 sgi->cycletime = entryg->gate.cycletime; in enetc_psfp_parse_clsflower()
1200 sgi->num_entries = entryg->gate.num_entries; in enetc_psfp_parse_clsflower()
1202 e = sgi->entries; in enetc_psfp_parse_clsflower()
1210 filter->sgi_index = sgi->index; in enetc_psfp_parse_clsflower()
1219 sfi->gate_id = sgi->index; in enetc_psfp_parse_clsflower()
1277 sfi_overwrite ? NULL : sfi, sgi, fmi); in enetc_psfp_parse_clsflower()
1297 refcount_set(&sgi->refcount, in enetc_psfp_parse_clsflower()
1303 hlist_add_head(&sgi->node, &epsfp.psfp_gate_list); in enetc_psfp_parse_clsflower()
1329 kfree(sgi); in enetc_psfp_parse_clsflower()
1487 struct enetc_psfp_gate *sgi; in clean_sgi_list() local
1490 hlist_for_each_entry_safe(sgi, tmp, &epsfp.psfp_gate_list, node) { in clean_sgi_list()
1491 hlist_del(&sgi->node); in clean_sgi_list()
1492 kfree(sgi); in clean_sgi_list()