Home
last modified time | relevance | path

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

123456

/net/netfilter/
Dxt_set.c29 match_set(ip_set_id_t index, const struct sk_buff *skb, in match_set() argument
33 if (ip_set_test(index, skb, par, opt)) in match_set()
62 return match_set(info->match_set.index, skb, par, &opt, in set_match_v0()
86 ip_set_id_t index; in set_match_v0_checkentry() local
88 index = ip_set_nfnl_get_byindex(par->net, info->match_set.index); in set_match_v0_checkentry()
90 if (index == IPSET_INVALID_ID) { in set_match_v0_checkentry()
92 info->match_set.index); in set_match_v0_checkentry()
97 ip_set_nfnl_put(par->net, info->match_set.index); in set_match_v0_checkentry()
112 ip_set_nfnl_put(par->net, info->match_set.index); in set_match_v0_destroy()
129 return match_set(info->match_set.index, skb, par, &opt, in set_match_v1()
[all …]
Dnf_queue.c159 unsigned int index, unsigned int queuenum) in __nf_queue() argument
207 .hook_index = index, in __nf_queue()
238 unsigned int index, unsigned int verdict) in nf_queue() argument
242 ret = __nf_queue(skb, state, index, verdict >> NF_VERDICT_QBITS); in nf_queue()
257 unsigned int *index) in nf_iterate() argument
260 unsigned int verdict, i = *index; in nf_iterate()
267 *index = i; in nf_iterate()
275 *index = i; in nf_iterate()
/net/dsa/
Dport.c58 ds->ops->port_fast_age(ds, dp->index); in dsa_port_fast_age()
74 err = ds->ops->port_pre_bridge_flags(ds, dp->index, flags, NULL); in dsa_port_can_configure_learning()
90 err = ds->ops->port_hwtstamp_get(ds, dp->index, ifr); in dsa_port_supports_hwtstamp()
97 int port = dp->index; in dsa_port_set_state()
136 dp->index, state, ERR_PTR(err)); in dsa_port_set_state_now()
143 int port = dp->index; in dsa_port_enable_rt()
175 int port = dp->index; in dsa_port_disable_rt()
309 ds->ops->port_bridge_tx_fwd_unoffload(ds, dp->index, bridge_dev, in dsa_port_bridge_tx_fwd_unoffload()
330 err = ds->ops->port_bridge_tx_fwd_offload(ds, dp->index, bridge_dev, in dsa_port_bridge_tx_fwd_offload()
344 .tree_index = dp->ds->dst->index, in dsa_port_bridge_join()
[all …]
Ddsa2.c183 if (dst->index != tree_index) in dsa_switch_find()
187 if (dp->ds->index != sw_index) in dsa_switch_find()
198 static struct dsa_switch_tree *dsa_tree_find(int index) in dsa_tree_find() argument
203 if (dst->index == index) in dsa_tree_find()
209 static struct dsa_switch_tree *dsa_tree_alloc(int index) in dsa_tree_alloc() argument
217 dst->index = index; in dsa_tree_alloc()
247 static struct dsa_switch_tree *dsa_tree_touch(int index) in dsa_tree_touch() argument
251 dst = dsa_tree_find(index); in dsa_tree_touch()
255 return dsa_tree_alloc(index); in dsa_tree_touch()
374 pr_err("DSA: tree %d has no CPU port\n", dst->index); in dsa_tree_setup_default_cpu()
[all …]
Dswitch.c55 if (ds->index == info->sw_index && port == info->port) in dsa_switch_mtu_match()
95 if (dst->index == info->tree_index && ds->index == info->sw_index) { in dsa_switch_bridge_join()
104 if ((dst->index != info->tree_index || ds->index != info->sw_index) && in dsa_switch_bridge_join()
125 if (dst->index == info->tree_index && ds->index == info->sw_index && in dsa_switch_bridge_leave()
129 if ((dst->index != info->tree_index || ds->index != info->sw_index) && in dsa_switch_bridge_leave()
188 targeted_ds = dsa_switch_find(ds->dst->index, info_sw_index); in dsa_switch_host_address_match()
193 return port == dsa_towards_port(ds, cpu_dp->ds->index, in dsa_switch_host_address_match()
194 cpu_dp->index); in dsa_switch_host_address_match()
411 if (ds->index == info->sw_index && ds->ops->port_hsr_join) in dsa_switch_hsr_join()
420 if (ds->index == info->sw_index && ds->ops->port_hsr_leave) in dsa_switch_hsr_leave()
[all …]
Dslave.c54 ds->dst->index, ds->index); in dsa_slave_mii_bus_init()
257 int port = p->dp->index; in dsa_slave_ioctl()
532 ppid->id_len = sizeof(dst->index); in dsa_slave_get_port_parent_id()
533 memcpy(&ppid->id, &dst->index, ppid->id_len); in dsa_slave_get_port_parent_id()
562 ds->ops->port_txtstamp(ds, p->dp->index, skb); in dsa_skb_tx_timestamp()
658 return ds->ops->get_regs_len(ds, dp->index); in dsa_slave_get_regs_len()
670 ds->ops->get_regs(ds, dp->index, regs, _p); in dsa_slave_get_regs()
732 ds->ops->get_strings(ds, dp->index, stringset, in dsa_slave_get_strings()
767 ds->ops->get_ethtool_stats(ds, dp->index, data + 4); in dsa_slave_get_ethtool_stats()
779 count = ds->ops->get_sset_count(ds, dp->index, sset); in dsa_slave_get_sset_count()
[all …]
/net/dccp/ccids/lib/
Dtfrc_equation.c615 u16 index; in tfrc_calc_x() local
631 index = 0; in tfrc_calc_x()
633 index = p/TFRC_SMALLEST_P - 1; in tfrc_calc_x()
635 f = tfrc_calc_x_lookup[index][1]; in tfrc_calc_x()
638 index = p/(1000000/TFRC_CALC_X_ARRSIZE) - 1; in tfrc_calc_x()
640 f = tfrc_calc_x_lookup[index][0]; in tfrc_calc_x()
664 int index; in tfrc_calc_x_reverse_lookup() local
680 index = tfrc_binsearch(fvalue, 1); in tfrc_calc_x_reverse_lookup()
681 return (index + 1) * TFRC_CALC_X_SPLIT / TFRC_CALC_X_ARRSIZE; in tfrc_calc_x_reverse_lookup()
685 index = tfrc_binsearch(fvalue, 0); in tfrc_calc_x_reverse_lookup()
[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 …]
/net/batman-adv/
Dhash.h81 u32 index; in batadv_hash_add() local
90 index = choose(data, hash->size); in batadv_hash_add()
91 head = &hash->table[index]; in batadv_hash_add()
92 list_lock = &hash->list_locks[index]; in batadv_hash_add()
134 u32 index; in batadv_hash_remove() local
139 index = choose(data, hash->size); in batadv_hash_remove()
140 head = &hash->table[index]; in batadv_hash_remove()
142 spin_lock_bh(&hash->list_locks[index]); in batadv_hash_remove()
152 spin_unlock_bh(&hash->list_locks[index]); in batadv_hash_remove()
/net/mac80211/
Drc80211_minstrel_ht.c391 minstrel_get_ratestats(struct minstrel_ht_sta *mi, int index) in minstrel_get_ratestats() argument
393 return &mi->groups[MI_RATE_GROUP(index)].rates[MI_RATE_IDX(index)]; in minstrel_get_ratestats()
396 static inline int minstrel_get_duration(int index) in minstrel_get_duration() argument
398 const struct mcs_group *group = &minstrel_mcs_groups[MI_RATE_GROUP(index)]; in minstrel_get_duration()
399 unsigned int duration = group->duration[MI_RATE_IDX(index)]; in minstrel_get_duration()
472 minstrel_ht_sort_best_tp_rates(struct minstrel_ht_sta *mi, u16 index, in minstrel_ht_sort_best_tp_rates() argument
479 cur_group = MI_RATE_GROUP(index); in minstrel_ht_sort_best_tp_rates()
480 cur_idx = MI_RATE_IDX(index); in minstrel_ht_sort_best_tp_rates()
501 tp_list[j] = index; in minstrel_ht_sort_best_tp_rates()
508 minstrel_ht_set_best_prob_rate(struct minstrel_ht_sta *mi, u16 *dest, u16 index) in minstrel_ht_set_best_prob_rate() argument
[all …]
/net/mpls/
Daf_mpls.c77 static struct mpls_route *mpls_route_input_rcu(struct net *net, unsigned index) in mpls_route_input_rcu() argument
81 if (index < net->mpls.platform_labels) { in mpls_route_input_rcu()
84 rt = rcu_dereference(platform_label[index]); in mpls_route_input_rcu()
223 static struct mpls_nh *mpls_get_nexthop(struct mpls_route *rt, u8 index) in mpls_get_nexthop() argument
225 return (struct mpls_nh *)((u8 *)rt->rt_nh + index * rt->rt_nh_size); in mpls_get_nexthop()
538 static void mpls_notify_route(struct net *net, unsigned index, in mpls_notify_route() argument
548 if (rt && (index >= MPLS_LABEL_FIRST_UNRESERVED)) in mpls_notify_route()
549 rtmsg_lfib(event, index, rt, nlh, net, portid, nlm_flags); in mpls_notify_route()
552 static void mpls_route_update(struct net *net, unsigned index, in mpls_route_update() argument
562 rt = rtnl_dereference(platform_label[index]); in mpls_route_update()
[all …]
/net/9p/
Dtrans_virtio.c175 int index = start; in pack_sg_list() local
181 BUG_ON(index >= limit); in pack_sg_list()
183 sg_unmark_end(&sg[index]); in pack_sg_list()
184 sg_set_buf(&sg[index++], data, s); in pack_sg_list()
188 if (index-start) in pack_sg_list()
189 sg_mark_end(&sg[index - 1]); in pack_sg_list()
190 return index-start; in pack_sg_list()
223 int index = start; in pack_sg_list_p() local
234 BUG_ON(index >= limit); in pack_sg_list_p()
236 sg_unmark_end(&sg[index]); in pack_sg_list_p()
[all …]
/net/sched/
Dact_vlan.c134 u32 index; in tcf_vlan_init() local
147 index = parm->index; in tcf_vlan_init()
148 err = tcf_idr_check_alloc(tn, &index, a, bind); in tcf_vlan_init()
164 tcf_idr_cleanup(tn, index); in tcf_vlan_init()
172 tcf_idr_cleanup(tn, index); in tcf_vlan_init()
186 tcf_idr_cleanup(tn, index); in tcf_vlan_init()
204 tcf_idr_cleanup(tn, index); in tcf_vlan_init()
212 tcf_idr_cleanup(tn, index); in tcf_vlan_init()
218 ret = tcf_idr_create_from_flags(tn, index, est, a, in tcf_vlan_init()
221 tcf_idr_cleanup(tn, index); in tcf_vlan_init()
[all …]
Dsch_qfq.c172 unsigned int index; /* Group index. */ member
237 int index = 0; in qfq_calc_index() local
243 index = __fls(size_map) + 1; /* basically a log_2 */ in qfq_calc_index()
244 index -= !(slot_size - (1ULL << (index + min_slot_shift - 1))); in qfq_calc_index()
246 if (index < 0) in qfq_calc_index()
247 index = 0; in qfq_calc_index()
250 (unsigned long) ONE_FP/inv_w, maxlen, index); in qfq_calc_index()
252 return index; in qfq_calc_index()
741 int index = __ffs(bitmap); in qfq_ffs() local
742 return &q->groups[index]; in qfq_ffs()
[all …]
Dem_ipset.c23 ip_set_id_t index; in em_ipset_change() local
28 index = ip_set_nfnl_get_byindex(net, set->index); in em_ipset_change()
29 if (index == IPSET_INVALID_ID) in em_ipset_change()
37 ip_set_nfnl_put(net, index); in em_ipset_change()
45 ip_set_nfnl_put(em->net, set->index); in em_ipset_destroy()
100 ret = ip_set_test(set->index, skb, &acpar, &opt); in em_ipset_match()
Dact_simple.c99 u32 index; in tcf_simp_init() local
113 index = parm->index; in tcf_simp_init()
114 err = tcf_idr_check_alloc(tn, &index, a, bind); in tcf_simp_init()
125 tcf_idr_cleanup(tn, index); in tcf_simp_init()
130 ret = tcf_idr_create(tn, index, est, a, in tcf_simp_init()
133 tcf_idr_cleanup(tn, index); in tcf_simp_init()
175 .index = d->tcf_index, in tcf_simp_dump()
210 static int tcf_simp_search(struct net *net, struct tc_action **a, u32 index) in tcf_simp_search() argument
214 return tcf_idr_search(tn, a, index); in tcf_simp_search()
Dact_connmark.c109 u32 index; in tcf_connmark_init() local
123 index = parm->index; in tcf_connmark_init()
124 ret = tcf_idr_check_alloc(tn, &index, a, bind); in tcf_connmark_init()
126 ret = tcf_idr_create(tn, index, est, a, in tcf_connmark_init()
129 tcf_idr_cleanup(tn, index); in tcf_connmark_init()
177 .index = ci->tcf_index, in tcf_connmark_dump()
213 static int tcf_connmark_search(struct net *net, struct tc_action **a, u32 index) in tcf_connmark_search() argument
217 return tcf_idr_search(tn, a, index); in tcf_connmark_search()
Dact_gact.c65 u32 index; in tcf_gact_init() local
82 index = parm->index; in tcf_gact_init()
100 err = tcf_idr_check_alloc(tn, &index, a, bind); in tcf_gact_init()
102 ret = tcf_idr_create_from_flags(tn, index, est, a, in tcf_gact_init()
105 tcf_idr_cleanup(tn, index); in tcf_gact_init()
190 .index = gact->tcf_index, in tcf_gact_dump()
235 static int tcf_gact_search(struct net *net, struct tc_action **a, u32 index) in tcf_gact_search() argument
239 return tcf_idr_search(tn, a, index); in tcf_gact_search()
Dact_skbmod.c113 u32 lflags = 0, index; in tcf_skbmod_init() local
148 index = parm->index; in tcf_skbmod_init()
154 err = tcf_idr_check_alloc(tn, &index, a, bind); in tcf_skbmod_init()
165 tcf_idr_cleanup(tn, index); in tcf_skbmod_init()
170 ret = tcf_idr_create(tn, index, est, a, in tcf_skbmod_init()
173 tcf_idr_cleanup(tn, index); in tcf_skbmod_init()
244 .index = d->tcf_index, in tcf_skbmod_dump()
289 static int tcf_skbmod_search(struct net *net, struct tc_action **a, u32 index) in tcf_skbmod_search() argument
293 return tcf_idr_search(tn, a, index); in tcf_skbmod_search()
Dact_sample.c45 u32 psample_group_num, rate, index; in tcf_sample_init() local
63 index = parm->index; in tcf_sample_init()
64 err = tcf_idr_check_alloc(tn, &index, a, bind); in tcf_sample_init()
72 ret = tcf_idr_create(tn, index, est, a, in tcf_sample_init()
75 tcf_idr_cleanup(tn, index); in tcf_sample_init()
217 .index = s->tcf_index, in tcf_sample_dump()
261 static int tcf_sample_search(struct net *net, struct tc_action **a, u32 index) in tcf_sample_search() argument
265 return tcf_idr_search(tn, a, index); in tcf_sample_search()
Dsch_dsmark.c57 static inline int dsmark_valid_index(struct dsmark_qdisc_data *p, u16 index) in dsmark_valid_index() argument
59 return index <= p->indices && index > 0; in dsmark_valid_index()
292 u32 index; in dsmark_dequeue() local
304 index = skb->tc_index & (p->indices - 1); in dsmark_dequeue()
305 pr_debug("index %d->%d\n", skb->tc_index, index); in dsmark_dequeue()
309 ipv4_change_dsfield(ip_hdr(skb), p->mv[index].mask, in dsmark_dequeue()
310 p->mv[index].value); in dsmark_dequeue()
313 ipv6_change_dsfield(ipv6_hdr(skb), p->mv[index].mask, in dsmark_dequeue()
314 p->mv[index].value); in dsmark_dequeue()
322 if (p->mv[index].mask != 0xff || p->mv[index].value) in dsmark_dequeue()
Dact_skbedit.c113 u32 index; in tcf_skbedit_init() local
161 index = parm->index; in tcf_skbedit_init()
162 err = tcf_idr_check_alloc(tn, &index, a, bind); in tcf_skbedit_init()
173 tcf_idr_cleanup(tn, index); in tcf_skbedit_init()
178 ret = tcf_idr_create(tn, index, est, a, in tcf_skbedit_init()
181 tcf_idr_cleanup(tn, index); in tcf_skbedit_init()
244 .index = d->tcf_index, in tcf_skbedit_dump()
312 static int tcf_skbedit_search(struct net *net, struct tc_action **a, u32 index) in tcf_skbedit_search() argument
316 return tcf_idr_search(tn, a, index); in tcf_skbedit_search()
/net/ipv6/
Dxfrm6_tunnel.c106 int index = xfrm6_tunnel_spi_hash_byspi(spi); in __xfrm6_tunnel_spi_check() local
109 &xfrm6_tn->spi_byspi[index], in __xfrm6_tunnel_spi_check()
114 return index; in __xfrm6_tunnel_spi_check()
122 int index; in __xfrm6_tunnel_alloc_spi() local
131 index = __xfrm6_tunnel_spi_check(net, spi); in __xfrm6_tunnel_alloc_spi()
132 if (index >= 0) in __xfrm6_tunnel_alloc_spi()
139 index = __xfrm6_tunnel_spi_check(net, spi); in __xfrm6_tunnel_alloc_spi()
140 if (index >= 0) in __xfrm6_tunnel_alloc_spi()
155 hlist_add_head_rcu(&x6spi->list_byspi, &xfrm6_tn->spi_byspi[index]); in __xfrm6_tunnel_alloc_spi()
157 index = xfrm6_tunnel_spi_hash_byaddr(saddr); in __xfrm6_tunnel_alloc_spi()
[all …]
/net/ncsi/
Dncsi-manage.c211 int index; in ncsi_add_channel() local
225 for (index = 0; index < NCSI_CAP_MAX; index++) in ncsi_add_channel()
226 nc->caps[index].index = index; in ncsi_add_channel()
227 for (index = 0; index < NCSI_MODE_MAX; index++) in ncsi_add_channel()
228 nc->modes[index].index = index; in ncsi_add_channel()
604 int index; in clear_one_vid() local
611 index = find_next_bit(bitmap, ncf->n_vids, 0); in clear_one_vid()
612 if (index >= ncf->n_vids) { in clear_one_vid()
616 vid = ncf->vids[index]; in clear_one_vid()
618 clear_bit(index, bitmap); in clear_one_vid()
[all …]
/net/netfilter/ipset/
Dip_set_core.c711 ip_set_rcu_get(struct net *net, ip_set_id_t index) in ip_set_rcu_get() argument
716 return ip_set_dereference_nfnl(inst->ip_set_list)[index]; in ip_set_rcu_get()
734 ip_set_test(ip_set_id_t index, const struct sk_buff *skb, in ip_set_test() argument
737 struct ip_set *set = ip_set_rcu_get(xt_net(par), index); in ip_set_test()
741 pr_debug("set %s, index %u\n", set->name, index); in ip_set_test()
772 ip_set_add(ip_set_id_t index, const struct sk_buff *skb, in ip_set_add() argument
775 struct ip_set *set = ip_set_rcu_get(xt_net(par), index); in ip_set_add()
779 pr_debug("set %s, index %u\n", set->name, index); in ip_set_add()
794 ip_set_del(ip_set_id_t index, const struct sk_buff *skb, in ip_set_del() argument
797 struct ip_set *set = ip_set_rcu_get(xt_net(par), index); in ip_set_del()
[all …]

123456