Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | net/tipc/group.c |
static void tipc_group_open(struct tipc_member *m, bool *wakeup) {
*wakeup = false;
if (list_empty(&m->small_win))
return;
list_del_init(&m->small_win);
*m->group->open = true;
*wakeup = true;
} | [
1,
0
] |
Linux Kernel | net/tipc/group.c |
static void tipc_group_decr_active(struct tipc_group *grp,
struct tipc_member *m) {
if (m->state == MBR_ACTIVE || m->state == MBR_RECLAIMING ||
m->state == MBR_REMITTED)
grp->active_cnt--;
} | [
1,
0
] |
Linux Kernel | net/tipc/group.c | static int tipc_group_rcvbuf_limit(struct tipc_group *grp) {
int max_active, active_pool, idle_pool;
int mcnt = grp->member_cnt + 1;
max_active = min(mcnt / 8, 64);
max_active = max(max_active, 16);
grp->max_active = max_active;
/* Reserve blocks for active and idle members */
active_pool = max_active *... | [
0,
0
] |
Linux Kernel | net/tipc/group.c |
static bool tipc_group_is_receiver(struct tipc_member *m) {
return m && m->state != MBR_JOINING && m->state != MBR_LEAVING;
} | [
1,
0
] |
Linux Kernel | net/tipc/group.c |
static bool tipc_group_is_sender(struct tipc_member *m) {
return m && m->state != MBR_JOINING && m->state != MBR_PUBLISHED;
} | [
1,
0
] |
Linux Kernel | net/tipc/group.c |
u32 tipc_group_exclude(struct tipc_group *grp) {
if (!grp->loopback)
return grp->portid;
return 0;
} | [
0,
0
] |
Linux Kernel | net/tipc/group.c |
void tipc_group_delete(struct net *net, struct tipc_group *grp) {
struct rb_root *tree = &grp->members;
struct tipc_member *m, *tmp;
struct sk_buff_head xmitq;
__skb_queue_head_init(&xmitq);
rbtree_postorder_for_each_entry_safe(m, tmp, tree, tree_node) {
tipc_group_proto_xmit(grp, m, GRP_LEAVE_MSG, &xm... | [
0,
0
] |
Linux Kernel | net/tipc/group.c |
static struct tipc_member *tipc_group_find_member(struct tipc_group *grp,
u32 node, u32 port) {
struct rb_node *n = grp->members.rb_node;
u64 nkey, key = (u64)node << 32 | port;
struct tipc_member *m;
while (n) {
m = container_of(n, struct tipc_member, tre... | [
0,
0
] |
Linux Kernel | net/tipc/group.c |
static struct tipc_member *tipc_group_find_dest(struct tipc_group *grp,
u32 node, u32 port) {
struct tipc_member *m;
m = tipc_group_find_member(grp, node, port);
if (m && tipc_group_is_receiver(m))
return m;
return NULL;
} | [
0,
0
] |
Linux Kernel | net/tipc/group.c | bool tipc_group_bc_cong(struct tipc_group *grp, int len) {
struct tipc_member *m = NULL;
if (grp->bc_ackers) {
*grp->open = false;
return true;
}
if (list_empty(&grp->small_win))
return false;
m = list_first_entry(&grp->small_win, struct tipc_member, small_win);
if (m->window >= len)
retur... | [
0,
0
] |
Linux Kernel | net/tipc/group.c |
static void tipc_group_create_event(struct tipc_group *grp,
struct tipc_member *m, u32 event, u16 seqno,
struct sk_buff_head *inputq) {
u32 dnode = tipc_own_addr(grp->net);
struct tipc_event evt;
struct sk_buff *skb;
struct tipc_msg *hdr;
... | [
1,
0
] |
Linux Kernel | net/tipc/ib_media.c | static int tipc_ib_addr2str(struct tipc_media_addr *a, char *str_buf,
int str_size) {
if (str_size < 60)
return 1;
sprintf(str_buf, "%20phC", a->value);
return 0;
} | [
1,
0
] |
Linux Kernel | net/tipc/ib_media.c | static int tipc_ib_raw2addr(struct tipc_bearer *b, struct tipc_media_addr *addr,
const char *msg) {
memset(addr, 0, sizeof(*addr));
memcpy(addr->value, msg, INFINIBAND_ALEN);
addr->media_id = TIPC_MEDIA_TYPE_IB;
addr->broadcast = !memcmp(msg, b->bcast_addr.value, INFINIBAND_ALEN);
... | [
1,
0
] |
Linux Kernel | net/tipc/link.c | static int link_is_up(struct tipc_link *l) {
return l->state & (LINK_ESTABLISHED | LINK_SYNCHING);
} | [
0,
0
] |
Linux Kernel | net/tipc/link.c |
bool tipc_link_is_establishing(struct tipc_link *l) {
return l->state == LINK_ESTABLISHING;
} | [
0,
0
] |
Linux Kernel | net/tipc/link.c |
static bool link_is_bc_rcvlink(struct tipc_link *l) {
return ((l->bc_rcvlink == l) && !link_is_bc_sndlink(l));
} | [
0,
0
] |
Linux Kernel | net/tipc/link.c |
int tipc_link_max_win(struct tipc_link *l) { return l->max_win; } | [
0,
0
] |
Linux Kernel | net/tipc/link.c |
int tipc_link_prio(struct tipc_link *l) { return l->priority; } | [
0,
0
] |
Linux Kernel | net/tipc/link.c |
unsigned long tipc_link_tolerance(struct tipc_link *l) { return l->tolerance; } | [
0,
0
] |
Linux Kernel | net/tipc/link.c |
int tipc_link_bc_peers(struct tipc_link *l) { return l->ackers; } | [
0,
0
] |
Linux Kernel | net/tipc/link.c |
void tipc_link_set_mtu(struct tipc_link *l, int mtu) { l->mtu = mtu; } | [
0,
0
] |
Linux Kernel | net/tipc/link.c | static void link_profile_stats(struct tipc_link *l) {
struct sk_buff *skb;
struct tipc_msg *msg;
int length;
l->stats.accu_queue_sz += skb_queue_len(&l->transmq);
l->stats.queue_sz_counts++;
skb = skb_peek(&l->transmq);
if (!skb)
return;
msg = buf_msg(skb);
length = msg_size(msg);
if (msg_use... | [
0,
0
] |
Linux Kernel | net/tipc/link.c | static void tipc_link_set_skb_retransmit_time(struct sk_buff *skb,
struct tipc_link *l) {
if (link_is_bc_sndlink(l))
TIPC_SKB_CB(skb)->nxt_retr = TIPC_BC_RETR_LIM;
else
TIPC_SKB_CB(skb)->nxt_retr = TIPC_UC_RETR_TIME;
} | [
0,
0
] |
Linux Kernel | net/tipc/link.c | static bool tipc_data_input(struct tipc_link *l, struct sk_buff *skb,
struct sk_buff_head *inputq) {
struct sk_buff_head *mc_inputq = l->bc_rcvlink->inputq;
struct tipc_msg *hdr = buf_msg(skb);
switch (msg_user(hdr)) {
case TIPC_LOW_IMPORTANCE:
case TIPC_MEDIUM_IMPORTANCE:
case ... | [
1,
0
] |
Linux Kernel | net/tipc/link.c | u16 tipc_get_gap_ack_blks(struct tipc_gap_ack_blks **ga, struct tipc_link *l,
struct tipc_msg *hdr, bool uc) {
struct tipc_gap_ack_blks *p;
u16 sz = 0;
if (l->peer_caps & TIPC_GAP_ACK_BLOCK) {
p = (struct tipc_gap_ack_blks *)msg_data(hdr);
sz = ntohs(p->len);
/* Sanity check... | [
1,
0
] |
Linux Kernel | net/tipc/link.c | void tipc_link_build_reset_msg(struct tipc_link *l,
struct sk_buff_head *xmitq) {
int mtyp = RESET_MSG;
struct sk_buff *skb;
if (l->state == LINK_ESTABLISHING)
mtyp = ACTIVATE_MSG;
tipc_link_build_proto_msg(l, mtyp, 0, 0, 0, 0, 0, xmitq);
skb = skb_peek_tail(xmitq);
if ... | [
1,
0
] |
Linux Kernel | net/tipc/link.c | static int tipc_link_build_nack_msg(struct tipc_link *l,
struct sk_buff_head *xmitq) {
u32 def_cnt = ++l->stats.deferred_recv;
struct sk_buff_head *dfq = &l->deferdq;
u32 defq_len = skb_queue_len(dfq);
int match1, match2;
if (link_is_bc_rcvlink(l)) {
match1 = def_cnt &... | [
1,
0
] |
Linux Kernel | net/tipc/link.c | static void tipc_link_build_bc_init_msg(struct tipc_link *l,
struct sk_buff_head *xmitq) {
struct sk_buff_head list;
__skb_queue_head_init(&list);
if (!tipc_link_build_bc_proto_msg(l->bc_rcvlink, false, 0, &list))
return;
msg_set_bc_ack_invalid(buf_msg(skb_peek(&list... | [
0,
0
] |
Linux Kernel | net/tipc/link.c |
static void link_print(struct tipc_link *l, const char *str) {
struct sk_buff *hskb = skb_peek(&l->transmq);
u16 head = hskb ? msg_seqno(buf_msg(hskb)) : l->snd_nxt - 1;
u16 tail = l->snd_nxt - 1;
pr_info("%s Link <%s> state %x\n", str, l->name, l->state);
pr_info("XMTQ: %u [%u-%u], BKLGQ: %u, SNDNX: %u, RC... | [
1,
0
] |
Linux Kernel | net/tipc/link.c |
void tipc_link_set_abort_limit(struct tipc_link *l, u32 limit) {
l->abort_limit = limit;
} | [
0,
0
] |
Linux Kernel | net/tipc/monitor.c |
static inline u32 mon_cpu_to_le32(u32 val) { return (__force __u32)htonl(val); } | [
0,
0
] |
Linux Kernel | net/tipc/monitor.c |
static struct tipc_peer *peer_head(struct tipc_peer *peer) {
while (!peer->is_head)
peer = peer_prev(peer);
return peer;
} | [
0,
0
] |
Linux Kernel | net/tipc/monitor.c |
static inline bool tipc_mon_is_active(struct net *net,
struct tipc_monitor *mon) {
struct tipc_net *tn = tipc_net(net);
return mon->peer_cnt > tn->mon_threshold;
} | [
0,
0
] |
Linux Kernel | net/tipc/monitor.c | static void mon_apply_domain(struct tipc_monitor *mon, struct tipc_peer *peer) {
struct tipc_mon_domain *dom = peer->domain;
struct tipc_peer *member;
u32 addr;
int i;
if (!dom || !peer->is_up)
return;
peer->applied = 0;
member = peer_nxt(peer);
for (i = 0; i < dom->member_cnt; i++) {
addr = d... | [
0,
0
] |
Linux Kernel | net/tipc/monitor.c | static void mon_assign_roles(struct tipc_monitor *mon, struct tipc_peer *head) {
struct tipc_peer *peer = peer_nxt(head);
struct tipc_peer *self = mon->self;
int i = 0;
for (; peer != self; peer = peer_nxt(peer)) {
peer->is_local = false;
if (i++ < head->applied) {
peer->is_head = false;
i... | [
0,
0
] |
Linux Kernel | net/tipc/monitor.c | static bool tipc_mon_add_peer(struct tipc_monitor *mon, u32 addr,
struct tipc_peer **peer) {
struct tipc_peer *self = mon->self;
struct tipc_peer *cur, *prev, *p;
p = kzalloc(sizeof(*p), GFP_ATOMIC);
*peer = p;
if (!p)
return false;
p->addr = addr;
INIT_LIST_HEAD(&p->li... | [
0,
0
] |
Linux Kernel | net/tipc/monitor.c |
void tipc_mon_peer_up(struct net *net, u32 addr, int bearer_id) {
struct tipc_monitor *mon = tipc_monitor(net, bearer_id);
struct tipc_peer *self = get_self(net, bearer_id);
struct tipc_peer *peer, *head;
write_lock_bh(&mon->lock);
peer = get_peer(mon, addr);
if (!peer && !tipc_mon_add_peer(mon, addr, &pe... | [
0,
0
] |
Linux Kernel | net/tipc/monitor.c |
void tipc_mon_delete(struct net *net, int bearer_id) {
struct tipc_net *tn = tipc_net(net);
struct tipc_monitor *mon = tipc_monitor(net, bearer_id);
struct tipc_peer *self;
struct tipc_peer *peer, *tmp;
if (!mon)
return;
self = get_self(net, bearer_id);
write_lock_bh(&mon->lock);
tn->monitors[bea... | [
0,
0
] |
Linux Kernel | net/tipc/monitor.c |
static int __tipc_nl_add_monitor_peer(struct tipc_peer *peer,
struct tipc_nl_msg *msg) {
struct tipc_mon_domain *dom = peer->domain;
struct nlattr *attrs;
void *hdr;
hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family,
NLM_F_MULTI, TIP... | [
1,
0
] |
Linux Kernel | net/tipc/msg.c | int tipc_msg_fragment(struct sk_buff *skb, const struct tipc_msg *hdr,
int pktmax, struct sk_buff_head *frags) {
int pktno, nof_fragms, dsz, dmax, eat;
struct tipc_msg *_hdr;
struct sk_buff *_skb;
u8 *data;
if (skb_linearize(skb))
return -ENOMEM;
data = (u8 *)skb->data;
dsz = m... | [
1,
0
] |
Linux Kernel | net/tipc/msg.c | static bool tipc_msg_bundle(struct sk_buff *bskb, struct tipc_msg *msg,
u32 max) {
struct tipc_msg *bmsg = buf_msg(bskb);
u32 msz, bsz, offset, pad;
msz = msg_size(msg);
bsz = msg_size(bmsg);
offset = BUF_ALIGN(bsz);
pad = offset - bsz;
if (unlikely(skb_tailroom(bskb) < (pad ... | [
0,
0
] |
Linux Kernel | net/tipc/msg.c | bool tipc_msg_reverse(u32 own_node, struct sk_buff **skb, int err) {
struct sk_buff *_skb = *skb;
struct tipc_msg *_hdr, *hdr;
int hlen, dlen;
if (skb_linearize(_skb))
goto exit;
_hdr = buf_msg(_skb);
dlen = min_t(uint, msg_data_sz(_hdr), MAX_FORWARD_SIZE);
hlen = msg_hdr_sz(_hdr);
if (msg_dest_dr... | [
1,
0
] |
Linux Kernel | net/tipc/msg.c |
void tipc_skb_reject(struct net *net, int err, struct sk_buff *skb,
struct sk_buff_head *xmitq) {
if (tipc_msg_reverse(tipc_own_addr(net), &skb, err))
__skb_queue_tail(xmitq, skb);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline struct tipc_msg *buf_msg(struct sk_buff *skb) {
return (struct tipc_msg *)skb->data;
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_version(struct tipc_msg *m) {
msg_set_bits(m, 0, 29, 7, TIPC_VERSION);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline u32 msg_isdata(struct tipc_msg *m) {
return msg_user(m) <= TIPC_CRITICAL_IMPORTANCE;
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline u32 msg_data_sz(struct tipc_msg *m) {
return msg_size(m) - msg_hdr_sz(m);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_non_seq(struct tipc_msg *m, u32 n) {
msg_set_bits(m, 0, 20, 1, n);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline int msg_dest_droppable(struct tipc_msg *m) {
return msg_bits(m, 0, 19, 1);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline int msg_is_keepalive(struct tipc_msg *m) {
return msg_bits(m, 0, 19, 1);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline int msg_src_droppable(struct tipc_msg *m) {
return msg_bits(m, 0, 18, 1);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_size(struct tipc_msg *m, u32 sz) {
m->hdr[0] = htonl((msg_word(m, 0) & ~0x1ffff) | sz);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline u32 msg_connected(struct tipc_msg *m) {
return msg_type(m) == TIPC_CONN_MSG;
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_errcode(struct tipc_msg *m, u32 err) {
msg_set_bits(m, 1, 25, 0xf, err);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_bulk(struct tipc_msg *m) {
msg_set_bits(m, 1, 28, 0x1, 1);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline u32 msg_is_bulk(struct tipc_msg *m) {
return msg_bits(m, 1, 28, 0x1);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline u16 msg_dest_session(struct tipc_msg *m) {
return msg_bits(m, 1, 0, 0xffff);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_dest_session(struct tipc_msg *m, u16 n) {
msg_set_bits(m, 1, 0, 0xffff, n);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_prevnode(struct tipc_msg *m, u32 a) {
msg_set_word(m, 3, a);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline u32 msg_origport(struct tipc_msg *m) {
if (msg_user(m) == MSG_FRAGMENTER)
m = msg_inner_hdr(m);
return msg_word(m, 4);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_namelower(struct tipc_msg *m, u32 n) {
msg_set_word(m, 9, n);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline u32 msg_nameupper(struct tipc_msg *m) { return msg_word(m, 10); } | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline u32 msg_node_sig(struct tipc_msg *m) {
return msg_bits(m, 1, 0, 0xffff);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_node_capabilities(struct tipc_msg *m, u32 n) {
msg_set_bits(m, 1, 15, 0x1fff, n);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_nof_fragms(struct tipc_msg *m, u32 n) {
msg_set_bits(m, 4, 0, 0xffff, n);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_fragm_no(struct tipc_msg *m, u32 n) {
msg_set_bits(m, 4, 16, 0xffff, n);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_bc_netid(struct tipc_msg *m, u32 id) {
msg_set_word(m, 4, id);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h | static inline u16 msg_session(struct tipc_msg *m) {
return msg_bits(m, 5, 16, 0xffff);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_linkprio(struct tipc_msg *m, u32 n) {
msg_set_bits(m, 5, 4, 0x1f, n);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_peer_stopping(struct tipc_msg *m, u32 s) {
msg_set_bits(m, 5, 13, 0x1, s);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline bool msg_bc_ack_invalid(struct tipc_msg *m) {
switch (msg_user(m)) {
case BCAST_PROTOCOL:
case NAME_DISTRIBUTOR:
case LINK_PROTOCOL:
return msg_bits(m, 5, 14, 0x1);
default:
return false;
}
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline u16 msg_syncpt(struct tipc_msg *m) {
return msg_bits(m, 9, 16, 0xffff);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_max_pkt(struct tipc_msg *m, u32 n) {
msg_set_bits(m, 9, 16, 0xffff, (n / 4));
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_grp_bc_syncpt(struct tipc_msg *m, u16 n) {
msg_set_bits(m, 9, 16, 0xffff, n);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_grp_bc_acked(struct tipc_msg *m, u16 n) {
msg_set_bits(m, 9, 16, 0xffff, n);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline u16 msg_grp_bc_ack_req(struct tipc_msg *m) {
return msg_bits(m, 10, 0, 0x1);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_grp_bc_ack_req(struct tipc_msg *m, bool n) {
msg_set_bits(m, 10, 0, 0x1, n);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline u16 msg_grp_bc_seqno(struct tipc_msg *m) {
return msg_bits(m, 10, 16, 0xffff);
} | [
0,
0
] |
Linux Kernel | net/tipc/msg.h |
static inline void msg_set_node_id(struct tipc_msg *hdr, u8 *id) {
memcpy(msg_data(hdr), id, 16);
} | [
1,
0
] |
Linux Kernel | net/tipc/msg.h | static inline struct sk_buff *__tipc_skb_dequeue(struct sk_buff_head *list,
u16 seqno) {
struct sk_buff *skb = skb_peek(list);
if (skb && less_eq(buf_seqno(skb), seqno)) {
__skb_unlink(skb, list);
return skb;
}
return NULL;
}
#endif | [
0,
0
] |
Linux Kernel | net/tipc/name_distr.c | static void publ_to_item(struct distr_item *i, struct publication *p) {
i->type = htonl(p->sr.type);
i->lower = htonl(p->sr.lower);
i->upper = htonl(p->sr.upper);
i->port = htonl(p->sk.ref);
i->key = htonl(p->key);
} | [
0,
0
] |
Linux Kernel | net/tipc/name_distr.c | static bool tipc_update_nametbl(struct net *net, struct distr_item *i, u32 node,
u32 dtype) {
struct publication *p = NULL;
struct tipc_socket_addr sk;
struct tipc_uaddr ua;
u32 key = ntohl(i->key);
tipc_uaddr(&ua, TIPC_SERVICE_RANGE, TIPC_CLUSTER_SCOPE, ntohl(i->type),
... | [
0,
0
] |
Linux Kernel | net/tipc/name_distr.c | void tipc_named_rcv(struct net *net, struct sk_buff_head *namedq, u16 *rcv_nxt,
bool *open) {
struct tipc_net *tn = tipc_net(net);
struct distr_item *item;
struct tipc_msg *hdr;
struct sk_buff *skb;
u32 count, node;
spin_lock_bh(&tn->nametbl_lock);
while ((skb = tipc_named_dequeue(nam... | [
0,
1
] |
Linux Kernel | net/tipc/name_table.c | static struct service_range *service_range_match_next(struct rb_node *n,
u32 start, u32 end) {
struct service_range *sr;
struct rb_node *p, *r;
while (n) {
r = n->rb_right;
if (r && service_range_entry(r)->max >= start)
return service_range_mat... | [
1,
0
] |
Linux Kernel | net/tipc/name_table.c | static struct publication *
tipc_publ_create(struct tipc_uaddr *ua, struct tipc_socket_addr *sk, u32 key) {
struct publication *p = kzalloc(sizeof(*p), GFP_ATOMIC);
if (!p)
return NULL;
p->sr = ua->sr;
p->sk = *sk;
p->scope = ua->scope;
p->key = key;
INIT_LIST_HEAD(&p->binding_sock);
INIT_LIST_HEA... | [
0,
0
] |
Linux Kernel | net/tipc/name_table.c | static struct service_range *tipc_service_find_range(struct tipc_service *sc,
struct tipc_uaddr *ua) {
struct service_range *sr;
service_range_foreach_match(sr, sc, ua->sr.lower, ua->sr.upper) {
if (sr->lower == ua->sr.lower && sr->upper == ua->sr.upper)
... | [
1,
0
] |
Linux Kernel | net/tipc/name_table.c |
static struct service_range *tipc_service_create_range(struct tipc_service *sc,
struct publication *p) {
struct rb_node **n, *parent = NULL;
struct service_range *sr;
u32 lower = p->sr.lower;
u32 upper = p->sr.upper;
n = &sc->ranges.rb_node;
while (*n... | [
0,
0
] |
Linux Kernel | net/tipc/name_table.c | static bool tipc_service_insert_publ(struct net *net, struct tipc_service *sc,
struct publication *p) {
struct tipc_subscription *sub, *tmp;
struct service_range *sr;
struct publication *_p;
u32 node = p->sk.node;
bool first = false;
bool res = false;
u32 key = p->key;... | [
1,
0
] |
Linux Kernel | net/tipc/name_table.c | static int tipc_publ_sort(void *priv, const struct list_head *a,
const struct list_head *b) {
struct publication *pa, *pb;
pa = container_of(a, struct publication, list);
pb = container_of(b, struct publication, list);
return publication_after(pa, pb);
} | [
0,
0
] |
Linux Kernel | net/tipc/name_table.c |
static struct tipc_service *tipc_service_find(struct net *net,
struct tipc_uaddr *ua) {
struct name_table *nt = tipc_name_table(net);
struct hlist_head *service_head;
struct tipc_service *service;
service_head = &nt->services[hash(ua->sr.type)];
hlist_for_each_e... | [
0,
0
] |
Linux Kernel | net/tipc/name_table.c |
struct publication *tipc_nametbl_insert_publ(struct net *net,
struct tipc_uaddr *ua,
struct tipc_socket_addr *sk,
u32 key) {
struct tipc_service *sc;
struct publication *p;
p = ... | [
0,
0
] |
Linux Kernel | net/tipc/name_table.c | /* tipc_nametbl_lookup_group(): lookup destinaton(s) in a communication group
* Returns a list of one (== group anycast) or more (== group multicast)
* destination socket/node pairs matching the given address.
* The requester may or may not want to exclude himself from the list.
*/
bool tipc_nametbl_lookup_group(st... | [
1,
1
] |
Linux Kernel | net/tipc/name_table.c | void tipc_nametbl_lookup_mcast_nodes(struct net *net, struct tipc_uaddr *ua,
struct tipc_nlist *nodes) {
struct service_range *sr;
struct tipc_service *sc;
struct publication *p;
rcu_read_lock();
sc = tipc_service_find(net, ua);
if (!sc)
goto exit;
spin_lock_bh(&... | [
0,
0
] |
Linux Kernel | net/tipc/name_table.c | struct publication *tipc_nametbl_publish(struct net *net, struct tipc_uaddr *ua,
struct tipc_socket_addr *sk, u32 key) {
struct name_table *nt = tipc_name_table(net);
struct tipc_net *tn = tipc_net(net);
struct publication *p = NULL;
struct sk_buff *skb = NULL;
u32 rc_... | [
0,
0
] |
Linux Kernel | net/tipc/name_table.c | bool tipc_nametbl_subscribe(struct tipc_subscription *sub) {
struct tipc_net *tn = tipc_net(sub->net);
u32 type = sub->s.seq.type;
struct tipc_service *sc;
struct tipc_uaddr ua;
bool res = true;
tipc_uaddr(&ua, TIPC_SERVICE_RANGE, TIPC_NODE_SCOPE, type, sub->s.seq.lower,
sub->s.seq.upper);
s... | [
0,
0
] |
Linux Kernel | net/tipc/name_table.c |
static int __tipc_nl_service_range_list(struct tipc_nl_msg *msg,
struct tipc_service *sc,
u32 *last_lower, u32 *last_key) {
struct service_range *sr;
struct rb_node *n;
int err;
for (n = rb_first(&sc->ranges); n; n = rb_next(n)) {... | [
0,
0
] |
Linux Kernel | net/tipc/name_table.c |
bool tipc_dest_pop(struct list_head *l, u32 *node, u32 *port) {
struct tipc_dest *dst;
if (list_empty(l))
return false;
dst = list_first_entry(l, typeof(*dst), list);
if (port)
*port = dst->port;
if (node)
*node = dst->node;
list_del(&dst->list);
kfree(dst);
return true;
} | [
0,
0
] |
Linux Kernel | net/tipc/net.c |
static int __tipc_nl_addr_legacy_get(struct net *net, struct tipc_nl_msg *msg) {
struct tipc_net *tn = tipc_net(net);
struct nlattr *attrs;
void *hdr;
hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, 0,
TIPC_NL_ADDR_LEGACY_GET);
if (!hdr)
return -EMSGSIZE;
att... | [
0,
0
] |
Linux Kernel | net/tipc/net.c |
int tipc_nl_net_addr_legacy_get(struct sk_buff *skb, struct genl_info *info) {
struct net *net = sock_net(skb->sk);
struct tipc_nl_msg msg;
struct sk_buff *rep;
int err;
rep = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
if (!rep)
return -ENOMEM;
msg.skb = rep;
msg.portid = info->snd_portid;
msg.seq ... | [
0,
0
] |
Linux Kernel | net/tipc/netlink.c |
void tipc_netlink_stop(void) { genl_unregister_family(&tipc_genl_family); } | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.