Lines Matching refs:hdroom
71 struct mlxsw_sp_hdroom hdroom; in mlxsw_sp_port_headroom_ets_set() local
75 hdroom = *mlxsw_sp_port->hdroom; in mlxsw_sp_port_headroom_ets_set()
77 hdroom.prios.prio[prio].ets_buf_idx = ets->prio_tc[prio]; in mlxsw_sp_port_headroom_ets_set()
78 mlxsw_sp_hdroom_prios_reset_buf_idx(&hdroom); in mlxsw_sp_port_headroom_ets_set()
79 mlxsw_sp_hdroom_bufs_reset_lossiness(&hdroom); in mlxsw_sp_port_headroom_ets_set()
80 mlxsw_sp_hdroom_bufs_reset_sizes(mlxsw_sp_port, &hdroom); in mlxsw_sp_port_headroom_ets_set()
82 err = mlxsw_sp_hdroom_configure(mlxsw_sp_port, &hdroom); in mlxsw_sp_port_headroom_ets_set()
537 struct mlxsw_sp_hdroom hdroom; in mlxsw_sp_dcbnl_ieee_setpfc() local
546 orig_hdroom = *mlxsw_sp_port->hdroom; in mlxsw_sp_dcbnl_ieee_setpfc()
548 hdroom = orig_hdroom; in mlxsw_sp_dcbnl_ieee_setpfc()
550 hdroom.delay_bytes = DIV_ROUND_UP(pfc->delay, BITS_PER_BYTE); in mlxsw_sp_dcbnl_ieee_setpfc()
552 hdroom.delay_bytes = 0; in mlxsw_sp_dcbnl_ieee_setpfc()
555 hdroom.prios.prio[prio].lossy = !(pfc->pfc_en & BIT(prio)); in mlxsw_sp_dcbnl_ieee_setpfc()
557 mlxsw_sp_hdroom_bufs_reset_lossiness(&hdroom); in mlxsw_sp_dcbnl_ieee_setpfc()
558 mlxsw_sp_hdroom_bufs_reset_sizes(mlxsw_sp_port, &hdroom); in mlxsw_sp_dcbnl_ieee_setpfc()
560 err = mlxsw_sp_hdroom_configure(mlxsw_sp_port, &hdroom); in mlxsw_sp_dcbnl_ieee_setpfc()
585 struct mlxsw_sp_hdroom *hdroom = mlxsw_sp_port->hdroom; in mlxsw_sp_dcbnl_getbuffer() local
594 u32 bytes = mlxsw_sp_cells_bytes(mlxsw_sp, hdroom->bufs.buf[i].size_cells); in mlxsw_sp_dcbnl_getbuffer()
601 buf->total_size += mlxsw_sp_cells_bytes(mlxsw_sp, hdroom->int_buf.size_cells); in mlxsw_sp_dcbnl_getbuffer()
604 buf->prio2buffer[prio] = hdroom->prios.prio[prio].buf_idx; in mlxsw_sp_dcbnl_getbuffer()
613 struct mlxsw_sp_hdroom hdroom; in mlxsw_sp_dcbnl_setbuffer() local
617 hdroom = *mlxsw_sp_port->hdroom; in mlxsw_sp_dcbnl_setbuffer()
619 if (hdroom.mode != MLXSW_SP_HDROOM_MODE_TC) { in mlxsw_sp_dcbnl_setbuffer()
625 hdroom.prios.prio[prio].set_buf_idx = buf->prio2buffer[prio]; in mlxsw_sp_dcbnl_setbuffer()
629 hdroom.bufs.buf[i].set_size_cells = mlxsw_sp_bytes_cells(mlxsw_sp, in mlxsw_sp_dcbnl_setbuffer()
632 mlxsw_sp_hdroom_prios_reset_buf_idx(&hdroom); in mlxsw_sp_dcbnl_setbuffer()
633 mlxsw_sp_hdroom_bufs_reset_lossiness(&hdroom); in mlxsw_sp_dcbnl_setbuffer()
634 mlxsw_sp_hdroom_bufs_reset_sizes(mlxsw_sp_port, &hdroom); in mlxsw_sp_dcbnl_setbuffer()
635 return mlxsw_sp_hdroom_configure(mlxsw_sp_port, &hdroom); in mlxsw_sp_dcbnl_setbuffer()