Home
last modified time | relevance | path

Searched refs:r (Results 1 – 25 of 98) sorted by relevance

1234

/net/sctp/
Ddiag.c22 static void sctp_diag_get_info(struct sock *sk, struct inet_diag_msg *r,
26 static void inet_diag_msg_sctpasoc_fill(struct inet_diag_msg *r, in inet_diag_msg_sctpasoc_fill() argument
39 r->idiag_family = sk->sk_family; in inet_diag_msg_sctpasoc_fill()
40 r->id.idiag_sport = htons(asoc->base.bind_addr.port); in inet_diag_msg_sctpasoc_fill()
41 r->id.idiag_dport = htons(asoc->peer.port); in inet_diag_msg_sctpasoc_fill()
42 r->id.idiag_if = dst ? dst->dev->ifindex : 0; in inet_diag_msg_sctpasoc_fill()
43 sock_diag_save_cookie(sk, r->id.idiag_cookie); in inet_diag_msg_sctpasoc_fill()
47 *(struct in6_addr *)r->id.idiag_src = laddr.v6.sin6_addr; in inet_diag_msg_sctpasoc_fill()
48 *(struct in6_addr *)r->id.idiag_dst = paddr.v6.sin6_addr; in inet_diag_msg_sctpasoc_fill()
52 memset(&r->id.idiag_src, 0, sizeof(r->id.idiag_src)); in inet_diag_msg_sctpasoc_fill()
[all …]
/net/ipv4/
Draw_diag.c18 raw_get_hashinfo(const struct inet_diag_req_v2 *r) in raw_get_hashinfo() argument
20 if (r->sdiag_family == AF_INET) { in raw_get_hashinfo()
23 } else if (r->sdiag_family == AF_INET6) { in raw_get_hashinfo()
40 struct inet_diag_req_raw *r = (void *)req; in raw_lookup() local
43 if (r->sdiag_family == AF_INET) in raw_lookup()
44 sk = __raw_v4_lookup(net, from, r->sdiag_raw_protocol, in raw_lookup()
45 r->id.idiag_dst[0], in raw_lookup()
46 r->id.idiag_src[0], in raw_lookup()
47 r->id.idiag_if, 0); in raw_lookup()
50 sk = __raw_v6_lookup(net, from, r->sdiag_raw_protocol, in raw_lookup()
[all …]
Dinet_diag.c66 void inet_diag_msg_common_fill(struct inet_diag_msg *r, struct sock *sk) in inet_diag_msg_common_fill() argument
68 r->idiag_family = sk->sk_family; in inet_diag_msg_common_fill()
70 r->id.idiag_sport = htons(sk->sk_num); in inet_diag_msg_common_fill()
71 r->id.idiag_dport = sk->sk_dport; in inet_diag_msg_common_fill()
72 r->id.idiag_if = sk->sk_bound_dev_if; in inet_diag_msg_common_fill()
73 sock_diag_save_cookie(sk, r->id.idiag_cookie); in inet_diag_msg_common_fill()
77 *(struct in6_addr *)r->id.idiag_src = sk->sk_v6_rcv_saddr; in inet_diag_msg_common_fill()
78 *(struct in6_addr *)r->id.idiag_dst = sk->sk_v6_daddr; in inet_diag_msg_common_fill()
82 memset(&r->id.idiag_src, 0, sizeof(r->id.idiag_src)); in inet_diag_msg_common_fill()
83 memset(&r->id.idiag_dst, 0, sizeof(r->id.idiag_dst)); in inet_diag_msg_common_fill()
[all …]
Darp.c995 static int arp_req_set_public(struct net *net, struct arpreq *r, in arp_req_set_public() argument
998 __be32 ip = ((struct sockaddr_in *)&r->arp_pa)->sin_addr.s_addr; in arp_req_set_public()
999 __be32 mask = ((struct sockaddr_in *)&r->arp_netmask)->sin_addr.s_addr; in arp_req_set_public()
1003 if (!dev && (r->arp_flags & ATF_COM)) { in arp_req_set_public()
1004 dev = dev_getbyhwaddr_rcu(net, r->arp_ha.sa_family, in arp_req_set_public()
1005 r->arp_ha.sa_data); in arp_req_set_public()
1018 static int arp_req_set(struct net *net, struct arpreq *r, in arp_req_set() argument
1025 if (r->arp_flags & ATF_PUBL) in arp_req_set()
1026 return arp_req_set_public(net, r, dev); in arp_req_set()
1028 ip = ((struct sockaddr_in *)&r->arp_pa)->sin_addr.s_addr; in arp_req_set()
[all …]
Dudp_diag.c96 const struct inet_diag_req_v2 *r, struct nlattr *bc) in udp_dump() argument
122 if (!(r->idiag_states & (1 << sk->sk_state))) in udp_dump()
124 if (r->sdiag_family != AF_UNSPEC && in udp_dump()
125 sk->sk_family != r->sdiag_family) in udp_dump()
127 if (r->id.idiag_sport != inet->inet_sport && in udp_dump()
128 r->id.idiag_sport) in udp_dump()
130 if (r->id.idiag_dport != inet->inet_dport && in udp_dump()
131 r->id.idiag_dport) in udp_dump()
134 if (sk_diag_dump(sk, skb, cb, r, bc, net_admin) < 0) { in udp_dump()
149 const struct inet_diag_req_v2 *r, struct nlattr *bc) in udp_diag_dump() argument
[all …]
Dfib_rules.c49 struct fib4_rule *r = container_of(rule, struct fib4_rule, common); in fib4_rule_matchall() local
51 if (r->dst_len || r->src_len || r->tos) in fib4_rule_matchall()
173 struct fib4_rule *r = (struct fib4_rule *) rule; in fib4_rule_match() local
178 if (((saddr ^ r->src) & r->srcmask) || in fib4_rule_match()
179 ((daddr ^ r->dst) & r->dstmask)) in fib4_rule_match()
182 if (r->tos && (r->tos != fl4->flowi4_tos)) in fib4_rule_match()
/net/decnet/
Ddn_rules.c63 res->r = arg.rule; in dn_fib_lookup()
110 struct dn_fib_rule *r = (struct dn_fib_rule *)rule; in dn_fib_rule_match() local
115 if (((saddr ^ r->src) & r->srcmask) || in dn_fib_rule_match()
116 ((daddr ^ r->dst) & r->dstmask)) in dn_fib_rule_match()
128 struct dn_fib_rule *r = (struct dn_fib_rule *)rule; in dn_fib_rule_configure() local
150 r->src = nla_get_le16(tb[FRA_SRC]); in dn_fib_rule_configure()
153 r->dst = nla_get_le16(tb[FRA_DST]); in dn_fib_rule_configure()
155 r->src_len = frh->src_len; in dn_fib_rule_configure()
156 r->srcmask = dnet_make_mask(r->src_len); in dn_fib_rule_configure()
157 r->dst_len = frh->dst_len; in dn_fib_rule_configure()
[all …]
Ddn_fib.c165 const struct rtmsg *r) in dn_fib_get_nhs() argument
176 nh->nh_flags = (r->rtm_flags&~0xFF) | nhp->rtnh_flags; in dn_fib_get_nhs()
195 static int dn_fib_check_nh(const struct rtmsg *r, struct dn_fib_info *fi, struct dn_fib_nh *nh) in dn_fib_check_nh() argument
206 if (r->rtm_scope >= RT_SCOPE_LINK) in dn_fib_check_nh()
223 fld.flowidn_scope = r->rtm_scope + 1; in dn_fib_check_nh()
267 struct dn_fib_info *dn_fib_create_info(const struct rtmsg *r, struct nlattr *attrs[], in dn_fib_create_info() argument
275 if (r->rtm_type > RTN_MAX) in dn_fib_create_info()
278 if (dn_fib_props[r->rtm_type].scope > r->rtm_scope) in dn_fib_create_info()
290 fi->fib_protocol = r->rtm_protocol; in dn_fib_create_info()
292 fi->fib_flags = r->rtm_flags; in dn_fib_create_info()
[all …]
/net/nfc/hci/
Dcore.c69 int r = 0; in nfc_hci_msg_tx_work() local
99 r = nfc_llc_xmit_from_hci(hdev->llc, skb); in nfc_hci_msg_tx_work()
100 if (r < 0) { in nfc_hci_msg_tx_work()
104 msg->cb(msg->cb_context, NULL, r); in nfc_hci_msg_tx_work()
110 if (r) in nfc_hci_msg_tx_work()
283 int r; in nfc_hci_target_discovered() local
293 r = nfc_hci_get_param(hdev, NFC_HCI_RF_READER_A_GATE, in nfc_hci_target_discovered()
295 if (r < 0) in nfc_hci_target_discovered()
298 r = nfc_hci_get_param(hdev, NFC_HCI_RF_READER_A_GATE, in nfc_hci_target_discovered()
300 if (r < 0) in nfc_hci_target_discovered()
[all …]
Dcommand.c147 int r; in nfc_hci_set_param() local
167 r = nfc_hci_send_cmd(hdev, gate, NFC_HCI_ANY_SET_PARAMETER, in nfc_hci_set_param()
172 return r; in nfc_hci_set_param()
189 int r; in nfc_hci_open_pipe() local
193 r = nfc_hci_execute_cmd(hdev, pipe, NFC_HCI_ANY_OPEN_PIPE, in nfc_hci_open_pipe()
195 if (r == 0) { in nfc_hci_open_pipe()
203 return r; in nfc_hci_open_pipe()
271 int r; in nfc_hci_disconnect_gate() local
279 r = nfc_hci_close_pipe(hdev, pipe); in nfc_hci_disconnect_gate()
280 if (r < 0) in nfc_hci_disconnect_gate()
[all …]
Dllc_shdlc.c143 int r; in llc_shdlc_send_s_frame() local
154 r = shdlc->xmit_to_drv(shdlc->hdev, skb); in llc_shdlc_send_s_frame()
158 return r; in llc_shdlc_send_s_frame()
166 int r; in llc_shdlc_send_u_frame() local
172 r = shdlc->xmit_to_drv(shdlc->hdev, skb); in llc_shdlc_send_u_frame()
176 return r; in llc_shdlc_send_u_frame()
343 static void llc_shdlc_connect_complete(struct llc_shdlc *shdlc, int r) in llc_shdlc_connect_complete() argument
345 pr_debug("result=%d\n", r); in llc_shdlc_connect_complete()
349 if (r == 0) { in llc_shdlc_connect_complete()
359 shdlc->connect_result = r; in llc_shdlc_connect_complete()
[all …]
Dllc.c16 int r; in nfc_llc_init() local
18 r = nfc_llc_nop_register(); in nfc_llc_init()
19 if (r) in nfc_llc_init()
22 r = nfc_llc_shdlc_register(); in nfc_llc_init()
23 if (r) in nfc_llc_init()
30 return r; in nfc_llc_init()
/net/sched/
Dcls_tcindex.c55 static inline int tcindex_filter_is_set(struct tcindex_filter_result *r) in tcindex_filter_is_set() argument
57 return tcf_exts_has_actions(&r->exts) || r->res.classid; in tcindex_filter_is_set()
114 struct tcindex_filter_result *r; in tcindex_get() local
119 r = tcindex_lookup(p, handle); in tcindex_get()
120 return r && tcindex_filter_is_set(r) ? r : NULL; in tcindex_get()
140 static void __tcindex_destroy_rexts(struct tcindex_filter_result *r) in __tcindex_destroy_rexts() argument
142 tcf_exts_destroy(&r->exts); in __tcindex_destroy_rexts()
143 tcf_exts_put_net(&r->exts); in __tcindex_destroy_rexts()
148 struct tcindex_filter_result *r; in tcindex_destroy_rexts_work() local
150 r = container_of(to_rcu_work(work), in tcindex_destroy_rexts_work()
[all …]
/net/netfilter/
Dxt_limit.c67 const struct xt_rateinfo *r = par->matchinfo; in limit_mt() local
68 struct xt_limit_priv *priv = r->master; in limit_mt()
73 if (priv->credit > r->credit_cap) in limit_mt()
74 priv->credit = r->credit_cap; in limit_mt()
76 if (priv->credit >= r->cost) { in limit_mt()
78 priv->credit -= r->cost; in limit_mt()
100 struct xt_rateinfo *r = par->matchinfo; in limit_mt_check() local
104 if (r->burst == 0 in limit_mt_check()
105 || user2credits(r->avg * r->burst) < user2credits(r->avg)) { in limit_mt_check()
107 r->avg, r->burst); in limit_mt_check()
[all …]
Dxt_time.c80 static inline unsigned int localtime_1(struct xtm *r, time_t time) in localtime_1() argument
86 r->second = v % 60; in localtime_1()
88 r->minute = w % 60; in localtime_1()
89 r->hour = w / 60; in localtime_1()
93 static inline void localtime_2(struct xtm *r, time_t time) in localtime_2() argument
99 r->dse = time / 86400; in localtime_2()
105 r->weekday = (4 + r->dse - 1) % 7 + 1; in localtime_2()
108 static void localtime_3(struct xtm *r, time_t time) in localtime_3() argument
110 unsigned int year, i, w = r->dse; in localtime_3()
146 r->monthday = w - days_since_leapyear[i] + 1; in localtime_3()
[all …]
/net/nfc/nci/
Dhci.c147 int len, i, r; in nci_hci_send_data() local
180 r = nci_send_data(ndev, conn_info->conn_id, skb); in nci_hci_send_data()
181 if (r < 0) in nci_hci_send_data()
182 return r; in nci_hci_send_data()
229 int r; in nci_hci_send_cmd() local
245 r = nci_request(ndev, nci_hci_send_data_req, (unsigned long)&data, in nci_hci_send_cmd()
247 if (r == NCI_STATUS_OK) { in nci_hci_send_cmd()
249 r = nci_hci_result_to_errno( in nci_hci_send_cmd()
253 if (!r && skb) in nci_hci_send_cmd()
257 return r; in nci_hci_send_cmd()
[all …]
/net/core/
Dfib_rules.c44 struct fib_rule *r; in fib_default_rule_add() local
46 r = kzalloc(ops->rule_size, GFP_KERNEL); in fib_default_rule_add()
47 if (r == NULL) in fib_default_rule_add()
50 refcount_set(&r->refcnt, 1); in fib_default_rule_add()
51 r->action = FR_ACT_TO_TBL; in fib_default_rule_add()
52 r->pref = pref; in fib_default_rule_add()
53 r->table = table; in fib_default_rule_add()
54 r->flags = flags; in fib_default_rule_add()
55 r->proto = RTPROT_KERNEL; in fib_default_rule_add()
56 r->fr_net = ops->fro_net; in fib_default_rule_add()
[all …]
/net/smc/
Dsmc_diag.c38 static void smc_diag_msg_common_fill(struct smc_diag_msg *r, struct sock *sk) in smc_diag_msg_common_fill() argument
42 r->diag_family = sk->sk_family; in smc_diag_msg_common_fill()
45 r->id.idiag_sport = htons(smc->clcsock->sk->sk_num); in smc_diag_msg_common_fill()
46 r->id.idiag_dport = smc->clcsock->sk->sk_dport; in smc_diag_msg_common_fill()
47 r->id.idiag_if = smc->clcsock->sk->sk_bound_dev_if; in smc_diag_msg_common_fill()
48 sock_diag_save_cookie(sk, r->id.idiag_cookie); in smc_diag_msg_common_fill()
50 memset(&r->id.idiag_src, 0, sizeof(r->id.idiag_src)); in smc_diag_msg_common_fill()
51 memset(&r->id.idiag_dst, 0, sizeof(r->id.idiag_dst)); in smc_diag_msg_common_fill()
52 r->id.idiag_src[0] = smc->clcsock->sk->sk_rcv_saddr; in smc_diag_msg_common_fill()
53 r->id.idiag_dst[0] = smc->clcsock->sk->sk_daddr; in smc_diag_msg_common_fill()
[all …]
/net/mac80211/
Dmichael.c16 mctx->r ^= rol32(mctx->l, 17); in michael_block()
17 mctx->l += mctx->r; in michael_block()
18 mctx->r ^= ((mctx->l & 0xff00ff00) >> 8) | in michael_block()
20 mctx->l += mctx->r; in michael_block()
21 mctx->r ^= rol32(mctx->l, 3); in michael_block()
22 mctx->l += mctx->r; in michael_block()
23 mctx->r ^= ror32(mctx->l, 2); in michael_block()
24 mctx->l += mctx->r; in michael_block()
40 mctx->r = get_unaligned_le32(key + 4); in michael_mic_hdr()
82 put_unaligned_le32(mctx.r, mic + 4); in michael_mic()
Drc80211_minstrel.c67 if (mi->r[i].rix == rix) in rix_to_ndx()
97 struct minstrel_rate_stats *cur_mrs = &mi->r[i].stats; in minstrel_sort_best_tp_rates()
100 tmp_mrs = &mi->r[tp_list[j - 1]].stats; in minstrel_sort_best_tp_rates()
101 if (minstrel_get_tp_avg(&mi->r[i], cur_mrs->prob_ewma) <= in minstrel_sort_best_tp_rates()
102 minstrel_get_tp_avg(&mi->r[tp_list[j - 1]], tmp_mrs->prob_ewma)) in minstrel_sort_best_tp_rates()
116 struct minstrel_rate *r = &mi->r[idx]; in minstrel_set_rate() local
118 ratetbl->rate[offset].idx = r->rix; in minstrel_set_rate()
119 ratetbl->rate[offset].count = r->adjusted_retry_count; in minstrel_set_rate()
120 ratetbl->rate[offset].count_cts = r->retry_count_cts; in minstrel_set_rate()
121 ratetbl->rate[offset].count_rts = r->stats.retry_count_rtscts; in minstrel_set_rate()
[all …]
Dsta_info.h830 u32 r; in sta_stats_encode_rate() local
832 r = STA_STATS_FIELD(BW, s->bw); in sta_stats_encode_rate()
835 r |= STA_STATS_FIELD(SGI, 1); in sta_stats_encode_rate()
839 r |= STA_STATS_FIELD(TYPE, STA_STATS_RATE_TYPE_VHT); in sta_stats_encode_rate()
840 r |= STA_STATS_FIELD(VHT_NSS, s->nss); in sta_stats_encode_rate()
841 r |= STA_STATS_FIELD(VHT_MCS, s->rate_idx); in sta_stats_encode_rate()
844 r |= STA_STATS_FIELD(TYPE, STA_STATS_RATE_TYPE_HT); in sta_stats_encode_rate()
845 r |= STA_STATS_FIELD(HT_MCS, s->rate_idx); in sta_stats_encode_rate()
848 r |= STA_STATS_FIELD(TYPE, STA_STATS_RATE_TYPE_LEGACY); in sta_stats_encode_rate()
849 r |= STA_STATS_FIELD(LEGACY_BAND, s->band); in sta_stats_encode_rate()
[all …]
/net/appletalk/
Datalk_proc.c80 struct atalk_route *r; in atalk_get_route_idx() local
82 for (r = atalk_routes; pos && r; r = r->next) in atalk_get_route_idx()
85 return r; in atalk_get_route_idx()
99 struct atalk_route *r; in atalk_seq_route_next() local
103 r = NULL; in atalk_seq_route_next()
105 r = atalk_routes; in atalk_seq_route_next()
108 r = v; in atalk_seq_route_next()
109 r = r->next; in atalk_seq_route_next()
111 return r; in atalk_seq_route_next()
/net/ceph/crush/
Dmapper.c76 int x, int r) in bucket_perm_choose() argument
78 unsigned int pr = r % bucket->size; in bucket_perm_choose()
130 bucket->size, x, r, pr, s); in bucket_perm_choose()
136 struct crush_work_bucket *work, int x, int r) in bucket_uniform_choose() argument
138 return bucket_perm_choose(&bucket->h, work, x, r); in bucket_uniform_choose()
143 int x, int r) in bucket_list_choose() argument
149 r, bucket->h.id); in bucket_list_choose()
153 i, x, r, bucket->h.items[i], bucket->item_weights[i], in bucket_list_choose()
197 int x, int r) in bucket_tree_choose() argument
210 t = (__u64)crush_hash32_4(bucket->h.hash, x, n, r, in bucket_tree_choose()
[all …]
/net/ipv6/
Dfib6_rules.c32 struct fib6_rule *r = container_of(rule, struct fib6_rule, common); in fib6_rule_matchall() local
34 if (r->dst.plen || r->src.plen || r->tclass) in fib6_rule_matchall()
131 struct fib6_rule *r = (struct fib6_rule *)rule; in fib6_rule_saddr() local
137 r->src.plen && !(flags & RT6_LOOKUP_F_HAS_SADDR)) { in fib6_rule_saddr()
144 if (!ipv6_prefix_equal(&saddr, &r->src.addr, r->src.plen)) in fib6_rule_saddr()
297 struct fib6_rule *r = (struct fib6_rule *) rule; in fib6_rule_match() local
300 if (r->dst.plen && in fib6_rule_match()
301 !ipv6_prefix_equal(&fl6->daddr, &r->dst.addr, r->dst.plen)) in fib6_rule_match()
309 if (r->src.plen) { in fib6_rule_match()
311 if (!ipv6_prefix_equal(&fl6->saddr, &r->src.addr, in fib6_rule_match()
[all …]
/net/bluetooth/bnep/
Dnetdev.c55 struct bnep_set_filter_req *r; in bnep_net_set_mc_list() local
61 size = sizeof(*r) + (BNEP_MAX_MULTICAST_FILTERS + 1) * ETH_ALEN * 2; in bnep_net_set_mc_list()
68 r = (void *) skb->data; in bnep_net_set_mc_list()
69 __skb_put(skb, sizeof(*r)); in bnep_net_set_mc_list()
71 r->type = BNEP_CONTROL; in bnep_net_set_mc_list()
72 r->ctrl = BNEP_FILTER_MULTI_ADDR_SET; in bnep_net_set_mc_list()
80 r->len = htons(ETH_ALEN * 2); in bnep_net_set_mc_list()
101 r->len = htons(skb->len - len); in bnep_net_set_mc_list()

1234