Lines Matching defs:sseq
81 * @sseq: pointer to dynamically-sized array of sub-sequences of this 'type';
155 struct sub_seq *sseq = kcalloc(cnt, sizeof(struct sub_seq), GFP_ATOMIC);
156 return sseq;
168 struct sub_seq *sseq = tipc_subseq_alloc(1);
170 if (!nseq || !sseq) {
173 kfree(sseq);
179 nseq->sseqs = sseq;
255 struct sub_seq *sseq;
258 sseq = nameseq_find_subseq(nseq, lower);
259 dbg("nameseq_ins: for seq %p, {%u,%u}, found sseq %p\n",
260 nseq, type, lower, sseq);
261 if (sseq) {
265 if ((sseq->lower != lower) || (sseq->upper != upper)) {
309 sseq = &nseq->sseqs[inspos];
311 memmove(sseq + 1, sseq, (freesseq - sseq) * sizeof (*sseq));
312 memset(sseq, 0, sizeof (*sseq));
314 sseq->lower = lower;
315 sseq->upper = upper;
318 dbg("inserting {%u,%u,%u} from <0x%x:%u> into sseq %p(%u,%u) of seq %p\n",
319 type, lower, upper, node, port, sseq,
320 sseq->lower, sseq->upper, nseq);
330 sseq->zone_list_size++;
331 if (!sseq->zone_list)
332 sseq->zone_list = publ->zone_list_next = publ;
334 publ->zone_list_next = sseq->zone_list->zone_list_next;
335 sseq->zone_list->zone_list_next = publ;
339 sseq->cluster_list_size++;
340 if (!sseq->cluster_list)
341 sseq->cluster_list = publ->cluster_list_next = publ;
344 sseq->cluster_list->cluster_list_next;
345 sseq->cluster_list->cluster_list_next = publ;
350 sseq->node_list_size++;
351 if (!sseq->node_list)
352 sseq->node_list = publ->node_list_next = publ;
354 publ->node_list_next = sseq->node_list->node_list_next;
355 sseq->node_list->node_list_next = publ;
393 struct sub_seq *sseq = nameseq_find_subseq(nseq, inst);
398 if (!sseq)
401 dbg("tipc_nameseq_remove_publ: seq: %p, sseq %p, {%u,%u}, key %u\n",
402 nseq, sseq, nseq->type, inst, key);
406 prev = sseq->zone_list;
407 publ = sseq->zone_list->zone_list_next;
412 if (prev == sseq->zone_list) {
419 if (publ != sseq->zone_list)
423 sseq->zone_list = publ->zone_list_next;
425 sseq->zone_list = NULL;
427 sseq->zone_list_size--;
432 prev = sseq->cluster_list;
433 curr = sseq->cluster_list->cluster_list_next;
437 if (prev == sseq->cluster_list) {
448 if (publ != sseq->cluster_list)
452 sseq->cluster_list = publ->cluster_list_next;
454 sseq->cluster_list = NULL;
456 sseq->cluster_list_size--;
463 prev = sseq->node_list;
464 curr = sseq->node_list->node_list_next;
468 if (prev == sseq->node_list) {
479 if (publ != sseq->node_list)
483 sseq->node_list = publ->node_list_next;
485 sseq->node_list = NULL;
487 sseq->node_list_size--;
493 if (!sseq->zone_list) {
495 memmove(sseq, sseq + 1, (free - (sseq + 1)) * sizeof (*sseq));
522 struct sub_seq *sseq = nseq->sseqs;
526 if (!sseq)
529 while (sseq != &nseq->sseqs[nseq->first_free]) {
530 struct publication *zl = sseq->zone_list;
531 if (zl && tipc_subscr_overlap(s,sseq->lower,sseq->upper)) {
537 sseq->lower,
538 sseq->upper,
547 sseq++;
625 struct sub_seq *sseq;
637 sseq = nameseq_find_subseq(seq, instance);
638 if (unlikely(!sseq))
644 publ = sseq->node_list;
646 sseq->node_list = publ->node_list_next;
654 publ = sseq->cluster_list;
656 sseq->cluster_list = publ->cluster_list_next;
659 publ = sseq->zone_list;
661 sseq->zone_list = publ->zone_list_next;
668 publ = sseq->node_list;
670 sseq->node_list = publ->node_list_next;
674 publ = sseq->cluster_list;
676 sseq->cluster_list = publ->cluster_list_next;
680 publ = sseq->zone_list;
682 sseq->zone_list = publ->zone_list_next;
710 struct sub_seq *sseq;
721 sseq = seq->sseqs + nameseq_locate_subseq(seq, lower);
723 for (; sseq != sseq_stop; sseq++) {
726 if (sseq->lower > upper)
729 publ = sseq->node_list;
735 } while (publ != sseq->node_list);
738 if (sseq->cluster_list_size != sseq->node_list_size)
876 static void subseq_list(struct sub_seq *sseq, struct print_buf *buf, u32 depth,
881 struct publication *publ = sseq->zone_list;
883 tipc_printf(buf, "%-10u %-10u ", sseq->lower, sseq->upper);
908 if (publ == sseq->zone_list)
924 struct sub_seq *sseq;
937 for (sseq = seq->sseqs; sseq != &seq->sseqs[seq->first_free]; sseq++) {
938 if ((lowbound <= sseq->upper) && (upbound >= sseq->lower)) {
941 subseq_list(sseq, buf, depth, index);