Home
last modified time | relevance | path

Searched refs:dst (Results 1 – 25 of 276) sorted by relevance

12345678910>>...12

/net/core/
Ddst.c53 static void ___dst_free(struct dst_entry *dst);
68 struct dst_entry *dst, *next, head; in dst_gc_task() local
75 while ((dst = next) != NULL) { in dst_gc_task()
76 next = dst->next; in dst_gc_task()
79 if (likely(atomic_read(&dst->__refcnt))) { in dst_gc_task()
80 last->next = dst; in dst_gc_task()
81 last = dst; in dst_gc_task()
87 dst = dst_destroy(dst); in dst_gc_task()
88 if (dst) { in dst_gc_task()
97 if (dst->obsolete > 0) in dst_gc_task()
[all …]
/net/sched/
Dem_meta.c104 struct meta_obj *dst, int *err)
112 get_random_bytes(&dst->value, sizeof(dst->value)); in META_COLLECTOR()
125 dst->value = fixed_loadavg(avenrun[0]); in META_COLLECTOR()
130 dst->value = fixed_loadavg(avenrun[1]); in META_COLLECTOR()
135 dst->value = fixed_loadavg(avenrun[2]); in META_COLLECTOR()
142 static inline int int_dev(struct net_device *dev, struct meta_obj *dst) in int_dev() argument
147 dst->value = dev->ifindex; in int_dev()
151 static inline int var_dev(struct net_device *dev, struct meta_obj *dst) in var_dev() argument
156 dst->value = (unsigned long) dev->name; in var_dev()
157 dst->len = strlen(dev->name); in var_dev()
[all …]
Dcls_rsvp.h78 __be32 dst[RSVP_DST_LEN]; member
100 static inline unsigned int hash_dst(__be32 *dst, u8 protocol, u8 tunnelid) in hash_dst() argument
102 unsigned int h = (__force __u32)dst[RSVP_DST_LEN - 1]; in hash_dst()
140 __be32 *dst, *src; in rsvp_classify() local
162 dst = &nhptr->daddr.s6_addr32[0]; in rsvp_classify()
167 dst = &nhptr->daddr; in rsvp_classify()
174 h1 = hash_dst(dst, protocol, tunnelid); in rsvp_classify()
178 if (dst[RSVP_DST_LEN-1] == s->dst[RSVP_DST_LEN - 1] && in rsvp_classify()
183 dst[0] == s->dst[0] && in rsvp_classify()
184 dst[1] == s->dst[1] && in rsvp_classify()
[all …]
/net/ceph/
Darmor.c4 int ceph_armor(char *dst, const char *src, const char *end);
5 int ceph_unarmor(char *dst, const char *src, const char *end);
36 int ceph_armor(char *dst, const char *src, const char *end) in ceph_armor() argument
45 *dst++ = encode_bits(a >> 2); in ceph_armor()
48 *dst++ = encode_bits(((a & 3) << 4) | (b >> 4)); in ceph_armor()
51 *dst++ = encode_bits(((b & 15) << 2) | in ceph_armor()
53 *dst++ = encode_bits(c & 63); in ceph_armor()
55 *dst++ = encode_bits((b & 15) << 2); in ceph_armor()
56 *dst++ = '='; in ceph_armor()
59 *dst++ = encode_bits(((a & 3) << 4)); in ceph_armor()
[all …]
Dcrypto.c14 int ceph_crypto_key_clone(struct ceph_crypto_key *dst, in ceph_crypto_key_clone() argument
17 memcpy(dst, src, sizeof(struct ceph_crypto_key)); in ceph_crypto_key_clone()
18 dst->key = kmemdup(src->key, src->len, GFP_NOFS); in ceph_crypto_key_clone()
19 if (!dst->key) in ceph_crypto_key_clone()
93 void *dst, size_t *dst_len, in ceph_aes_encrypt() argument
117 sg_set_buf(sg_out, dst, *dst_len); in ceph_aes_encrypt()
142 static int ceph_aes_encrypt2(const void *key, int key_len, void *dst, in ceph_aes_encrypt2() argument
169 sg_set_buf(sg_out, dst, *dst_len); in ceph_aes_encrypt2()
197 void *dst, size_t *dst_len, in ceph_aes_decrypt() argument
216 sg_set_buf(&sg_out[0], dst, *dst_len); in ceph_aes_decrypt()
[all …]
/net/dsa/
Ddsa.c78 dsa_switch_setup(struct dsa_switch_tree *dst, int index, in dsa_switch_setup() argument
81 struct dsa_chip_data *pd = dst->pd->chip + index; in dsa_switch_setup()
95 dst->master_netdev->name, index); in dsa_switch_setup()
99 dst->master_netdev->name, index, name); in dsa_switch_setup()
109 ds->dst = dst; in dsa_switch_setup()
111 ds->pd = dst->pd->chip + index; in dsa_switch_setup()
127 if (dst->cpu_switch != -1) { in dsa_switch_setup()
132 dst->cpu_switch = index; in dsa_switch_setup()
133 dst->cpu_port = i; in dsa_switch_setup()
152 if (ds->dst->cpu_switch == index) in dsa_switch_setup()
[all …]
/net/ipv6/
Droute.c70 static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie);
71 static unsigned int ip6_default_advmss(const struct dst_entry *dst);
72 static unsigned int ip6_mtu(const struct dst_entry *dst);
82 static void ip6_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
84 static void rt6_do_redirect(struct dst_entry *dst, struct sock *sk,
96 static u32 *ipv6_cow_metrics(struct dst_entry *dst, unsigned long old) in ipv6_cow_metrics() argument
98 struct rt6_info *rt = (struct rt6_info *) dst; in ipv6_cow_metrics()
102 if (!(rt->dst.flags & DST_HOST)) in ipv6_cow_metrics()
115 prev = cmpxchg(&dst->_metrics, old, new); in ipv6_cow_metrics()
139 static struct neighbour *ip6_neigh_lookup(const struct dst_entry *dst, in ip6_neigh_lookup() argument
[all …]
Dip6_output.c86 struct dst_entry *dst = skb_dst(skb); in ip6_finish_output2() local
87 struct net_device *dev = dst->dev; in ip6_finish_output2()
133 nexthop = rt6_nexthop((struct rt6_info *)dst, &ipv6_hdr(skb)->daddr); in ip6_finish_output2()
134 neigh = __ipv6_neigh_lookup_noref(dst->dev, nexthop); in ip6_finish_output2()
136 neigh = __neigh_create(&nd_tbl, nexthop, dst->dev, false); in ip6_finish_output2()
138 ret = dst_neigh_output(dst, neigh, skb); in ip6_finish_output2()
144 IP6_INC_STATS_BH(dev_net(dst->dev), in ip6_finish_output2()
145 ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES); in ip6_finish_output2()
185 struct dst_entry *dst = skb_dst(skb); in ip6_xmit() local
200 head_room += sizeof(struct ipv6hdr) + LL_RESERVED_SPACE(dst->dev); in ip6_xmit()
[all …]
Dinet6_connection_sock.c76 struct dst_entry *dst; in inet6_csk_route_req() local
92 dst = ip6_dst_lookup_flow(sk, fl6, final_p, false); in inet6_csk_route_req()
93 if (IS_ERR(dst)) in inet6_csk_route_req()
96 return dst; in inet6_csk_route_req()
186 void __inet6_csk_dst_store(struct sock *sk, struct dst_entry *dst, in __inet6_csk_dst_store() argument
190 __ip6_dst_store(sk, dst, daddr, saddr); in __inet6_csk_dst_store()
205 struct dst_entry *dst; in inet6_csk_route_socket() local
224 dst = __inet6_csk_dst_check(sk, np->dst_cookie); in inet6_csk_route_socket()
225 if (!dst) { in inet6_csk_route_socket()
226 dst = ip6_dst_lookup_flow(sk, fl6, final_p, false); in inet6_csk_route_socket()
[all …]
Dxfrm6_policy.c35 struct dst_entry *dst; in xfrm6_dst_lookup() local
44 dst = ip6_route_output(net, NULL, &fl6); in xfrm6_dst_lookup()
46 err = dst->error; in xfrm6_dst_lookup()
47 if (dst->error) { in xfrm6_dst_lookup()
48 dst_release(dst); in xfrm6_dst_lookup()
49 dst = ERR_PTR(err); in xfrm6_dst_lookup()
52 return dst; in xfrm6_dst_lookup()
59 struct dst_entry *dst; in xfrm6_get_saddr() local
62 dst = xfrm6_dst_lookup(net, 0, NULL, daddr, mark); in xfrm6_get_saddr()
63 if (IS_ERR(dst)) in xfrm6_get_saddr()
[all …]
Dicmp.c175 struct dst_entry *dst; in icmpv6_xrlim_allow() local
192 dst = ip6_route_output(net, sk, fl6); in icmpv6_xrlim_allow()
193 if (dst->error) { in icmpv6_xrlim_allow()
194 IP6_INC_STATS(net, ip6_dst_idev(dst), in icmpv6_xrlim_allow()
196 } else if (dst->dev && (dst->dev->flags&IFF_LOOPBACK)) { in icmpv6_xrlim_allow()
199 struct rt6_info *rt = (struct rt6_info *)dst; in icmpv6_xrlim_allow()
212 dst_release(dst); in icmpv6_xrlim_allow()
321 struct dst_entry *dst, *dst2; in icmpv6_route_lookup() local
325 err = ip6_dst_lookup(sk, &dst, fl6); in icmpv6_route_lookup()
333 if (((struct rt6_info *)dst)->rt6i_flags & RTF_ANYCAST) { in icmpv6_route_lookup()
[all …]
Dnetfilter.c26 struct dst_entry *dst; in ip6_route_me_harder() local
35 dst = ip6_route_output(net, skb->sk, &fl6); in ip6_route_me_harder()
36 if (dst->error) { in ip6_route_me_harder()
37 IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES); in ip6_route_me_harder()
39 dst_release(dst); in ip6_route_me_harder()
40 return dst->error; in ip6_route_me_harder()
46 skb_dst_set(skb, dst); in ip6_route_me_harder()
52 dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), skb->sk, 0); in ip6_route_me_harder()
53 if (IS_ERR(dst)) in ip6_route_me_harder()
54 return PTR_ERR(dst); in ip6_route_me_harder()
[all …]
Dfib6_rules.c28 struct rt6key dst; member
46 dst_hold(&net->ipv6.ip6_null_entry->dst); in fib6_rule_lookup()
47 return &net->ipv6.ip6_null_entry->dst; in fib6_rule_lookup()
90 ip6_dst_idev(&rt->dst)->dev, in fib6_rule_action()
108 dst_hold(&rt->dst); in fib6_rule_action()
120 if (r->dst.plen && in fib6_rule_match()
121 !ipv6_prefix_equal(&fl6->daddr, &r->dst.addr, r->dst.plen)) in fib6_rule_match()
171 nla_memcpy(&rule6->dst.addr, tb[FRA_DST], in fib6_rule_configure()
175 rule6->dst.plen = frh->dst_len; in fib6_rule_configure()
191 if (frh->dst_len && (rule6->dst.plen != frh->dst_len)) in fib6_rule_compare()
[all …]
/net/decnet/
Ddn_route.c114 static unsigned int dn_dst_default_advmss(const struct dst_entry *dst);
115 static unsigned int dn_dst_mtu(const struct dst_entry *dst);
120 static void dn_dst_update_pmtu(struct dst_entry *dst, struct sock *sk,
122 static void dn_dst_redirect(struct dst_entry *dst, struct sock *sk,
124 static struct neighbour *dn_dst_neigh_lookup(const struct dst_entry *dst,
155 static void dn_dst_destroy(struct dst_entry *dst) in dn_dst_destroy() argument
157 struct dn_route *rt = (struct dn_route *) dst; in dn_dst_destroy()
161 dst_destroy_metrics_generic(dst); in dn_dst_destroy()
164 static void dn_dst_ifdown(struct dst_entry *dst, struct net_device *dev, int how) in dn_dst_ifdown() argument
167 struct dn_route *rt = (struct dn_route *) dst; in dn_dst_ifdown()
[all …]
/net/ipv4/
Droute.c133 static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie);
134 static unsigned int ipv4_default_advmss(const struct dst_entry *dst);
135 static unsigned int ipv4_mtu(const struct dst_entry *dst);
136 static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst);
138 static void ip_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
140 static void ip_do_redirect(struct dst_entry *dst, struct sock *sk,
142 static void ipv4_dst_destroy(struct dst_entry *dst);
144 static void ipv4_dst_ifdown(struct dst_entry *dst, struct net_device *dev, in ipv4_dst_ifdown() argument
149 static u32 *ipv4_cow_metrics(struct dst_entry *dst, unsigned long old) in ipv4_cow_metrics() argument
155 static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst,
[all …]
Dtcp_metrics.c99 static void tcpm_suck_dst(struct tcp_metrics_block *tm, struct dst_entry *dst, in tcpm_suck_dst() argument
107 if (dst_metric_locked(dst, RTAX_RTT)) in tcpm_suck_dst()
109 if (dst_metric_locked(dst, RTAX_RTTVAR)) in tcpm_suck_dst()
111 if (dst_metric_locked(dst, RTAX_SSTHRESH)) in tcpm_suck_dst()
113 if (dst_metric_locked(dst, RTAX_CWND)) in tcpm_suck_dst()
115 if (dst_metric_locked(dst, RTAX_REORDERING)) in tcpm_suck_dst()
119 tm->tcpm_vals[TCP_METRIC_RTT] = dst_metric_raw(dst, RTAX_RTT); in tcpm_suck_dst()
120 tm->tcpm_vals[TCP_METRIC_RTTVAR] = dst_metric_raw(dst, RTAX_RTTVAR); in tcpm_suck_dst()
121 tm->tcpm_vals[TCP_METRIC_SSTHRESH] = dst_metric_raw(dst, RTAX_SSTHRESH); in tcpm_suck_dst()
122 tm->tcpm_vals[TCP_METRIC_CWND] = dst_metric_raw(dst, RTAX_CWND); in tcpm_suck_dst()
[all …]
/net/ipv4/netfilter/
Dnf_nat_h323.c119 &ct->tuplehash[!dir].tuple.dst.u3.ip, in set_sig_addr()
124 tuple.dst.u3, in set_sig_addr()
126 } else if (addr.ip == ct->tuplehash[dir].tuple.dst.u3.ip && in set_sig_addr()
162 &ct->tuplehash[!dir].tuple.dst.u3.ip, in set_ras_addr()
163 ntohs(ct->tuplehash[!dir].tuple.dst.u.udp.port)); in set_ras_addr()
165 &ct->tuplehash[!dir].tuple.dst.u3, in set_ras_addr()
167 dst.u.udp.port); in set_ras_addr()
189 rtp_exp->saved_proto.udp.port = rtp_exp->tuple.dst.u.udp.port; in nat_rtp_rtcp()
192 rtcp_exp->saved_proto.udp.port = rtcp_exp->tuple.dst.u.udp.port; in nat_rtp_rtcp()
203 rtp_exp->tuple.dst.u.udp.port = info->rtp_port[i][dir]; in nat_rtp_rtcp()
[all …]
Dnf_conntrack_proto_icmp.c42 tuple->dst.u.icmp.type = hp->type; in icmp_pkt_to_tuple()
44 tuple->dst.u.icmp.code = hp->code; in icmp_pkt_to_tuple()
64 if (orig->dst.u.icmp.type >= sizeof(invmap) || in icmp_invert_tuple()
65 !invmap[orig->dst.u.icmp.type]) in icmp_invert_tuple()
69 tuple->dst.u.icmp.type = invmap[orig->dst.u.icmp.type] - 1; in icmp_invert_tuple()
70 tuple->dst.u.icmp.code = orig->dst.u.icmp.code; in icmp_invert_tuple()
79 tuple->dst.u.icmp.type, in icmp_print_tuple()
80 tuple->dst.u.icmp.code, in icmp_print_tuple()
117 if (ct->tuplehash[0].tuple.dst.u.icmp.type >= sizeof(valid_new) || in icmp_new()
118 !valid_new[ct->tuplehash[0].tuple.dst.u.icmp.type]) { in icmp_new()
[all …]
Dnf_nat_l3proto_ipv4.c42 fl4->daddr = t->dst.u3.ip; in nf_nat_ipv4_decode_session()
43 if (t->dst.protonum == IPPROTO_TCP || in nf_nat_ipv4_decode_session()
44 t->dst.protonum == IPPROTO_UDP || in nf_nat_ipv4_decode_session()
45 t->dst.protonum == IPPROTO_UDPLITE || in nf_nat_ipv4_decode_session()
46 t->dst.protonum == IPPROTO_DCCP || in nf_nat_ipv4_decode_session()
47 t->dst.protonum == IPPROTO_SCTP) in nf_nat_ipv4_decode_session()
48 fl4->fl4_dport = t->dst.u.all; in nf_nat_ipv4_decode_session()
55 if (t->dst.protonum == IPPROTO_TCP || in nf_nat_ipv4_decode_session()
56 t->dst.protonum == IPPROTO_UDP || in nf_nat_ipv4_decode_session()
57 t->dst.protonum == IPPROTO_UDPLITE || in nf_nat_ipv4_decode_session()
[all …]
/net/xfrm/
Dxfrm_policy.c55 static void xfrm_init_pmtu(struct dst_entry *dst);
56 static int stale_bundle(struct dst_entry *dst);
125 struct dst_entry *dst; in __xfrm_dst_lookup() local
131 dst = afinfo->dst_lookup(net, tos, saddr, daddr, mark); in __xfrm_dst_lookup()
135 return dst; in __xfrm_dst_lookup()
146 struct dst_entry *dst; in xfrm_dst_lookup() local
157 dst = __xfrm_dst_lookup(net, tos, saddr, daddr, family, mark); in xfrm_dst_lookup()
159 if (!IS_ERR(dst)) { in xfrm_dst_lookup()
166 return dst; in xfrm_dst_lookup()
1382 struct dst_entry *dst = &xdst->u.dst; in xfrm_bundle_flo_get() local
[all …]
/net/netfilter/
Dxt_hashlimit.c66 __be32 dst; member
71 __be32 dst[4]; member
82 struct dsthash_dst dst; member
123 return !memcmp(&ent->dst, b, sizeof(ent->dst)); in dst_cmp()
127 hash_dst(const struct xt_hashlimit_htable *ht, const struct dsthash_dst *dst) in hash_dst() argument
129 u_int32_t hash = jhash2((const u32 *)dst, in hash_dst()
130 sizeof(*dst)/sizeof(u32), in hash_dst()
143 const struct dsthash_dst *dst) in dsthash_find() argument
146 u_int32_t hash = hash_dst(ht, dst); in dsthash_find()
150 if (dst_cmp(ent, dst)) { in dsthash_find()
[all …]
Dnf_nat_sip.c106 newaddr = ct->tuplehash[!dir].tuple.dst.u3; in map_addr()
107 newport = ct->tuplehash[!dir].tuple.dst.u.udp.port; in map_addr()
108 } else if (nf_inet_addr_cmp(&ct->tuplehash[dir].tuple.dst.u3, addr) && in map_addr()
109 ct->tuplehash[dir].tuple.dst.u.udp.port == port) { in map_addr()
191 &ct->tuplehash[dir].tuple.dst.u3) || in nf_nat_sip()
192 port != ct->tuplehash[dir].tuple.dst.u.udp.port) in nf_nat_sip()
211 !nf_inet_addr_cmp(&addr, &ct->tuplehash[!dir].tuple.dst.u3)) { in nf_nat_sip()
213 &ct->tuplehash[!dir].tuple.dst.u3, in nf_nat_sip()
227 nf_inet_addr_cmp(&addr, &ct->tuplehash[dir].tuple.dst.u3) && in nf_nat_sip()
244 htons(n) == ct->tuplehash[dir].tuple.dst.u.udp.port && in nf_nat_sip()
[all …]
/net/netfilter/ipvs/
Dip_vs_xmit.c74 struct dst_entry *dst, u32 dst_cookie) in __ip_vs_dst_set() argument
82 dest_dst->dst_cache = dst; in __ip_vs_dst_set()
95 struct dst_entry *dst; in __ip_vs_dst_check() local
99 dst = dest_dst->dst_cache; in __ip_vs_dst_check()
100 if (dst->obsolete && in __ip_vs_dst_check()
101 dst->ops->check(dst, dest_dst->dst_cookie) == NULL) in __ip_vs_dst_check()
194 __ip_vs_dst_set(dest, dest_dst, &rt->dst, 0); in __ip_vs_get_out_rt()
198 atomic_read(&rt->dst.__refcnt)); in __ip_vs_get_out_rt()
251 mtu = dst_mtu(&rt->dst); in __ip_vs_get_out_rt()
256 mtu = dst_mtu(&rt->dst) - sizeof(struct iphdr); in __ip_vs_get_out_rt()
[all …]
Dip_vs_nfct.c72 &(T)->dst.u3.ip, ntohs((T)->dst.u.all), \
73 (T)->dst.protonum
112 if (new_tuple.dst.protonum != IPPROTO_ICMP && in ip_vs_update_conntrack()
113 new_tuple.dst.protonum != IPPROTO_ICMPV6) in ip_vs_update_conntrack()
116 new_tuple.dst.u3 = cp->vaddr; in ip_vs_update_conntrack()
117 if (new_tuple.dst.protonum != IPPROTO_ICMP && in ip_vs_update_conntrack()
118 new_tuple.dst.protonum != IPPROTO_ICMPV6) in ip_vs_update_conntrack()
119 new_tuple.dst.u.tcp.port = cp->vport; in ip_vs_update_conntrack()
159 ip_vs_conn_fill_param(net, exp->tuple.src.l3num, orig->dst.protonum, in ip_vs_nfct_expect_callback()
161 &orig->dst.u3, orig->dst.u.tcp.port, &p); in ip_vs_nfct_expect_callback()
[all …]
/net/ipv6/netfilter/
Dip6t_REJECT.c52 struct dst_entry *dst = NULL; in send_reset() local
104 dst = ip6_route_output(net, NULL, &fl6); in send_reset()
105 if (dst == NULL || dst->error) { in send_reset()
106 dst_release(dst); in send_reset()
109 dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), NULL, 0); in send_reset()
110 if (IS_ERR(dst)) in send_reset()
113 hh_len = (dst->dev->hard_header_len + 15)&~15; in send_reset()
114 nskb = alloc_skb(hh_len + 15 + dst->header_len + sizeof(struct ipv6hdr) in send_reset()
115 + sizeof(struct tcphdr) + dst->trailer_len, in send_reset()
120 dst_release(dst); in send_reset()
[all …]

12345678910>>...12