Lines Matching refs:bw_meter

210 VNET_DEFINE_STATIC(struct bw_meter **, bw_meter_timers);
318 static void bw_meter_prepare_upcall(struct bw_meter *, struct timeval *);
320 static void bw_meter_receive_packet(struct bw_meter *, int,
331 static void free_bw_list(struct bw_meter *);
348 static void schedule_bw_meter(struct bw_meter *, struct timeval *);
354 static void unschedule_bw_meter(struct bw_meter *);
1172 * free the bw_meter entries
1455 * free the bw_meter entries
1458 struct bw_meter *x = rt->mfc_bw_meter;
1600 struct bw_meter *x;
1757 * Add a bw_meter entry
1766 struct bw_meter *x;
1788 * Find if we have already same bw_meter entry
1807 /* Allocate the new bw_meter entry */
1808 x = (struct bw_meter *)malloc(sizeof(*x), M_BWMETER, M_NOWAIT);
1814 /* Set the new bw_meter entry */
1826 /* Add the new bw_meter entry to the front of entries for this MFC */
1837 free_bw_list(struct bw_meter *list)
1840 struct bw_meter *x = list;
1849 * Delete one or multiple bw_meter entries
1855 struct bw_meter *x;
1869 * Delete all bw_meter entries for this mfc
1871 struct bw_meter *list;
1878 } else { /* Delete a single bw_meter entry */
1879 struct bw_meter *prev;
1884 /* Find the bw_meter entry to delete */
1902 /* Free the bw_meter entry */
1917 bw_meter_receive_packet(struct bw_meter *x, int plen, struct timeval *nowp)
1928 * Processing for ">=" type of bw_meter entry
1931 /* Reset the bw_meter entry */
1957 * Processing for "<=" type of bw_meter entry
1962 * scanning for "<=" type of bw_meter entries, so test now
1972 /* Reschedule the bw_meter entry */
2009 bw_meter_prepare_upcall(struct bw_meter *x, struct timeval *nowp)
2101 * Compute the timeout hash value for the bw_meter entries
2103 #define BW_METER_TIMEHASH(bw_meter, hash) \
2105 struct timeval next_timeval = (bw_meter)->bm_start_time; \
2107 BW_TIMEVALADD(&next_timeval, &(bw_meter)->bm_threshold.b_time); \
2115 * Schedule a timer to process periodically bw_meter entry of type "<="
2119 schedule_bw_meter(struct bw_meter *x, struct timeval *nowp)
2129 * Reset the bw_meter entry
2146 * Unschedule the periodic timer that processes bw_meter entry of type "<="
2150 unschedule_bw_meter(struct bw_meter *x)
2153 struct bw_meter *prev, *tmp;
2173 panic("unschedule_bw_meter: bw_meter entry not found");
2186 * Process all "<=" type of bw_meter that should be processed now,
2212 * Process all bins of bw_meter entries from the one after the last
2217 struct bw_meter *x, *tmp_list;
2222 /* Disconnect the list of bw_meter entries from the bin */
2226 /* Process the list of bw_meter entries */
2297 * table for processing all "<=" bw_meter entries.