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()
550 struct mlxsw_sp_hdroom hdroom; in mlxsw_sp_dcbnl_ieee_setpfc() local
559 orig_hdroom = *mlxsw_sp_port->hdroom; in mlxsw_sp_dcbnl_ieee_setpfc()
561 hdroom = orig_hdroom; in mlxsw_sp_dcbnl_ieee_setpfc()
563 hdroom.delay_bytes = DIV_ROUND_UP(pfc->delay, BITS_PER_BYTE); in mlxsw_sp_dcbnl_ieee_setpfc()
565 hdroom.delay_bytes = 0; in mlxsw_sp_dcbnl_ieee_setpfc()
568 hdroom.prios.prio[prio].lossy = !(pfc->pfc_en & BIT(prio)); in mlxsw_sp_dcbnl_ieee_setpfc()
570 mlxsw_sp_hdroom_bufs_reset_lossiness(&hdroom); in mlxsw_sp_dcbnl_ieee_setpfc()
571 mlxsw_sp_hdroom_bufs_reset_sizes(mlxsw_sp_port, &hdroom); in mlxsw_sp_dcbnl_ieee_setpfc()
573 err = mlxsw_sp_hdroom_configure(mlxsw_sp_port, &hdroom); in mlxsw_sp_dcbnl_ieee_setpfc()
598 struct mlxsw_sp_hdroom *hdroom = mlxsw_sp_port->hdroom; in mlxsw_sp_dcbnl_getbuffer() local
607 u32 bytes = mlxsw_sp_cells_bytes(mlxsw_sp, hdroom->bufs.buf[i].size_cells); in mlxsw_sp_dcbnl_getbuffer()
614 buf->total_size += mlxsw_sp_cells_bytes(mlxsw_sp, hdroom->int_buf.size_cells); in mlxsw_sp_dcbnl_getbuffer()
617 buf->prio2buffer[prio] = hdroom->prios.prio[prio].buf_idx; in mlxsw_sp_dcbnl_getbuffer()
626 struct mlxsw_sp_hdroom hdroom; in mlxsw_sp_dcbnl_setbuffer() local
630 hdroom = *mlxsw_sp_port->hdroom; in mlxsw_sp_dcbnl_setbuffer()
632 if (hdroom.mode != MLXSW_SP_HDROOM_MODE_TC) { in mlxsw_sp_dcbnl_setbuffer()
638 hdroom.prios.prio[prio].set_buf_idx = buf->prio2buffer[prio]; in mlxsw_sp_dcbnl_setbuffer()
642 hdroom.bufs.buf[i].set_size_cells = mlxsw_sp_bytes_cells(mlxsw_sp, in mlxsw_sp_dcbnl_setbuffer()
645 mlxsw_sp_hdroom_prios_reset_buf_idx(&hdroom); in mlxsw_sp_dcbnl_setbuffer()
646 mlxsw_sp_hdroom_bufs_reset_lossiness(&hdroom); in mlxsw_sp_dcbnl_setbuffer()
647 mlxsw_sp_hdroom_bufs_reset_sizes(mlxsw_sp_port, &hdroom); in mlxsw_sp_dcbnl_setbuffer()
648 return mlxsw_sp_hdroom_configure(mlxsw_sp_port, &hdroom); in mlxsw_sp_dcbnl_setbuffer()