Lines Matching refs:bin

82  * Each set effectively creates 32^2 virtual buckets (bin combinations)
182 /* Place the flow control entries in current bin on level 0 */
238 &sfb_allocation, 0, "SFB bin allocation");
530 /* clear/adjust bin statistics and flow control lists */
576 * Level 0: bin index at [0] for set 0; [2] for set 1
577 * Level 1: bin index at [1] for set 0; [3] for set 1
586 if (s == 0) /* set 0, bin index [0,1] */
588 else /* set 1, bin index [2,3] */
612 struct sfbbinstats *bin;
622 /* Level 0: bin index at [0] for set 0; [2] for set 1 */
624 bin = SFB_BINST(sp, 0, n, w);
625 if (bin->pkts >= sp->sfb_allocation)
626 sfb_increment_bin(sp, bin, SFB_BINFT(sp, 0, n, w), now);
628 /* Level 0: bin index at [1] for set 0; [3] for set 1 */
630 bin = SFB_BINST(sp, 1, n, w);
631 if (bin->pkts >= sp->sfb_allocation)
632 sfb_increment_bin(sp, bin, SFB_BINFT(sp, 1, n, w), now);
635 if (w == 0) /* set 0, bin index [0,1] */
637 else /* set 1, bin index [2,3] */
640 bin = SFB_BINST(sp, i, n, w);
641 if (bin->pkts >= sp->sfb_allocation) {
642 sfb_increment_bin(sp, bin,
658 sfb_adjust_bin(struct sfb *sp, struct sfbbinstats *bin, struct timespec *ft,
677 SFB_PMARK_INC(bin);
679 SFB_PMARK_DEC(bin);
683 sfb_decrement_bin(struct sfb *sp, struct sfbbinstats *bin, struct timespec *ft,
686 return (sfb_adjust_bin(sp, bin, ft, now, FALSE));
690 sfb_increment_bin(struct sfb *sp, struct sfbbinstats *bin, struct timespec *ft,
693 return (sfb_adjust_bin(sp, bin, ft, now, TRUE));
702 struct sfbbinstats *bin;
713 /* Level 0: bin index at [0] for set 0; [2] for set 1 */
715 bin = SFB_BINST(sp, 0, n, s);
717 VERIFY(bin->pkts > 0);
718 if (--bin->pkts == 0) {
719 sfb_decrement_bin(sp, bin, SFB_BINFT(sp, 0, n, s), now);
721 if (bin->pkts <= (sp->sfb_allocation >> 2)) {
728 /* Level 1: bin index at [1] for set 0; [3] for set 1 */
730 bin = SFB_BINST(sp, 1, n, s);
732 VERIFY(bin->pkts > 0);
733 if (--bin->pkts == 0)
734 sfb_decrement_bin(sp, bin, SFB_BINFT(sp, 1, n, s), now);
737 if (s == 0) /* set 0, bin index [0,1] */
739 else /* set 1, bin index [2,3] */
742 bin = SFB_BINST(sp, i, n, s);
744 VERIFY(bin->pkts > 0);
745 if (--bin->pkts == 0) {
746 sfb_decrement_bin(sp, bin,
749 if (bin->pkts <= (sp->sfb_allocation >> 2)) {
776 /* Level 0: bin index at [0] for set 0; [2] for set 1 */
779 /* Level 1: bin index at [1] for set 0; [3] for set 1 */
783 if (s == 0) /* set 0, bin index [0,1] */
785 else /* set 1, bin index [2,3] */
835 * early-drop probability is kept in pmark of each bin of the flow
844 struct sfbbinstats *bin;
856 /* Level 0: bin index at [0] for set 0; [2] for set 1 */
858 bin = SFB_BINST(sp, 0, n, s);
859 if (*pmin > (u_int16_t)bin->pmark)
860 *pmin = (u_int16_t)bin->pmark;
862 if (bin->pkts >= sp->sfb_allocation) {
863 if (bin->pkts >= sp->sfb_drop_thresh)
865 sfb_increment_bin(sp, bin, SFB_BINFT(sp, 0, n, s), now);
868 /* Level 1: bin index at [1] for set 0; [3] for set 1 */
870 bin = SFB_BINST(sp, 1, n, s);
871 if (*pmin > (u_int16_t)bin->pmark)
872 *pmin = (u_int16_t)bin->pmark;
874 if (bin->pkts >= sp->sfb_allocation) {
875 if (bin->pkts >= sp->sfb_drop_thresh)
877 sfb_increment_bin(sp, bin, SFB_BINFT(sp, 1, n, s), now);
881 if (s == 0) /* set 0, bin index [0,1] */
883 else /* set 1, bin index [2,3] */
886 bin = SFB_BINST(sp, i, n, s);
887 if (*pmin > (u_int16_t)bin->pmark)
888 *pmin = (u_int16_t)bin->pmark;
890 if (bin->pkts >= sp->sfb_allocation) {
891 if (bin->pkts >= sp->sfb_drop_thresh)
893 sfb_increment_bin(sp, bin,
1065 * and thus bin information for these packets is not known, we do