ceil
static inline u32 prandom_u32_below(struct rnd_state *rng, u32 ceil)
return prandom_u32_state(rng) % ceil;
u32 floor, u32 ceil)
return floor + prandom_u32_below(rng, ceil - floor + 1);
u32 __get_random_u32_below(u32 ceil)
if (unlikely(!ceil))
mult = (u64)ceil * rand;
if (unlikely((u32)mult < ceil)) {
u32 bound = -ceil % ceil;
mult = (u64)ceil * get_random_u32();
double ceil = dml_ceil(val, 1);
return ceil;
int floor, ceil, mid;
ceil = lv0104cs_calibscales[i + 1].val * 1000000
mid = (floor + ceil) / 2;
if (calibscale >= mid && calibscale <= ceil) {
ceil((s32) (pNode->max_ - f_Center), (s32) f_Step);
maxrate = (node->rate > node->ceil) ? node->rate : node->ceil;
u32 parent_classid, u64 rate, u64 ceil,
classid, parent_classid, rate, ceil, prio, quantum);
ceil, quantum, qid, static_cfg);
u16 child_classid, u64 rate, u64 ceil, u64 prio,
classid, child_classid, rate, ceil);
prio, rate, ceil, quantum,
htb->rate, htb->ceil,
htb->ceil, htb->prio,
txschq_node->ceil = 0;
u16 classid, u32 prio, u64 rate, u64 ceil,
node->ceil = otx2_convert_rate(ceil);
u64 ceil;
static void mlx5e_htb_convert_ceil(struct mlx5e_htb *htb, u64 ceil, u32 *max_average_bw)
*max_average_bw = max_t(u32, div_u64(ceil, BYTES_IN_MBIT), 1);
ceil, *max_average_bw);
u32 parent_classid, u64 rate, u64 ceil,
classid, parent_classid, rate, ceil);
mlx5e_htb_convert_ceil(htb, ceil, &node->max_average_bw);
u64 rate, u64 ceil, struct netlink_ext_ack *extack)
classid, child_classid, rate, ceil);
mlx5e_htb_convert_ceil(htb, ceil, &child->max_average_bw);
mlx5e_htb_node_modify(struct mlx5e_htb *htb, u16 classid, u64 rate, u64 ceil,
classid, rate, ceil);
mlx5e_htb_convert_ceil(htb, ceil, &max_average_bw);
u32 parent_classid, u64 rate, u64 ceil,
u64 rate, u64 ceil, struct netlink_ext_ack *extack);
mlx5e_htb_node_modify(struct mlx5e_htb *htb, u16 classid, u64 rate, u64 ceil,
htb_qopt->rate, htb_qopt->ceil, htb_qopt->extack);
htb_qopt->rate, htb_qopt->ceil, htb_qopt->extack);
return mlx5e_htb_node_modify(htb, htb_qopt->classid, htb_qopt->rate, htb_qopt->ceil,
val = FIELD_GET(GENMASK(2, 0), port_cfg.ceil);
val = FIELD_GET(GENMASK(10, 3), port_cfg.ceil);
queue_cfg[i].ceil);
queue_cfg[i].ceil);
.ceil = 1146,
.ceil = 250,
.ceil = 250,
.ceil = 250,
.ceil = 1200,
.ceil = 250,
unsigned int ceil;
unsigned int ceil;
cycles_in_1us = ceil(clk_freq, HZ_PER_MHZ);
cycles_in_1us = ceil(clki->max_freq, HZ_PER_MHZ);
cycles_in_1us = ceil(clki->max_freq, HZ_PER_MHZ);
cycles_in_1us = ceil(clk_get_rate(clki->clk), HZ_PER_MHZ);
static inline u32 get_random_u32_inclusive(u32 floor, u32 ceil)
BUILD_BUG_ON_MSG(__builtin_constant_p(floor) && __builtin_constant_p(ceil) &&
(floor > ceil || ceil - floor == U32_MAX),
return floor + get_random_u32_below(ceil - floor + 1);
u32 __get_random_u32_below(u32 ceil);
static inline u32 get_random_u32_below(u32 ceil)
if (!__builtin_constant_p(ceil))
return __get_random_u32_below(ceil);
BUILD_BUG_ON_MSG(!ceil, "get_random_u32_below() must take ceil > 0");
if (ceil <= 1)
if (ceil <= 1U << 8) {
u32 mult = ceil * get_random_u8();
if (likely(is_power_of_2(ceil) || (u8)mult >= (1U << 8) % ceil))
} else if (ceil <= 1U << 16) {
u32 mult = ceil * get_random_u16();
if (likely(is_power_of_2(ceil) || (u16)mult >= (1U << 16) % ceil))
u64 mult = (u64)ceil * get_random_u32();
if (likely(is_power_of_2(ceil) || (u32)mult >= -ceil % ceil))
u64 ceil;
struct tc_ratespec ceil;
static inline u32 prandom_u32_below(u32 ceil)
ret = prandom_u32_state(&rng) % ceil;
unsigned long ceil = floor + PUD_SIZE;
if (floor >= vma->vm_start && ceil <= vma->vm_end) {
hugetlb_unshare_pmds(vma, floor, ceil, /* take_locks = */ false);
psched_ratecfg_getrate(&opt.ceil, &cl->ceil);
if ((cl->ceil.rate_bytes_ps >= (1ULL << 32)) &&
nla_put_u64_64bit(skb, TCA_HTB_CEIL64, cl->ceil.rate_bytes_ps,
if (!hopt->rate.rate || !hopt->ceil.rate)
if (hopt->rate.overhead || hopt->ceil.overhead) {
if (hopt->rate.mpu || hopt->ceil.mpu) {
if (hopt->ceil.linklayer == TC_LINKLAYER_UNAWARE)
qdisc_put_rtab(qdisc_get_rtab(&hopt->ceil, tb[TCA_HTB_CTAB],
.ceil = max_t(u64, hopt->ceil.rate, ceil64),
.ceil = max_t(u64, hopt->ceil.rate, ceil64),
.ceil = max_t(u64, hopt->ceil.rate, ceil64),
psched_ratecfg_precompute(&cl->ceil, &hopt->ceil, ceil64);
toks -= (s64) psched_l2t_ns(&cl->ceil, bytes);
struct psched_ratecfg ceil;
return ceil(val);
struct tc_ratespec ceil;
avg = ceil((double)(br_cntr[i] & ~ANNOTATION__BR_CNTR_SATURATED_FLAG) /
min_hit = ceil(node->children_hit * min_percent);
bool ceil)
return num_pages / n + !!(ceil && num_pages % n);