Lines Matching refs:rtsc

340 hfsc_add_queue(struct hfsc_if *hif, struct service_curve *rtsc,
357 cl = hfsc_class_create(hif, rtsc, lssc, ulsc, parent,
1776 rtsc_init(struct runtime_sc *rtsc, struct internal_sc *isc, u_int64_t x,
1779 rtsc->x = x;
1780 rtsc->y = y;
1781 rtsc->sm1 = isc->sm1;
1782 rtsc->ism1 = isc->ism1;
1783 rtsc->dx = isc->dx;
1784 rtsc->dy = isc->dy;
1785 rtsc->sm2 = isc->sm2;
1786 rtsc->ism2 = isc->ism2;
1794 rtsc_y2x(struct runtime_sc *rtsc, u_int64_t y)
1798 if (y < rtsc->y)
1799 x = rtsc->x;
1800 else if (y <= rtsc->y + rtsc->dy) {
1802 if (rtsc->dy == 0)
1803 x = rtsc->x + rtsc->dx;
1805 x = rtsc->x + seg_y2x(y - rtsc->y, rtsc->ism1);
1808 x = rtsc->x + rtsc->dx
1809 + seg_y2x(y - rtsc->y - rtsc->dy, rtsc->ism2);
1815 rtsc_x2y(struct runtime_sc *rtsc, u_int64_t x)
1819 if (x <= rtsc->x)
1820 y = rtsc->y;
1821 else if (x <= rtsc->x + rtsc->dx)
1823 y = rtsc->y + seg_x2y(x - rtsc->x, rtsc->sm1);
1826 y = rtsc->y + rtsc->dy
1827 + seg_x2y(x - rtsc->x - rtsc->dx, rtsc->sm2);
1836 rtsc_min(struct runtime_sc *rtsc, struct internal_sc *isc, u_int64_t x,
1843 y1 = rtsc_x2y(rtsc, x);
1845 /* the current rtsc is smaller */
1847 rtsc->x = x;
1848 rtsc->y = y;
1854 * compute the two y values of the current rtsc
1858 y1 = rtsc_x2y(rtsc, x);
1860 /* rtsc is below isc, no change to rtsc */
1864 y2 = rtsc_x2y(rtsc, x + isc->dx);
1866 /* rtsc is above isc, replace rtsc by isc */
1867 rtsc->x = x;
1868 rtsc->y = y;
1869 rtsc->dx = isc->dx;
1870 rtsc->dy = isc->dy;
1882 * check if (x, y1) belongs to the 1st segment of rtsc.
1885 if (rtsc->x + rtsc->dx > x)
1886 dx += rtsc->x + rtsc->dx - x;
1889 rtsc->x = x;
1890 rtsc->y = y;
1891 rtsc->dx = dx;
1892 rtsc->dy = dy;