/net/core/ |
D | dst.c | 55 static void ___dst_free(struct dst_entry *dst); 70 struct dst_entry *dst, *next, head; in dst_gc_task() local 77 while ((dst = next) != NULL) { in dst_gc_task() 78 next = dst->next; in dst_gc_task() 81 if (likely(atomic_read(&dst->__refcnt))) { in dst_gc_task() 82 last->next = dst; in dst_gc_task() 83 last = dst; in dst_gc_task() 89 dst = dst_destroy(dst); in dst_gc_task() 90 if (dst) { in dst_gc_task() 99 if (dst->obsolete > 0) in dst_gc_task() [all …]
|
D | dst_cache.c | 23 struct dst_entry *dst; member 32 struct dst_entry *dst, u32 cookie) in dst_cache_per_cpu_dst_set() argument 34 dst_release(dst_cache->dst); in dst_cache_per_cpu_dst_set() 35 if (dst) in dst_cache_per_cpu_dst_set() 36 dst_hold(dst); in dst_cache_per_cpu_dst_set() 39 dst_cache->dst = dst; in dst_cache_per_cpu_dst_set() 45 struct dst_entry *dst; in dst_cache_per_cpu_get() local 47 dst = idst->dst; in dst_cache_per_cpu_get() 48 if (!dst) in dst_cache_per_cpu_get() 52 dst_hold(dst); in dst_cache_per_cpu_get() [all …]
|
/net/dsa/ |
D | dsa2.c | 28 struct dsa_switch_tree *dst; in dsa_get_dst() local 30 list_for_each_entry(dst, &dsa_switch_trees, list) in dsa_get_dst() 31 if (dst->tree == tree) { in dsa_get_dst() 32 kref_get(&dst->refcount); in dsa_get_dst() 33 return dst; in dsa_get_dst() 40 struct dsa_switch_tree *dst = container_of(ref, struct dsa_switch_tree, in dsa_free_dst() local 43 list_del(&dst->list); in dsa_free_dst() 44 kfree(dst); in dsa_free_dst() 47 static void dsa_put_dst(struct dsa_switch_tree *dst) in dsa_put_dst() argument 49 kref_put(&dst->refcount, dsa_free_dst); in dsa_put_dst() [all …]
|
D | dsa.c | 279 master = ds->dst->master_netdev; in dsa_cpu_port_ethtool_setup() 287 memcpy(&ds->dst->master_ethtool_ops, master->ethtool_ops, in dsa_cpu_port_ethtool_setup() 289 ds->dst->master_orig_ethtool_ops = master->ethtool_ops; in dsa_cpu_port_ethtool_setup() 290 memcpy(cpu_ops, &ds->dst->master_ethtool_ops, in dsa_cpu_port_ethtool_setup() 302 master = ds->dst->master_netdev; in dsa_cpu_port_ethtool_restore() 306 master->ethtool_ops = ds->dst->master_orig_ethtool_ops; in dsa_cpu_port_ethtool_restore() 312 struct dsa_switch_tree *dst = ds->dst; in dsa_switch_setup_one() local 329 if (dst->cpu_switch != -1) { in dsa_switch_setup_one() 330 netdev_err(dst->master_netdev, in dsa_switch_setup_one() 335 dst->cpu_switch = index; in dsa_switch_setup_one() [all …]
|
/net/sched/ |
D | em_meta.c | 104 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 …]
|
D | cls_flower.c | 155 skb_key.enc_ipv4.dst = key->u.ipv4.dst; in fl_classify() 161 skb_key.enc_ipv6.dst = key->u.ipv6.dst; in fl_classify() 415 fl_set_key_val(tb, key->eth.dst, TCA_FLOWER_KEY_ETH_DST, in fl_set_key() 416 mask->eth.dst, TCA_FLOWER_KEY_ETH_DST_MASK, in fl_set_key() 417 sizeof(key->eth.dst)); in fl_set_key() 449 fl_set_key_val(tb, &key->ipv4.dst, TCA_FLOWER_KEY_IPV4_DST, in fl_set_key() 450 &mask->ipv4.dst, TCA_FLOWER_KEY_IPV4_DST_MASK, in fl_set_key() 451 sizeof(key->ipv4.dst)); in fl_set_key() 457 fl_set_key_val(tb, &key->ipv6.dst, TCA_FLOWER_KEY_IPV6_DST, in fl_set_key() 458 &mask->ipv6.dst, TCA_FLOWER_KEY_IPV6_DST_MASK, in fl_set_key() [all …]
|
D | cls_rsvp.h | 79 __be32 dst[RSVP_DST_LEN]; member 103 static inline unsigned int hash_dst(__be32 *dst, u8 protocol, u8 tunnelid) in hash_dst() argument 105 unsigned int h = (__force __u32)dst[RSVP_DST_LEN - 1]; in hash_dst() 138 __be32 *dst, *src; in rsvp_classify() local 161 dst = &nhptr->daddr.s6_addr32[0]; in rsvp_classify() 166 dst = &nhptr->daddr; in rsvp_classify() 173 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/ipv6/ |
D | route.c | 81 static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie); 82 static unsigned int ip6_default_advmss(const struct dst_entry *dst); 83 static unsigned int ip6_mtu(const struct dst_entry *dst); 95 static void ip6_rt_update_pmtu(struct dst_entry *dst, struct sock *sk, 97 static void rt6_do_redirect(struct dst_entry *dst, struct sock *sk, 125 rt->dst.flags |= DST_NOCACHE; in rt6_uncached_list_add() 159 struct net_device *rt_dev = rt->dst.dev; in rt6_uncached_list_flush_dev() 167 rt->dst.dev = loopback_dev; in rt6_uncached_list_flush_dev() 168 dev_hold(rt->dst.dev); in rt6_uncached_list_flush_dev() 178 return dst_metrics_write_ptr(rt->dst.from); in rt6_pcpu_cow_metrics() [all …]
|
D | inet6_connection_sock.c | 78 struct dst_entry *dst; in inet6_csk_route_req() local 94 dst = ip6_dst_lookup_flow(sk, fl6, final_p); in inet6_csk_route_req() 95 if (IS_ERR(dst)) in inet6_csk_route_req() 98 return dst; in inet6_csk_route_req() 128 struct dst_entry *dst; in inet6_csk_route_socket() local 147 dst = __inet6_csk_dst_check(sk, np->dst_cookie); in inet6_csk_route_socket() 148 if (!dst) { in inet6_csk_route_socket() 149 dst = ip6_dst_lookup_flow(sk, fl6, final_p); in inet6_csk_route_socket() 151 if (!IS_ERR(dst)) in inet6_csk_route_socket() 152 ip6_dst_store(sk, dst, NULL, NULL); in inet6_csk_route_socket() [all …]
|
D | ip6_output.c | 64 struct dst_entry *dst = skb_dst(skb); in ip6_finish_output2() local 65 struct net_device *dev = dst->dev; in ip6_finish_output2() 106 if (lwtunnel_xmit_redirect(dst->lwtstate)) { in ip6_finish_output2() 114 nexthop = rt6_nexthop((struct rt6_info *)dst, &ipv6_hdr(skb)->daddr); in ip6_finish_output2() 115 neigh = __ipv6_neigh_lookup_noref(dst->dev, nexthop); in ip6_finish_output2() 117 neigh = __neigh_create(&nd_tbl, nexthop, dst->dev, false); in ip6_finish_output2() 119 ret = dst_neigh_output(dst, neigh, skb); in ip6_finish_output2() 125 IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES); in ip6_finish_output2() 188 struct dst_entry *dst = skb_dst(skb); in ip6_xmit() local 203 head_room += sizeof(struct ipv6hdr) + LL_RESERVED_SPACE(dst->dev); in ip6_xmit() [all …]
|
D | xfrm6_policy.c | 36 struct dst_entry *dst; in xfrm6_dst_lookup() local 47 dst = ip6_route_output(net, NULL, &fl6); in xfrm6_dst_lookup() 49 err = dst->error; in xfrm6_dst_lookup() 50 if (dst->error) { in xfrm6_dst_lookup() 51 dst_release(dst); in xfrm6_dst_lookup() 52 dst = ERR_PTR(err); in xfrm6_dst_lookup() 55 return dst; in xfrm6_dst_lookup() 62 struct dst_entry *dst; in xfrm6_get_saddr() local 65 dst = xfrm6_dst_lookup(net, 0, oif, NULL, daddr, mark); in xfrm6_get_saddr() 66 if (IS_ERR(dst)) in xfrm6_get_saddr() [all …]
|
D | icmp.c | 178 struct dst_entry *dst; in icmpv6_xrlim_allow() local 194 dst = ip6_route_output(net, sk, fl6); in icmpv6_xrlim_allow() 195 if (dst->error) { in icmpv6_xrlim_allow() 196 IP6_INC_STATS(net, ip6_dst_idev(dst), in icmpv6_xrlim_allow() 198 } else if (dst->dev && (dst->dev->flags&IFF_LOOPBACK)) { in icmpv6_xrlim_allow() 201 struct rt6_info *rt = (struct rt6_info *)dst; in icmpv6_xrlim_allow() 218 dst_release(dst); in icmpv6_xrlim_allow() 330 struct dst_entry *dst, *dst2; in icmpv6_route_lookup() local 334 err = ip6_dst_lookup(net, sk, &dst, fl6); in icmpv6_route_lookup() 342 if (ipv6_anycast_destination(dst, &fl6->daddr)) { in icmpv6_route_lookup() [all …]
|
D | netfilter.c | 25 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 err = dst->error; in ip6_route_me_harder() 38 IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES); in ip6_route_me_harder() 40 dst_release(dst); in ip6_route_me_harder() 47 skb_dst_set(skb, dst); in ip6_route_me_harder() 53 dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), skb->sk, 0); in ip6_route_me_harder() 54 if (IS_ERR(dst)) in ip6_route_me_harder() 55 return PTR_ERR(dst); in ip6_route_me_harder() 56 skb_dst_set(skb, dst); in ip6_route_me_harder() [all …]
|
/net/ceph/ |
D | armor.c | 4 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 …]
|
/net/decnet/ |
D | dn_route.c | 114 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, 154 static void dn_dst_destroy(struct dst_entry *dst) in dn_dst_destroy() argument 156 struct dn_route *rt = (struct dn_route *) dst; in dn_dst_destroy() 160 dst_destroy_metrics_generic(dst); in dn_dst_destroy() 163 static void dn_dst_ifdown(struct dst_entry *dst, struct net_device *dev, int how) in dn_dst_ifdown() argument 166 struct dn_route *rt = (struct dn_route *) dst; in dn_dst_ifdown() [all …]
|
/net/bridge/ |
D | br_nf_core.c | 28 static void fake_update_pmtu(struct dst_entry *dst, struct sock *sk, in fake_update_pmtu() argument 33 static void fake_redirect(struct dst_entry *dst, struct sock *sk, in fake_redirect() argument 38 static u32 *fake_cow_metrics(struct dst_entry *dst, unsigned long old) in fake_cow_metrics() argument 43 static struct neighbour *fake_neigh_lookup(const struct dst_entry *dst, in fake_neigh_lookup() argument 50 static unsigned int fake_mtu(const struct dst_entry *dst) in fake_mtu() argument 52 return dst->dev->mtu; in fake_mtu() 79 atomic_set(&rt->dst.__refcnt, 1); in br_netfilter_rtable_init() 80 rt->dst.dev = br->dev; in br_netfilter_rtable_init() 81 rt->dst.path = &rt->dst; in br_netfilter_rtable_init() 82 dst_init_metrics(&rt->dst, br_dst_default_metrics, true); in br_netfilter_rtable_init() [all …]
|
/net/ipv4/ |
D | route.c | 140 static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie); 141 static unsigned int ipv4_default_advmss(const struct dst_entry *dst); 142 static unsigned int ipv4_mtu(const struct dst_entry *dst); 143 static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst); 145 static void ip_rt_update_pmtu(struct dst_entry *dst, struct sock *sk, 147 static void ip_do_redirect(struct dst_entry *dst, struct sock *sk, 149 static void ipv4_dst_destroy(struct dst_entry *dst); 151 static u32 *ipv4_cow_metrics(struct dst_entry *dst, unsigned long old) in ipv4_cow_metrics() argument 157 static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst, 343 struct ip_rt_acct *dst, *src; in rt_acct_proc_show() local [all …]
|
D | tcp_metrics.c | 97 const struct dst_entry *dst, in tcpm_suck_dst() argument 106 if (dst_metric_locked(dst, RTAX_RTT)) in tcpm_suck_dst() 108 if (dst_metric_locked(dst, RTAX_RTTVAR)) in tcpm_suck_dst() 110 if (dst_metric_locked(dst, RTAX_SSTHRESH)) in tcpm_suck_dst() 112 if (dst_metric_locked(dst, RTAX_CWND)) in tcpm_suck_dst() 114 if (dst_metric_locked(dst, RTAX_REORDERING)) in tcpm_suck_dst() 118 msval = dst_metric_raw(dst, RTAX_RTT); in tcpm_suck_dst() 121 msval = dst_metric_raw(dst, RTAX_RTTVAR); in tcpm_suck_dst() 123 tm->tcpm_vals[TCP_METRIC_SSTHRESH] = dst_metric_raw(dst, RTAX_SSTHRESH); in tcpm_suck_dst() 124 tm->tcpm_vals[TCP_METRIC_CWND] = dst_metric_raw(dst, RTAX_CWND); in tcpm_suck_dst() [all …]
|
/net/ipv4/netfilter/ |
D | nf_nat_h323.c | 119 &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 …]
|
D | nf_conntrack_proto_icmp.c | 42 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 …]
|
/net/xfrm/ |
D | xfrm_policy.c | 54 static void xfrm_init_pmtu(struct dst_entry *dst); 55 static int stale_bundle(struct dst_entry *dst); 131 struct dst_entry *dst; in __xfrm_dst_lookup() local 137 dst = afinfo->dst_lookup(net, tos, oif, saddr, daddr, mark); in __xfrm_dst_lookup() 141 return dst; in __xfrm_dst_lookup() 153 struct dst_entry *dst; in xfrm_dst_lookup() local 164 dst = __xfrm_dst_lookup(net, tos, oif, saddr, daddr, family, mark); in xfrm_dst_lookup() 166 if (!IS_ERR(dst)) { in xfrm_dst_lookup() 173 return dst; in xfrm_dst_lookup() 1570 struct dst_entry *dst = &xdst->u.dst; in xfrm_bundle_flo_get() local [all …]
|
/net/netfilter/ |
D | nf_nat_sip.c | 107 newaddr = ct->tuplehash[!dir].tuple.dst.u3; in map_addr() 108 newport = ct->tuplehash[!dir].tuple.dst.u.udp.port; in map_addr() 109 } else if (nf_inet_addr_cmp(&ct->tuplehash[dir].tuple.dst.u3, addr) && in map_addr() 110 ct->tuplehash[dir].tuple.dst.u.udp.port == port) { in map_addr() 192 &ct->tuplehash[dir].tuple.dst.u3) || in nf_nat_sip() 193 port != ct->tuplehash[dir].tuple.dst.u.udp.port) in nf_nat_sip() 212 !nf_inet_addr_cmp(&addr, &ct->tuplehash[!dir].tuple.dst.u3)) { in nf_nat_sip() 214 &ct->tuplehash[!dir].tuple.dst.u3, in nf_nat_sip() 228 nf_inet_addr_cmp(&addr, &ct->tuplehash[dir].tuple.dst.u3) && in nf_nat_sip() 245 htons(n) == ct->tuplehash[dir].tuple.dst.u.udp.port && in nf_nat_sip() [all …]
|
D | xt_hashlimit.c | 67 __be32 dst; member 72 __be32 dst[4]; member 83 struct dsthash_dst dst; member 148 return !memcmp(&ent->dst, b, sizeof(ent->dst)); in dst_cmp() 152 hash_dst(const struct xt_hashlimit_htable *ht, const struct dsthash_dst *dst) in hash_dst() argument 154 u_int32_t hash = jhash2((const u32 *)dst, in hash_dst() 155 sizeof(*dst)/sizeof(u32), in hash_dst() 168 const struct dsthash_dst *dst) in dsthash_find() argument 171 u_int32_t hash = hash_dst(ht, dst); in dsthash_find() 175 if (dst_cmp(ent, dst)) { in dsthash_find() [all …]
|
/net/netfilter/ipvs/ |
D | ip_vs_nfct.c | 72 &(T)->dst.u3.ip, ntohs((T)->dst.u.all), \ 73 (T)->dst.protonum 121 if (new_tuple.dst.protonum != IPPROTO_ICMP && in ip_vs_update_conntrack() 122 new_tuple.dst.protonum != IPPROTO_ICMPV6) in ip_vs_update_conntrack() 125 new_tuple.dst.u3 = cp->vaddr; in ip_vs_update_conntrack() 126 if (new_tuple.dst.protonum != IPPROTO_ICMP && in ip_vs_update_conntrack() 127 new_tuple.dst.protonum != IPPROTO_ICMPV6) in ip_vs_update_conntrack() 128 new_tuple.dst.u.tcp.port = cp->vport; in ip_vs_update_conntrack() 168 ip_vs_conn_fill_param(net_ipvs(net), exp->tuple.src.l3num, orig->dst.protonum, in ip_vs_nfct_expect_callback() 170 &orig->dst.u3, orig->dst.u.tcp.port, &p); in ip_vs_nfct_expect_callback() [all …]
|
D | ip_vs_xmit.c | 75 struct dst_entry *dst, u32 dst_cookie) in __ip_vs_dst_set() argument 83 dest_dst->dst_cache = dst; in __ip_vs_dst_set() 96 struct dst_entry *dst; in __ip_vs_dst_check() local 100 dst = dest_dst->dst_cache; in __ip_vs_dst_check() 101 if (dst->obsolete && in __ip_vs_dst_check() 102 dst->ops->check(dst, dest_dst->dst_cookie) == NULL) in __ip_vs_dst_check() 162 return rt->dst.dev && rt->dst.dev->flags & IFF_LOOPBACK; in __ip_vs_is_local_route6() 212 ort->dst.ops->update_pmtu(&ort->dst, sk, NULL, mtu); in maybe_update_pmtu() 290 __ip_vs_dst_set(dest, dest_dst, &rt->dst, 0); in __ip_vs_get_out_rt() 294 atomic_read(&rt->dst.__refcnt)); in __ip_vs_get_out_rt() [all …]
|