Lines Matching defs:superblock
56 * A container that lets us sort a superblock to optimize the skip step jumps
66 * A superblock is a block of adjacent rules of similar action. If there
67 * are five PASS rules in a row, they all become members of a superblock.
68 * Once we have a superblock, we are free to re-order any rules within it
72 struct superblock {
74 TAILQ_ENTRY(superblock) sb_entry;
75 struct superblock *sb_profiled_block;
78 TAILQ_HEAD(superblocks, superblock);
86 BREAK, /* the field may not differ between rules in a superblock */
106 * superblock. Thus it will not be optimized. It also prevents the
119 * These fields must be the same between all rules in the same superblock.
210 int block_feedback(struct pfctl *, struct superblock *);
211 int combine_rules(struct pfctl *, struct superblock *);
218 int optimize_superblock(struct pfctl *, struct superblock *);
220 void remove_from_skipsteps(struct skiplist *, struct superblock *,
222 int remove_identical_rules(struct pfctl *, struct superblock *);
223 int reorder_rules(struct pfctl *, struct superblock *, int);
225 void skip_append(struct superblock *, int, struct pf_skip_step *,
237 int superblock_inclusive(struct superblock *, struct pf_opt_rule *);
238 void superblock_free(struct pfctl *, struct superblock *);
263 struct superblock *block;
360 * Go ahead and optimize a superblock
363 optimize_superblock(struct pfctl *pf, struct superblock *block)
389 * XXX keep last skiplist of last superblock to influence this
390 * superblock. '5 inet6 log' should make '3 inet6' come before '4
391 * inet' in the next superblock.
404 printf("--- Superblock ---\n");
430 * superblock might have been split into multiple superblocks.
434 printf("--- END Superblock ---\n");
444 remove_identical_rules(struct pfctl *pf, struct superblock *block)
486 combine_rules(struct pfctl *pf, struct superblock *block)
636 reorder_rules(struct pfctl *pf, struct superblock *block, int depth)
638 struct superblock *newblock;
672 * all of the rules in the superblock and those fields which differ
673 * between every rule in the superblock.
693 /* Ugh. There is NO commonality in the superblock on which
700 * Now we're going to empty the superblock rule list and re-create
754 * superblock and pass it back into the optimizer.
766 DEBUG("(%d) splitting off %d rules from superblock @ #%d",
810 block_feedback(struct pfctl *pf, struct superblock *block)
819 * Walk through all of the profiled superblock's rules and copy
842 * Now we pull all of the rules off the superblock and re-insert them
876 struct superblock *block, *blockcur;
983 skip_append(struct superblock *superblock, int skipnum,
994 TAILQ_REMOVE(&superblock->sb_skipsteps[skipnum],
1005 remove_from_skipsteps(struct skiplist *head, struct superblock *block,
1332 struct superblock *block = NULL;
1399 * Can a rule be included inside a superblock
1402 superblock_inclusive(struct superblock *block, struct pf_opt_rule *por)
1433 * Ergo interface groups become a defacto superblock break :-(
1456 DEBUG("superblock break @ %d due to %s",
1470 DEBUG("superblock break @ %d on %s+%xh",
1476 DEBUG("superblock break @ %d on field @ %d",
1622 superblock_free(struct pfctl *pf, struct superblock *block)