Home
last modified time | relevance | path

Searched refs:index (Results 1 – 25 of 92) sorted by relevance

1234

/net/dsa/
Ddsa2.c69 struct dsa_switch *ds, u32 index) in dsa_dst_add_ds() argument
72 dst->ds[index] = ds; in dsa_dst_add_ds()
76 struct dsa_switch *ds, u32 index) in dsa_dst_del_ds() argument
78 dst->ds[index] = NULL; in dsa_dst_del_ds()
113 u32 index; in dsa_ds_find_port() local
115 for (index = 0; index < DSA_MAX_PORTS; index++) in dsa_ds_find_port()
116 if (ds->ports[index].dn == port) in dsa_ds_find_port()
125 u32 index; in dsa_dst_find_port() local
127 for (index = 0; index < DSA_MAX_SWITCHES; index++) { in dsa_dst_find_port()
128 ds = dst->ds[index]; in dsa_dst_find_port()
[all …]
Ddsa.c186 struct attribute *attr, int index) in dsa_hwmon_attrs_visible() argument
193 if (index == 1) { in dsa_hwmon_attrs_visible()
198 } else if (index == 2 && !ops->get_temp_alarm) { in dsa_hwmon_attrs_visible()
315 int index = ds->index; in dsa_switch_setup_one() local
335 dst->cpu_switch = index; in dsa_switch_setup_one()
361 if (dst->cpu_switch == index) { in dsa_switch_setup_one()
414 index, i, cd->port_names[i], ret); in dsa_switch_setup_one()
423 index); in dsa_switch_setup_one()
448 hname, index); in dsa_switch_setup_one()
463 dsa_switch_setup(struct dsa_switch_tree *dst, int index, in dsa_switch_setup() argument
[all …]
/net/netfilter/
Dxt_set.c33 match_set(ip_set_id_t index, const struct sk_buff *skb, in match_set() argument
37 if (ip_set_test(index, skb, par, opt)) in match_set()
61 return match_set(info->match_set.index, skb, par, &opt, in set_match_v0()
85 ip_set_id_t index; in set_match_v0_checkentry() local
87 index = ip_set_nfnl_get_byindex(par->net, info->match_set.index); in set_match_v0_checkentry()
89 if (index == IPSET_INVALID_ID) { in set_match_v0_checkentry()
91 info->match_set.index); in set_match_v0_checkentry()
96 ip_set_nfnl_put(par->net, info->match_set.index); in set_match_v0_checkentry()
111 ip_set_nfnl_put(par->net, info->match_set.index); in set_match_v0_destroy()
127 return match_set(info->match_set.index, skb, par, &opt, in set_match_v1()
[all …]
/net/dccp/ccids/lib/
Dtfrc_equation.c619 u16 index; in tfrc_calc_x() local
635 index = 0; in tfrc_calc_x()
637 index = p/TFRC_SMALLEST_P - 1; in tfrc_calc_x()
639 f = tfrc_calc_x_lookup[index][1]; in tfrc_calc_x()
642 index = p/(1000000/TFRC_CALC_X_ARRSIZE) - 1; in tfrc_calc_x()
644 f = tfrc_calc_x_lookup[index][0]; in tfrc_calc_x()
668 int index; in tfrc_calc_x_reverse_lookup() local
684 index = tfrc_binsearch(fvalue, 1); in tfrc_calc_x_reverse_lookup()
685 return (index + 1) * TFRC_CALC_X_SPLIT / TFRC_CALC_X_ARRSIZE; in tfrc_calc_x_reverse_lookup()
689 index = tfrc_binsearch(fvalue, 0); in tfrc_calc_x_reverse_lookup()
[all …]
/net/ncsi/
Dncsi-manage.c45 int index, size; in ncsi_find_filter() local
58 index = -1; in ncsi_find_filter()
59 while ((index = find_next_bit(bitmap, ncf->total, index + 1)) in ncsi_find_filter()
61 if (!memcmp(ncf->data + size * index, data, size)) { in ncsi_find_filter()
63 return index; in ncsi_find_filter()
74 int index, size; in ncsi_add_filter() local
82 index = ncsi_find_filter(nc, table, data); in ncsi_add_filter()
83 if (index >= 0) in ncsi_add_filter()
84 return index; in ncsi_add_filter()
93 index = find_next_zero_bit(bitmap, ncf->total, 0); in ncsi_add_filter()
[all …]
/net/mpls/
Daf_mpls.c40 static struct mpls_route *mpls_route_input_rcu(struct net *net, unsigned index) in mpls_route_input_rcu() argument
44 if (index < net->mpls.platform_labels) { in mpls_route_input_rcu()
47 rt = rcu_dereference(platform_label[index]); in mpls_route_input_rcu()
416 static void mpls_notify_route(struct net *net, unsigned index, in mpls_notify_route() argument
426 if (rt && (index >= MPLS_LABEL_FIRST_UNRESERVED)) in mpls_notify_route()
427 rtmsg_lfib(event, index, rt, nlh, net, portid, nlm_flags); in mpls_notify_route()
430 static void mpls_route_update(struct net *net, unsigned index, in mpls_route_update() argument
440 rt = rtnl_dereference(platform_label[index]); in mpls_route_update()
441 rcu_assign_pointer(platform_label[index], new); in mpls_route_update()
443 mpls_notify_route(net, index, rt, new, info); in mpls_route_update()
[all …]
/net/irda/
Dqos.c181 static inline __u32 index_value(int index, __u32 *array) in index_value() argument
183 return array[index]; in index_value()
195 int index = 15; /* Current MSB */ in msb_index() local
213 index--; in msb_index()
215 return index; in msb_index()
343 int index; in irlap_adjust_qos_settings() local
378 index = value_index(qos->data_size.value, data_sizes, 6); in irlap_adjust_qos_settings()
383 while ((qos->data_size.value > line_capacity) && (index > 0)) { in irlap_adjust_qos_settings()
384 qos->data_size.value = data_sizes[index--]; in irlap_adjust_qos_settings()
390 IRDA_ASSERT(index != 0, return;); in irlap_adjust_qos_settings()
[all …]
/net/bluetooth/
Dmgmt_util.c33 static struct sk_buff *create_monitor_ctrl_event(__le16 index, u32 cookie, in create_monitor_ctrl_event() argument
53 hdr->index = index; in create_monitor_ctrl_event()
72 hdr->index = cpu_to_le16(hdev->id); in mgmt_send_event()
74 hdr->index = cpu_to_le16(MGMT_INDEX_NONE); in mgmt_send_event()
93 int mgmt_cmd_status(struct sock *sk, u16 index, u16 cmd, u8 status) in mgmt_cmd_status() argument
100 BT_DBG("sock %p, index %u, cmd %u, status %u", sk, index, cmd, status); in mgmt_cmd_status()
109 hdr->index = cpu_to_le16(index); in mgmt_cmd_status()
116 mskb = create_monitor_ctrl_event(hdr->index, hci_sock_get_cookie(sk), in mgmt_cmd_status()
136 int mgmt_cmd_complete(struct sock *sk, u16 index, u16 cmd, u8 status, in mgmt_cmd_complete() argument
153 hdr->index = cpu_to_le16(index); in mgmt_cmd_complete()
[all …]
Dhci_sock.c337 hdr->index = cpu_to_le16(hdev->id); in hci_send_to_monitor()
350 __le16 index; in hci_send_monitor_ctrl_event() local
353 index = cpu_to_le16(hdev->id); in hci_send_monitor_ctrl_event()
355 index = cpu_to_le16(MGMT_INDEX_NONE); in hci_send_monitor_ctrl_event()
388 hdr->index = index; in hci_send_monitor_ctrl_event()
472 hdr->index = cpu_to_le16(hdev->id); in create_monitor_event()
528 hdr->index = cpu_to_le16(hci_pi(sk)->hdev->id); in create_monitor_ctrl_open()
530 hdr->index = cpu_to_le16(HCI_DEV_NONE); in create_monitor_ctrl_open()
566 hdr->index = cpu_to_le16(hci_pi(sk)->hdev->id); in create_monitor_ctrl_close()
568 hdr->index = cpu_to_le16(HCI_DEV_NONE); in create_monitor_ctrl_close()
[all …]
Dmgmt_util.h26 int index; member
36 int mgmt_cmd_status(struct sock *sk, u16 index, u16 cmd, u8 status);
37 int mgmt_cmd_complete(struct sock *sk, u16 index, u16 cmd, u8 status,
/net/batman-adv/
Dhash.h111 u32 index; in batadv_hash_add() local
120 index = choose(data, hash->size); in batadv_hash_add()
121 head = &hash->table[index]; in batadv_hash_add()
122 list_lock = &hash->list_locks[index]; in batadv_hash_add()
156 u32 index; in batadv_hash_remove() local
161 index = choose(data, hash->size); in batadv_hash_remove()
162 head = &hash->table[index]; in batadv_hash_remove()
164 spin_lock_bh(&hash->list_locks[index]); in batadv_hash_remove()
173 spin_unlock_bh(&hash->list_locks[index]); in batadv_hash_remove()
/net/mac80211/
Drc80211_minstrel_ht.c311 minstrel_get_ratestats(struct minstrel_ht_sta *mi, int index) in minstrel_get_ratestats() argument
313 return &mi->groups[index / MCS_GROUP_RATES].rates[index % MCS_GROUP_RATES]; in minstrel_get_ratestats()
355 minstrel_ht_sort_best_tp_rates(struct minstrel_ht_sta *mi, u16 index, in minstrel_ht_sort_best_tp_rates() argument
362 cur_group = index / MCS_GROUP_RATES; in minstrel_ht_sort_best_tp_rates()
363 cur_idx = index % MCS_GROUP_RATES; in minstrel_ht_sort_best_tp_rates()
384 tp_list[j] = index; in minstrel_ht_sort_best_tp_rates()
391 minstrel_ht_set_best_prob_rate(struct minstrel_ht_sta *mi, u16 index) in minstrel_ht_set_best_prob_rate() argument
400 cur_group = index / MCS_GROUP_RATES; in minstrel_ht_set_best_prob_rate()
401 cur_idx = index % MCS_GROUP_RATES; in minstrel_ht_set_best_prob_rate()
402 mg = &mi->groups[index / MCS_GROUP_RATES]; in minstrel_ht_set_best_prob_rate()
[all …]
/net/9p/
Dtrans_virtio.c186 int index = start; in pack_sg_list() local
192 BUG_ON(index > limit); in pack_sg_list()
194 sg_unmark_end(&sg[index]); in pack_sg_list()
195 sg_set_buf(&sg[index++], data, s); in pack_sg_list()
199 if (index-start) in pack_sg_list()
200 sg_mark_end(&sg[index - 1]); in pack_sg_list()
201 return index-start; in pack_sg_list()
226 int index = start; in pack_sg_list_p() local
238 sg_unmark_end(&sg[index]); in pack_sg_list_p()
239 sg_set_page(&sg[index++], pdata[i++], s, data_off); in pack_sg_list_p()
[all …]
/net/sched/
Dem_ipset.c26 ip_set_id_t index; in em_ipset_change() local
31 index = ip_set_nfnl_get_byindex(net, set->index); in em_ipset_change()
32 if (index == IPSET_INVALID_ID) in em_ipset_change()
40 ip_set_nfnl_put(net, index); in em_ipset_change()
48 ip_set_nfnl_put(em->net, set->index); in em_ipset_destroy()
102 ret = ip_set_test(set->index, skb, &acpar, &opt); in em_ipset_match()
Dsch_qfq.c175 unsigned int index; /* Group index. */ member
243 int index = 0; in qfq_calc_index() local
249 index = __fls(size_map) + 1; /* basically a log_2 */ in qfq_calc_index()
250 index -= !(slot_size - (1ULL << (index + min_slot_shift - 1))); in qfq_calc_index()
252 if (index < 0) in qfq_calc_index()
253 index = 0; in qfq_calc_index()
256 (unsigned long) ONE_FP/inv_w, maxlen, index); in qfq_calc_index()
258 return index; in qfq_calc_index()
756 int index = __ffs(bitmap); in qfq_ffs() local
757 return &q->groups[index]; in qfq_ffs()
[all …]
Dsch_dsmark.c54 static inline int dsmark_valid_index(struct dsmark_qdisc_data *p, u16 index) in dsmark_valid_index() argument
56 return index <= p->indices && index > 0; in dsmark_valid_index()
282 u32 index; in dsmark_dequeue() local
294 index = skb->tc_index & (p->indices - 1); in dsmark_dequeue()
295 pr_debug("index %d->%d\n", skb->tc_index, index); in dsmark_dequeue()
299 ipv4_change_dsfield(ip_hdr(skb), p->mv[index].mask, in dsmark_dequeue()
300 p->mv[index].value); in dsmark_dequeue()
303 ipv6_change_dsfield(ipv6_hdr(skb), p->mv[index].mask, in dsmark_dequeue()
304 p->mv[index].value); in dsmark_dequeue()
312 if (p->mv[index].mask != 0xff || p->mv[index].value) in dsmark_dequeue()
Dact_api.c79 int err = 0, index = -1, i = 0, s_i = 0, n_i = 0; in tcf_dump_walker() local
93 index++; in tcf_dump_walker()
94 if (index < s_i) in tcf_dump_walker()
99 index--; in tcf_dump_walker()
104 index--; in tcf_dump_walker()
179 static struct tc_action *tcf_hash_lookup(u32 index, struct tcf_hashinfo *hinfo) in tcf_hash_lookup() argument
185 head = &hinfo->htab[tcf_hash(index, hinfo->hmask)]; in tcf_hash_lookup()
187 if (p->tcfa_index == index) in tcf_hash_lookup()
197 u32 val = hinfo->index; in tcf_hash_new_index()
204 hinfo->index = val; in tcf_hash_new_index()
[all …]
Dact_ipt.c107 u32 index = 0; in __tcf_ipt_init() local
117 index = nla_get_u32(tb[TCA_IPT_INDEX]); in __tcf_ipt_init()
119 exists = tcf_hash_check(tn, index, a, bind); in __tcf_ipt_init()
137 ret = tcf_hash_create(tn, index, est, a, ops, bind, in __tcf_ipt_init()
313 static int tcf_ipt_search(struct net *net, struct tc_action **a, u32 index) in tcf_ipt_search() argument
317 return tcf_hash_search(tn, a, index); in tcf_ipt_search()
363 static int tcf_xt_search(struct net *net, struct tc_action **a, u32 index) in tcf_xt_search() argument
367 return tcf_hash_search(tn, a, index); in tcf_xt_search()
Dact_connmark.c121 if (!tcf_hash_check(tn, parm->index, a, bind)) { in tcf_connmark_init()
122 ret = tcf_hash_create(tn, parm->index, est, a, in tcf_connmark_init()
156 .index = ci->tcf_index, in tcf_connmark_dump()
187 static int tcf_connmark_search(struct net *net, struct tc_action **a, u32 index) in tcf_connmark_search() argument
191 return tcf_hash_search(tn, a, index); in tcf_connmark_search()
Dact_simple.c105 exists = tcf_hash_check(tn, parm->index, a, bind); in tcf_simp_init()
118 ret = tcf_hash_create(tn, parm->index, est, a, in tcf_simp_init()
152 .index = d->tcf_index, in tcf_simp_dump()
182 static int tcf_simp_search(struct net *net, struct tc_action **a, u32 index) in tcf_simp_search() argument
186 return tcf_hash_search(tn, a, index); in tcf_simp_search()
/net/netfilter/ipset/
Dip_set_core.c527 ip_set_rcu_get(struct net *net, ip_set_id_t index) in ip_set_rcu_get() argument
534 set = rcu_dereference(inst->ip_set_list)[index]; in ip_set_rcu_get()
541 ip_set_test(ip_set_id_t index, const struct sk_buff *skb, in ip_set_test() argument
544 struct ip_set *set = ip_set_rcu_get(par->net, index); in ip_set_test()
548 pr_debug("set %s, index %u\n", set->name, index); in ip_set_test()
579 ip_set_add(ip_set_id_t index, const struct sk_buff *skb, in ip_set_add() argument
582 struct ip_set *set = ip_set_rcu_get(par->net, index); in ip_set_add()
586 pr_debug("set %s, index %u\n", set->name, index); in ip_set_add()
601 ip_set_del(ip_set_id_t index, const struct sk_buff *skb, in ip_set_del() argument
604 struct ip_set *set = ip_set_rcu_get(par->net, index); in ip_set_del()
[all …]
/net/ipv6/
Dxfrm6_tunnel.c119 int index = xfrm6_tunnel_spi_hash_byspi(spi); in __xfrm6_tunnel_spi_check() local
122 &xfrm6_tn->spi_byspi[index], in __xfrm6_tunnel_spi_check()
127 return index; in __xfrm6_tunnel_spi_check()
135 int index; in __xfrm6_tunnel_alloc_spi() local
144 index = __xfrm6_tunnel_spi_check(net, spi); in __xfrm6_tunnel_alloc_spi()
145 if (index >= 0) in __xfrm6_tunnel_alloc_spi()
149 index = __xfrm6_tunnel_spi_check(net, spi); in __xfrm6_tunnel_alloc_spi()
150 if (index >= 0) in __xfrm6_tunnel_alloc_spi()
165 hlist_add_head_rcu(&x6spi->list_byspi, &xfrm6_tn->spi_byspi[index]); in __xfrm6_tunnel_alloc_spi()
167 index = xfrm6_tunnel_spi_hash_byaddr(saddr); in __xfrm6_tunnel_alloc_spi()
[all …]
/net/bridge/
Dbr_if.c325 int index; in find_portno() local
338 index = find_first_zero_bit(inuse, BR_MAX_PORTS); in find_portno()
341 return (index >= BR_MAX_PORTS) ? -EXFULL : index; in find_portno()
349 int index, err; in new_nbp() local
351 index = find_portno(br); in new_nbp()
352 if (index < 0) in new_nbp()
353 return ERR_PTR(index); in new_nbp()
364 p->port_no = index; in new_nbp()
/net/irda/irnet/
Dirnet_irda.c59 int index; /* In the log */ in irnet_post_event() local
71 index = irnet_events.index; in irnet_post_event()
72 irnet_events.log[index].event = event; in irnet_post_event()
73 irnet_events.log[index].daddr = daddr; in irnet_post_event()
74 irnet_events.log[index].saddr = saddr; in irnet_post_event()
77 strcpy(irnet_events.log[index].name, name); in irnet_post_event()
79 irnet_events.log[index].name[0] = '\0'; in irnet_post_event()
81 irnet_events.log[index].hints.word = hints; in irnet_post_event()
84 irnet_events.log[index].unit = ppp_unit_number(&ap->chan); in irnet_post_event()
86 irnet_events.log[index].unit = -1; in irnet_post_event()
[all …]
/net/core/
Ddevlink.c94 if (devlink_port->index == port_index) in devlink_port_get_by_index()
128 unsigned int index; member
147 if (devlink_sb->index == sb_index) in devlink_sb_get_by_index()
426 if (nla_put_u32(msg, DEVLINK_ATTR_PORT_INDEX, devlink_port->index)) in devlink_nl_port_fill()
698 if (nla_put_u32(msg, DEVLINK_ATTR_SB_INDEX, devlink_sb->index)) in devlink_nl_sb_fill()
790 err = devlink->ops->sb_pool_get(devlink, devlink_sb->index, in devlink_nl_sb_pool_fill()
801 if (nla_put_u32(msg, DEVLINK_ATTR_SB_INDEX, devlink_sb->index)) in devlink_nl_sb_pool_fill()
945 return devlink_sb_pool_set(devlink, devlink_sb->index, in devlink_nl_cmd_sb_pool_set_doit()
962 err = ops->sb_port_pool_get(devlink_port, devlink_sb->index, in devlink_nl_sb_port_pool_fill()
973 if (nla_put_u32(msg, DEVLINK_ATTR_PORT_INDEX, devlink_port->index)) in devlink_nl_sb_port_pool_fill()
[all …]

1234