/net/bridge/ |
D | br_stp.c | 32 void br_log_state(const struct net_bridge_port *p) in br_log_state() argument 34 br_info(p->br, "port %u(%s) entered %s state\n", in br_log_state() 35 (unsigned int) p->port_no, p->dev->name, in br_log_state() 36 br_port_state_names[p->state]); in br_log_state() 42 struct net_bridge_port *p; in br_get_port() local 44 list_for_each_entry_rcu(p, &br->port_list, list) { in br_get_port() 45 if (p->port_no == port_no) in br_get_port() 46 return p; in br_get_port() 53 static int br_should_become_root_port(const struct net_bridge_port *p, in br_should_become_root_port() argument 60 br = p->br; in br_should_become_root_port() [all …]
|
D | br_if.c | 65 void br_port_carrier_check(struct net_bridge_port *p) in br_port_carrier_check() argument 67 struct net_device *dev = p->dev; in br_port_carrier_check() 68 struct net_bridge *br = p->br; in br_port_carrier_check() 70 if (!(p->flags & BR_ADMIN_COST) && in br_port_carrier_check() 72 p->path_cost = port_cost(dev); in br_port_carrier_check() 79 if (p->state == BR_STATE_DISABLED) in br_port_carrier_check() 80 br_stp_enable_port(p); in br_port_carrier_check() 82 if (p->state != BR_STATE_DISABLED) in br_port_carrier_check() 83 br_stp_disable_port(p); in br_port_carrier_check() 90 struct net_bridge_port *p in release_nbp() local [all …]
|
D | br_stp_if.c | 36 void br_init_port(struct net_bridge_port *p) in br_init_port() argument 38 p->port_id = br_make_port_id(p->priority, p->port_no); in br_init_port() 39 br_become_designated_port(p); in br_init_port() 40 p->state = BR_STATE_BLOCKING; in br_init_port() 41 p->topology_change_ack = 0; in br_init_port() 42 p->config_pending = 0; in br_init_port() 48 struct net_bridge_port *p; in br_stp_enable_bridge() local 56 list_for_each_entry(p, &br->port_list, list) { in br_stp_enable_bridge() 57 if (netif_running(p->dev) && netif_oper_up(p->dev)) in br_stp_enable_bridge() 58 br_stp_enable_port(p); in br_stp_enable_bridge() [all …]
|
D | br_sysfs_if.c | 38 static ssize_t show_##_name(struct net_bridge_port *p, char *buf) \ 40 return sprintf(buf, "%d\n", !!(p->flags & _mask)); \ 42 static int store_##_name(struct net_bridge_port *p, unsigned long v) \ 44 unsigned long flags = p->flags; \ 49 if (flags != p->flags) { \ 50 p->flags = flags; \ 51 br_ifinfo_notify(RTM_NEWLINK, p); \ 59 static ssize_t show_path_cost(struct net_bridge_port *p, char *buf) in show_path_cost() argument 61 return sprintf(buf, "%d\n", p->path_cost); in show_path_cost() 67 static ssize_t show_priority(struct net_bridge_port *p, char *buf) in show_priority() argument [all …]
|
D | br_stp_timer.c | 23 struct net_bridge_port *p; in br_is_designated_for_some_port() local 25 list_for_each_entry(p, &br->port_list, list) { in br_is_designated_for_some_port() 26 if (p->state != BR_STATE_DISABLED && in br_is_designated_for_some_port() 27 !memcmp(&p->designated_bridge, &br->bridge_id, 8)) in br_is_designated_for_some_port() 50 struct net_bridge_port *p = (struct net_bridge_port *) arg; in br_message_age_timer_expired() local 51 struct net_bridge *br = p->br; in br_message_age_timer_expired() 52 const bridge_id *id = &p->designated_bridge; in br_message_age_timer_expired() 55 if (p->state == BR_STATE_DISABLED) in br_message_age_timer_expired() 59 (unsigned int) p->port_no, p->dev->name, in br_message_age_timer_expired() 68 if (p->state == BR_STATE_DISABLED) in br_message_age_timer_expired() [all …]
|
D | br_netlink.c | 49 const struct net_bridge_port *p) in br_port_fill_attrs() argument 51 u8 mode = !!(p->flags & BR_HAIRPIN_MODE); in br_port_fill_attrs() 53 if (nla_put_u8(skb, IFLA_BRPORT_STATE, p->state) || in br_port_fill_attrs() 54 nla_put_u16(skb, IFLA_BRPORT_PRIORITY, p->priority) || in br_port_fill_attrs() 55 nla_put_u32(skb, IFLA_BRPORT_COST, p->path_cost) || in br_port_fill_attrs() 57 nla_put_u8(skb, IFLA_BRPORT_GUARD, !!(p->flags & BR_BPDU_GUARD)) || in br_port_fill_attrs() 58 nla_put_u8(skb, IFLA_BRPORT_PROTECT, !!(p->flags & BR_ROOT_BLOCK)) || in br_port_fill_attrs() 59 nla_put_u8(skb, IFLA_BRPORT_FAST_LEAVE, !!(p->flags & BR_MULTICAST_FAST_LEAVE))) in br_port_fill_attrs() 226 struct net_bridge_port *p, in br_afspec() argument 247 if (p) { in br_afspec() [all …]
|
/net/x25/ |
D | x25_facilities.c | 47 unsigned char *p; in x25_parse_facilities() local 71 p = skb->data + 1; in x25_parse_facilities() 74 switch (*p & X25_FAC_CLASS_MASK) { in x25_parse_facilities() 78 switch (*p) { in x25_parse_facilities() 80 if((p[1] & 0x81) == 0x81) { in x25_parse_facilities() 81 facilities->reverse = p[1] & 0x81; in x25_parse_facilities() 86 if((p[1] & 0x01) == 0x01) { in x25_parse_facilities() 87 facilities->reverse = p[1] & 0x01; in x25_parse_facilities() 92 if((p[1] & 0x80) == 0x80) { in x25_parse_facilities() 93 facilities->reverse = p[1] & 0x80; in x25_parse_facilities() [all …]
|
/net/irda/ |
D | parameters.c | 83 irda_param_t p; in irda_insert_no_value() local 86 p.pi = pi; in irda_insert_no_value() 87 p.pl = 0; in irda_insert_no_value() 90 ret = (*func)(self, &p, PV_GET); in irda_insert_no_value() 93 irda_param_pack(buf, "bb", p.pi, p.pl); in irda_insert_no_value() 110 irda_param_t p; in irda_extract_no_value() local 114 irda_param_unpack(buf, "bb", &p.pi, &p.pl); in irda_extract_no_value() 117 ret = (*func)(self, &p, PV_PUT); in irda_extract_no_value() 131 irda_param_t p; in irda_insert_integer() local 135 p.pi = pi; /* In case handler needs to know */ in irda_insert_integer() [all …]
|
/net/rose/ |
D | rose_subr.c | 239 static int rose_parse_national(unsigned char *p, struct rose_facilities_struct *facilities, int len) in rose_parse_national() argument 246 switch (*p & 0xC0) { in rose_parse_national() 250 p += 2; in rose_parse_national() 258 if (*p == FAC_NATIONAL_RAND) in rose_parse_national() 259 facilities->rand = ((p[1] << 8) & 0xFF00) + ((p[2] << 0) & 0x00FF); in rose_parse_national() 260 p += 3; in rose_parse_national() 268 p += 4; in rose_parse_national() 276 l = p[1]; in rose_parse_national() 279 if (*p == FAC_NATIONAL_DEST_DIGI) { in rose_parse_national() 283 memcpy(&facilities->source_digis[0], p + 2, AX25_ADDR_LEN); in rose_parse_national() [all …]
|
/net/sched/ |
D | sch_dsmark.c | 48 static inline int dsmark_valid_index(struct dsmark_qdisc_data *p, u16 index) in dsmark_valid_index() argument 50 return (index <= p->indices && index > 0); in dsmark_valid_index() 58 struct dsmark_qdisc_data *p = qdisc_priv(sch); in dsmark_graft() local 61 sch, p, new, old); in dsmark_graft() 71 *old = p->q; in dsmark_graft() 72 p->q = new; in dsmark_graft() 82 struct dsmark_qdisc_data *p = qdisc_priv(sch); in dsmark_leaf() local 83 return p->q; in dsmark_leaf() 115 struct dsmark_qdisc_data *p = qdisc_priv(sch); in dsmark_change() local 122 "arg 0x%lx\n", sch, p, classid, parent, *arg); in dsmark_change() [all …]
|
D | act_pedit.c | 48 struct tcf_pedit *p; in tcf_pedit_init() local 71 pc = tcf_hash_create(parm->index, est, a, sizeof(*p), bind, in tcf_pedit_init() 75 p = to_pedit(pc); in tcf_pedit_init() 86 p = to_pedit(pc); in tcf_pedit_init() 91 if (p->tcfp_nkeys && p->tcfp_nkeys != parm->nkeys) { in tcf_pedit_init() 98 spin_lock_bh(&p->tcf_lock); in tcf_pedit_init() 99 p->tcfp_flags = parm->flags; in tcf_pedit_init() 100 p->tcf_action = parm->action; in tcf_pedit_init() 102 kfree(p->tcfp_keys); in tcf_pedit_init() 103 p->tcfp_keys = keys; in tcf_pedit_init() [all …]
|
D | cls_tcindex.c | 65 tcindex_lookup(struct tcindex_data *p, u16 key) in tcindex_lookup() argument 69 if (p->perfect) in tcindex_lookup() 70 return tcindex_filter_is_set(p->perfect + key) ? in tcindex_lookup() 71 p->perfect + key : NULL; in tcindex_lookup() 72 else if (p->h) { in tcindex_lookup() 73 for (f = p->h[key % p->hash]; f; f = f->next) in tcindex_lookup() 85 struct tcindex_data *p = PRIV(tp); in tcindex_classify() local 87 int key = (skb->tc_index & p->mask) >> p->shift; in tcindex_classify() 90 skb, tp, res, p); in tcindex_classify() 92 f = tcindex_lookup(p, key); in tcindex_classify() [all …]
|
D | sch_atm.c | 72 struct atm_qdisc_data *p = qdisc_priv(sch); in lookup_flow() local 75 list_for_each_entry(flow, &p->flows, list) { in lookup_flow() 85 struct atm_qdisc_data *p = qdisc_priv(sch); in atm_tc_graft() local 89 sch, p, flow, new, old); in atm_tc_graft() 111 struct atm_qdisc_data *p __maybe_unused = qdisc_priv(sch); in atm_tc_get() 114 pr_debug("atm_tc_get(sch %p,[qdisc %p],classid %x)\n", sch, p, classid); in atm_tc_get() 135 struct atm_qdisc_data *p = qdisc_priv(sch); in atm_tc_put() local 138 pr_debug("atm_tc_put(sch %p,[qdisc %p],flow %p)\n", sch, p, flow); in atm_tc_put() 154 if (flow != &p->link) in atm_tc_put() 164 struct atm_qdisc_data *p = VCC2FLOW(vcc)->parent; in sch_atm_pop() local [all …]
|
D | act_nat.c | 53 struct tcf_nat *p; in tcf_nat_init() local 69 pc = tcf_hash_create(parm->index, est, a, sizeof(*p), bind, in tcf_nat_init() 73 p = to_tcf_nat(pc); in tcf_nat_init() 76 p = to_tcf_nat(pc); in tcf_nat_init() 83 spin_lock_bh(&p->tcf_lock); in tcf_nat_init() 84 p->old_addr = parm->old_addr; in tcf_nat_init() 85 p->new_addr = parm->new_addr; in tcf_nat_init() 86 p->mask = parm->mask; in tcf_nat_init() 87 p->flags = parm->flags; in tcf_nat_init() 89 p->tcf_action = parm->action; in tcf_nat_init() [all …]
|
/net/ceph/ |
D | osdmap.c | 55 static int crush_decode_uniform_bucket(void **p, void *end, in crush_decode_uniform_bucket() argument 58 dout("crush_decode_uniform_bucket %p to %p\n", *p, end); in crush_decode_uniform_bucket() 59 ceph_decode_need(p, end, (1+b->h.size) * sizeof(u32), bad); in crush_decode_uniform_bucket() 60 b->item_weight = ceph_decode_32(p); in crush_decode_uniform_bucket() 66 static int crush_decode_list_bucket(void **p, void *end, in crush_decode_list_bucket() argument 70 dout("crush_decode_list_bucket %p to %p\n", *p, end); in crush_decode_list_bucket() 77 ceph_decode_need(p, end, 2 * b->h.size * sizeof(u32), bad); in crush_decode_list_bucket() 79 b->item_weights[j] = ceph_decode_32(p); in crush_decode_list_bucket() 80 b->sum_weights[j] = ceph_decode_32(p); in crush_decode_list_bucket() 87 static int crush_decode_tree_bucket(void **p, void *end, in crush_decode_tree_bucket() argument [all …]
|
D | auth.c | 85 int ceph_entity_name_encode(const char *name, void **p, void *end) in ceph_entity_name_encode() argument 89 if (*p + 2*sizeof(u32) + len > end) in ceph_entity_name_encode() 91 ceph_encode_32(p, CEPH_ENTITY_TYPE_CLIENT); in ceph_entity_name_encode() 92 ceph_encode_32(p, len); in ceph_entity_name_encode() 93 ceph_encode_copy(p, name, len); in ceph_entity_name_encode() 104 void *p = monhdr + 1, *end = buf + len, *lenp; in ceph_auth_build_hello() local 114 ceph_encode_32(&p, 0); /* no protocol, yet */ in ceph_auth_build_hello() 116 lenp = p; in ceph_auth_build_hello() 117 p += sizeof(u32); in ceph_auth_build_hello() 119 ceph_decode_need(&p, end, 1 + sizeof(u32), bad); in ceph_auth_build_hello() [all …]
|
/net/mac80211/ |
D | debugfs_sta.c | 90 char buf[17*IEEE80211_NUM_ACS], *p = buf; in sta_num_ps_buf_frames_read() local 94 p += scnprintf(p, sizeof(buf)+buf-p, "AC%d: %d\n", ac, in sta_num_ps_buf_frames_read() 97 return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_num_ps_buf_frames_read() 138 char buf[15*IEEE80211_NUM_TIDS], *p = buf; in sta_last_seq_ctrl_read() local 142 p += scnprintf(p, sizeof(buf)+buf-p, "%x ", in sta_last_seq_ctrl_read() 144 p += scnprintf(p, sizeof(buf)+buf-p, "\n"); in sta_last_seq_ctrl_read() 145 return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_last_seq_ctrl_read() 152 char buf[71 + IEEE80211_NUM_TIDS * 40], *p = buf; in sta_agg_status_read() local 160 p += scnprintf(p, sizeof(buf) + buf - p, "next dialog_token: %#02x\n", in sta_agg_status_read() 162 p += scnprintf(p, sizeof(buf) + buf - p, in sta_agg_status_read() [all …]
|
D | rc80211_minstrel_ht_debugfs.c | 19 minstrel_ht_stats_dump(struct minstrel_ht_sta *mi, int i, char *p) in minstrel_ht_stats_dump() argument 28 return p; in minstrel_ht_stats_dump() 45 p += sprintf(p, "CCK/%cP ", j < 4 ? 'L' : 'S'); in minstrel_ht_stats_dump() 47 p += sprintf(p, "HT%c0/%cGI ", htmode, gimode); in minstrel_ht_stats_dump() 49 *(p++) = (idx == mi->max_tp_rate) ? 'T' : ' '; in minstrel_ht_stats_dump() 50 *(p++) = (idx == mi->max_tp_rate2) ? 't' : ' '; in minstrel_ht_stats_dump() 51 *(p++) = (idx == mi->max_prob_rate) ? 'P' : ' '; in minstrel_ht_stats_dump() 55 p += sprintf(p, " %2u.%1uM", r / 10, r % 10); in minstrel_ht_stats_dump() 57 p += sprintf(p, " MCS%-2u", (mg->streams - 1) * in minstrel_ht_stats_dump() 65 p += sprintf(p, " %6u.%1u %6u.%1u %6u.%1u " in minstrel_ht_stats_dump() [all …]
|
/net/sunrpc/auth_gss/ |
D | gss_rpc_xdr.c | 26 __be32 *p; in gssx_enc_bool() local 28 p = xdr_reserve_space(xdr, 4); in gssx_enc_bool() 29 if (unlikely(p == NULL)) in gssx_enc_bool() 31 *p = v ? xdr_one : xdr_zero; in gssx_enc_bool() 37 __be32 *p; in gssx_dec_bool() local 39 p = xdr_inline_decode(xdr, 4); in gssx_dec_bool() 40 if (unlikely(p == NULL)) in gssx_dec_bool() 42 *v = be32_to_cpu(*p); in gssx_dec_bool() 49 __be32 *p; in gssx_enc_buffer() local 51 p = xdr_reserve_space(xdr, sizeof(u32) + buf->len); in gssx_enc_buffer() [all …]
|
D | gss_krb5_mech.c | 190 simple_get_bytes(const void *p, const void *end, void *res, int len) in simple_get_bytes() argument 192 const void *q = (const void *)((const char *)p + len); in simple_get_bytes() 193 if (unlikely(q > end || q < p)) in simple_get_bytes() 195 memcpy(res, p, len); in simple_get_bytes() 200 simple_get_netobj(const void *p, const void *end, struct xdr_netobj *res) in simple_get_netobj() argument 205 p = simple_get_bytes(p, end, &len, sizeof(len)); in simple_get_netobj() 206 if (IS_ERR(p)) in simple_get_netobj() 207 return p; in simple_get_netobj() 208 q = (const void *)((const char *)p + len); in simple_get_netobj() 209 if (unlikely(q > end || q < p)) in simple_get_netobj() [all …]
|
/net/9p/ |
D | util.c | 55 struct p9_idpool *p; in p9_idpool_create() local 57 p = kmalloc(sizeof(struct p9_idpool), GFP_KERNEL); in p9_idpool_create() 58 if (!p) in p9_idpool_create() 61 spin_lock_init(&p->lock); in p9_idpool_create() 62 idr_init(&p->pool); in p9_idpool_create() 64 return p; in p9_idpool_create() 73 void p9_idpool_destroy(struct p9_idpool *p) in p9_idpool_destroy() argument 75 idr_destroy(&p->pool); in p9_idpool_destroy() 76 kfree(p); in p9_idpool_destroy() 88 int p9_idpool_get(struct p9_idpool *p) in p9_idpool_get() argument [all …]
|
/net/ipv6/ |
D | addrlabel.c | 131 static inline void ip6addrlbl_free(struct ip6addrlbl_entry *p) in ip6addrlbl_free() argument 134 release_net(p->lbl_net); in ip6addrlbl_free() 136 kfree(p); in ip6addrlbl_free() 144 static bool ip6addrlbl_hold(struct ip6addrlbl_entry *p) in ip6addrlbl_hold() argument 146 return atomic_inc_not_zero(&p->refcnt); in ip6addrlbl_hold() 149 static inline void ip6addrlbl_put(struct ip6addrlbl_entry *p) in ip6addrlbl_put() argument 151 if (atomic_dec_and_test(&p->refcnt)) in ip6addrlbl_put() 152 call_rcu(&p->rcu, ip6addrlbl_free_rcu); in ip6addrlbl_put() 157 const struct ip6addrlbl_entry *p, in __ip6addrlbl_match() argument 161 if (!net_eq(ip6addrlbl_net(p), net)) in __ip6addrlbl_match() [all …]
|
/net/dsa/ |
D | slave.c | 53 struct dsa_slave_priv *p = netdev_priv(dev); in dsa_slave_init() local 55 dev->iflink = p->parent->dst->master_netdev->ifindex; in dsa_slave_init() 62 struct dsa_slave_priv *p = netdev_priv(dev); in dsa_slave_open() local 63 struct net_device *master = p->parent->dst->master_netdev; in dsa_slave_open() 100 struct dsa_slave_priv *p = netdev_priv(dev); in dsa_slave_close() local 101 struct net_device *master = p->parent->dst->master_netdev; in dsa_slave_close() 118 struct dsa_slave_priv *p = netdev_priv(dev); in dsa_slave_change_rx_flags() local 119 struct net_device *master = p->parent->dst->master_netdev; in dsa_slave_change_rx_flags() 129 struct dsa_slave_priv *p = netdev_priv(dev); in dsa_slave_set_rx_mode() local 130 struct net_device *master = p->parent->dst->master_netdev; in dsa_slave_set_rx_mode() [all …]
|
/net/netfilter/ipvs/ |
D | ip_vs_conn.c | 118 static unsigned int ip_vs_conn_hashkey_param(const struct ip_vs_conn_param *p, in ip_vs_conn_hashkey_param() argument 124 if (p->pe_data && p->pe->hashkey_raw) in ip_vs_conn_hashkey_param() 125 return p->pe->hashkey_raw(p, ip_vs_conn_rnd, inverse) & in ip_vs_conn_hashkey_param() 129 addr = p->caddr; in ip_vs_conn_hashkey_param() 130 port = p->cport; in ip_vs_conn_hashkey_param() 132 addr = p->vaddr; in ip_vs_conn_hashkey_param() 133 port = p->vport; in ip_vs_conn_hashkey_param() 136 return ip_vs_conn_hashkey(p->net, p->af, p->protocol, addr, port); in ip_vs_conn_hashkey_param() 141 struct ip_vs_conn_param p; in ip_vs_conn_hashkey_conn() local 144 &cp->caddr, cp->cport, NULL, 0, &p); in ip_vs_conn_hashkey_conn() [all …]
|
D | ip_vs_pe_sip.c | 66 ip_vs_sip_fill_param(struct ip_vs_conn_param *p, struct sk_buff *skb) in ip_vs_sip_fill_param() argument 74 ip_vs_fill_iph_skb(p->af, skb, &iph); in ip_vs_sip_fill_param() 103 p->pe_data = kmemdup(dptr + matchoff, matchlen, GFP_ATOMIC); in ip_vs_sip_fill_param() 104 if (!p->pe_data) in ip_vs_sip_fill_param() 107 p->pe_data_len = matchlen; in ip_vs_sip_fill_param() 112 static bool ip_vs_sip_ct_match(const struct ip_vs_conn_param *p, in ip_vs_sip_ct_match() argument 118 if (ct->af == p->af && in ip_vs_sip_ct_match() 119 ip_vs_addr_equal(p->af, p->caddr, &ct->caddr) && in ip_vs_sip_ct_match() 122 ip_vs_addr_equal(p->protocol == IPPROTO_IP ? AF_UNSPEC : p->af, in ip_vs_sip_ct_match() 123 p->vaddr, &ct->vaddr) && in ip_vs_sip_ct_match() [all …]
|