Lines Matching full:sample
100 if (rtnl_dereference(mlxsw_sp_port->sample)) { in mlxsw_sp_mall_port_sample_add()
101 netdev_err(mlxsw_sp_port->dev, "sample already active\n"); in mlxsw_sp_mall_port_sample_add()
104 rcu_assign_pointer(mlxsw_sp_port->sample, &mall_entry->sample); in mlxsw_sp_mall_port_sample_add()
107 mall_entry->sample.rate); in mlxsw_sp_mall_port_sample_add()
113 RCU_INIT_POINTER(mlxsw_sp_port->sample, NULL); in mlxsw_sp_mall_port_sample_add()
120 if (!mlxsw_sp_port->sample) in mlxsw_sp_mall_port_sample_del()
124 RCU_INIT_POINTER(mlxsw_sp_port->sample, NULL); in mlxsw_sp_mall_port_sample_del()
242 NL_SET_ERR_MSG(f->common.extack, "Sample is not supported on egress"); in mlxsw_sp_mall_replace()
252 if (act->sample.rate > MLXSW_REG_MPSC_RATE_MAX) { in mlxsw_sp_mall_replace()
253 NL_SET_ERR_MSG(f->common.extack, "Sample rate not supported"); in mlxsw_sp_mall_replace()
258 mall_entry->sample.psample_group = act->sample.psample_group; in mlxsw_sp_mall_replace()
259 mall_entry->sample.truncate = act->sample.truncate; in mlxsw_sp_mall_replace()
260 mall_entry->sample.trunc_size = act->sample.trunc_size; in mlxsw_sp_mall_replace()
261 mall_entry->sample.rate = act->sample.rate; in mlxsw_sp_mall_replace()
312 kfree_rcu(mall_entry, rcu); /* sample RX packets may be in-flight */ in mlxsw_sp_mall_destroy()