Lines Matching refs:rtsc

246 	struct service_curve rtsc, lssc, ulsc;
265 rtsc.m1 = opts->rtsc_m1;
266 rtsc.d = opts->rtsc_d;
267 rtsc.m2 = opts->rtsc_m2;
275 cl = hfsc_class_create(hif, &rtsc, &lssc, &ulsc,
1493 rtsc_init(struct runtime_sc *rtsc, struct internal_sc * isc, u_int64_t x,
1496 rtsc->x = x;
1497 rtsc->y = y;
1498 rtsc->sm1 = isc->sm1;
1499 rtsc->ism1 = isc->ism1;
1500 rtsc->dx = isc->dx;
1501 rtsc->dy = isc->dy;
1502 rtsc->sm2 = isc->sm2;
1503 rtsc->ism2 = isc->ism2;
1511 rtsc_y2x(struct runtime_sc *rtsc, u_int64_t y)
1515 if (y < rtsc->y)
1516 x = rtsc->x;
1517 else if (y <= rtsc->y + rtsc->dy) {
1519 if (rtsc->dy == 0)
1520 x = rtsc->x + rtsc->dx;
1522 x = rtsc->x + seg_y2x(y - rtsc->y, rtsc->ism1);
1525 x = rtsc->x + rtsc->dx
1526 + seg_y2x(y - rtsc->y - rtsc->dy, rtsc->ism2);
1532 rtsc_x2y(struct runtime_sc *rtsc, u_int64_t x)
1536 if (x <= rtsc->x)
1537 y = rtsc->y;
1538 else if (x <= rtsc->x + rtsc->dx)
1540 y = rtsc->y + seg_x2y(x - rtsc->x, rtsc->sm1);
1543 y = rtsc->y + rtsc->dy
1544 + seg_x2y(x - rtsc->x - rtsc->dx, rtsc->sm2);
1553 rtsc_min(struct runtime_sc *rtsc, struct internal_sc *isc, u_int64_t x,
1560 y1 = rtsc_x2y(rtsc, x);
1562 /* the current rtsc is smaller */
1564 rtsc->x = x;
1565 rtsc->y = y;
1571 * compute the two y values of the current rtsc
1575 y1 = rtsc_x2y(rtsc, x);
1577 /* rtsc is below isc, no change to rtsc */
1581 y2 = rtsc_x2y(rtsc, x + isc->dx);
1583 /* rtsc is above isc, replace rtsc by isc */
1584 rtsc->x = x;
1585 rtsc->y = y;
1586 rtsc->dx = isc->dx;
1587 rtsc->dy = isc->dy;
1599 * check if (x, y1) belongs to the 1st segment of rtsc.
1602 if (rtsc->x + rtsc->dx > x)
1603 dx += rtsc->x + rtsc->dx - x;
1606 rtsc->x = x;
1607 rtsc->y = y;
1608 rtsc->dx = dx;
1609 rtsc->dy = dy;