Home
last modified time | relevance | path

Searched refs:devcom (Results 1 – 18 of 18) sorted by relevance

/linux/drivers/net/ethernet/mellanox/mlx5/core/lib/
H A Ddevcom.c148 struct mlx5_devcom_comp_dev *devcom; in devcom_alloc_comp_dev() local
150 devcom = kzalloc(sizeof(*devcom), GFP_KERNEL); in devcom_alloc_comp_dev()
151 if (!devcom) in devcom_alloc_comp_dev()
155 devcom->devc = devc; in devcom_alloc_comp_dev()
156 devcom->comp = comp; in devcom_alloc_comp_dev()
157 rcu_assign_pointer(devcom->data, data); in devcom_alloc_comp_dev()
160 list_add_tail(&devcom->list, &comp->comp_dev_list_head); in devcom_alloc_comp_dev()
163 return devcom; in devcom_alloc_comp_dev()
167 devcom_free_comp_dev(struct mlx5_devcom_comp_dev *devcom) in devcom_free_comp_dev() argument
169 struct mlx5_devcom_comp *comp = devcom->comp; in devcom_free_comp_dev()
[all …]
H A Ddevcom.h30 void mlx5_devcom_unregister_component(struct mlx5_devcom_comp_dev *devcom);
32 int mlx5_devcom_send_event(struct mlx5_devcom_comp_dev *devcom,
35 int mlx5_devcom_comp_get_size(struct mlx5_devcom_comp_dev *devcom);
37 void mlx5_devcom_comp_set_ready(struct mlx5_devcom_comp_dev *devcom, bool ready);
38 bool mlx5_devcom_comp_is_ready(struct mlx5_devcom_comp_dev *devcom);
40 bool mlx5_devcom_for_each_peer_begin(struct mlx5_devcom_comp_dev *devcom);
41 void mlx5_devcom_for_each_peer_end(struct mlx5_devcom_comp_dev *devcom);
42 void *mlx5_devcom_get_next_peer_data(struct mlx5_devcom_comp_dev *devcom,
45 #define mlx5_devcom_for_each_peer_entry(devcom, data, pos) \ argument
46 for (pos = NULL, data = mlx5_devcom_get_next_peer_data(devcom, &pos); \
[all …]
H A Dsd.c19 struct mlx5_devcom_comp_dev *devcom; member
212 struct mlx5_devcom_comp_dev *devcom, *pos; in sd_register() local
218 devcom = mlx5_devcom_register_component(dev->priv.devc, MLX5_DEVCOM_SD_GROUP, in sd_register()
220 if (IS_ERR(devcom)) in sd_register()
221 return PTR_ERR(devcom); in sd_register()
223 sd->devcom = devcom; in sd_register()
225 if (mlx5_devcom_comp_get_size(devcom) != sd->host_buses) in sd_register()
228 mlx5_devcom_comp_lock(devcom); in sd_register()
229 mlx5_devcom_comp_set_ready(devcom, true); in sd_register()
230 mlx5_devcom_comp_unlock(devcom); in sd_register()
[all …]
H A Dipsec_fs_roce.c46 struct mlx5_devcom_comp_dev **devcom; member
385 if (!mlx5_devcom_for_each_peer_begin(*ipsec_roce->devcom)) in ipsec_fs_roce_tx_mpv_create()
388 peer_priv = mlx5_devcom_get_next_peer_data(*ipsec_roce->devcom, &tmp); in ipsec_fs_roce_tx_mpv_create()
409 mlx5_devcom_for_each_peer_end(*ipsec_roce->devcom); in ipsec_fs_roce_tx_mpv_create()
418 mlx5_devcom_for_each_peer_end(*ipsec_roce->devcom); in ipsec_fs_roce_tx_mpv_create()
455 if (!mlx5_devcom_for_each_peer_begin(*ipsec_roce->devcom)) in ipsec_fs_roce_rx_mpv_create()
458 peer_priv = mlx5_devcom_get_next_peer_data(*ipsec_roce->devcom, &tmp); in ipsec_fs_roce_rx_mpv_create()
539 mlx5_devcom_for_each_peer_end(*ipsec_roce->devcom); in ipsec_fs_roce_rx_mpv_create()
554 mlx5_devcom_for_each_peer_end(*ipsec_roce->devcom); in ipsec_fs_roce_rx_mpv_create()
580 if (!mlx5_devcom_for_each_peer_begin(*ipsec_roce->devcom)) in mlx5_ipsec_fs_roce_tx_destroy()
[all …]
H A Dipsec_fs_roce.h28 struct mlx5_devcom_comp_dev **devcom);
/linux/drivers/net/ethernet/mellanox/mlx5/core/lag/
H A Dmpesw.c132 struct mlx5_devcom_comp_dev *devcom; in mlx5_mpesw_work() local
135 devcom = mlx5_lag_get_devcom_comp(ldev); in mlx5_mpesw_work()
136 if (!devcom) in mlx5_mpesw_work()
139 mlx5_devcom_comp_lock(devcom); in mlx5_mpesw_work()
152 mlx5_devcom_comp_unlock(devcom); in mlx5_mpesw_work()
H A Dlag.c997 struct mlx5_devcom_comp_dev *devcom = NULL; in mlx5_lag_get_devcom_comp() local
1003 devcom = ldev->pf[i].dev->priv.hca_devcom_comp; in mlx5_lag_get_devcom_comp()
1008 return devcom; in mlx5_lag_get_devcom_comp()
1021 struct mlx5_devcom_comp_dev *devcom; in mlx5_do_bond_work() local
1024 devcom = mlx5_lag_get_devcom_comp(ldev); in mlx5_do_bond_work()
1025 if (!devcom) in mlx5_do_bond_work()
1028 status = mlx5_devcom_comp_trylock(devcom); in mlx5_do_bond_work()
1037 mlx5_devcom_comp_unlock(devcom); in mlx5_do_bond_work()
1044 mlx5_devcom_comp_unlock(devcom); in mlx5_do_bond_work()
/linux/drivers/net/ethernet/mellanox/mlx5/core/esw/
H A Dbridge_mcast.c545 struct mlx5_devcom_comp_dev *devcom = port->bridge->br_offloads->esw->devcom, *pos; in mlx5_esw_bridge_mcast_filter_flow_peer_create() local
549 if (!mlx5_devcom_for_each_peer_begin(devcom)) in mlx5_esw_bridge_mcast_filter_flow_peer_create()
552 mlx5_devcom_for_each_peer_entry(devcom, tmp, pos) { in mlx5_esw_bridge_mcast_filter_flow_peer_create()
567 mlx5_devcom_for_each_peer_end(devcom); in mlx5_esw_bridge_mcast_filter_flow_peer_create()
H A Dbridge.c655 struct mlx5_devcom_comp_dev *devcom = bridge->br_offloads->esw->devcom, *pos; in mlx5_esw_bridge_ingress_flow_peer_create() local
659 if (!mlx5_devcom_for_each_peer_begin(devcom)) in mlx5_esw_bridge_ingress_flow_peer_create()
662 mlx5_devcom_for_each_peer_entry(devcom, tmp, pos) { in mlx5_esw_bridge_ingress_flow_peer_create()
678 mlx5_devcom_for_each_peer_end(devcom); in mlx5_esw_bridge_ingress_flow_peer_create()
/linux/drivers/net/ethernet/mellanox/mlx5/core/
H A Den_rep.c472 mlx5_devcom_for_each_peer_entry(esw->devcom, peer_esw, tmp) { in mlx5e_sqs2vport_add_peers_rules()
517 if (mlx5_devcom_comp_is_ready(esw->devcom) && in mlx5e_sqs2vport_start()
518 mlx5_devcom_for_each_peer_begin(esw->devcom)) in mlx5e_sqs2vport_start()
554 mlx5_devcom_for_each_peer_end(esw->devcom); in mlx5e_sqs2vport_start()
562 mlx5_devcom_for_each_peer_end(esw->devcom); in mlx5e_sqs2vport_start()
H A Den_tc.c1695 mlx5_devcom_for_each_peer_entry_rcu(esw->devcom, esw, pos) { in mlx5e_tc_query_route_vport()
2163 struct mlx5_devcom_comp_dev *devcom = flow->priv->mdev->priv.eswitch->devcom; in mlx5e_tc_del_flow() local
2165 if (!mlx5_devcom_for_each_peer_begin(devcom)) { in mlx5e_tc_del_flow()
2171 mlx5_devcom_for_each_peer_end(devcom); in mlx5e_tc_del_flow()
4367 bool esw_paired = mlx5_devcom_comp_is_ready(esw_attr->in_mdev->priv.eswitch->devcom); in is_peer_flow_needed()
4634 struct mlx5_devcom_comp_dev *devcom = priv->mdev->priv.eswitch->devcom, *pos; in mlx5e_add_fdb_flow() local
4652 if (!mlx5_devcom_for_each_peer_begin(devcom)) { in mlx5e_add_fdb_flow()
4657 mlx5_devcom_for_each_peer_entry(devcom, peer_esw, pos) { in mlx5e_add_fdb_flow()
4663 mlx5_devcom_for_each_peer_end(devcom); in mlx5e_add_fdb_flow()
4670 mlx5_devcom_for_each_peer_end(devcom); in mlx5e_add_fdb_flow()
[all …]
H A Deswitch_offloads.c3025 mlx5_devcom_comp_set_ready(esw->devcom, true); in mlx5_esw_offloads_devcom_event()
3035 mlx5_devcom_comp_set_ready(esw->devcom, false); in mlx5_esw_offloads_devcom_event()
3077 esw->devcom = mlx5_devcom_register_component(esw->dev->priv.devc, in mlx5_esw_offloads_devcom_init()
3082 if (IS_ERR(esw->devcom)) in mlx5_esw_offloads_devcom_init()
3085 mlx5_devcom_send_event(esw->devcom, in mlx5_esw_offloads_devcom_init()
3093 if (IS_ERR_OR_NULL(esw->devcom)) in mlx5_esw_offloads_devcom_cleanup()
3096 mlx5_devcom_send_event(esw->devcom, in mlx5_esw_offloads_devcom_cleanup()
3101 mlx5_devcom_unregister_component(esw->devcom); in mlx5_esw_offloads_devcom_cleanup()
3103 esw->devcom = NULL; in mlx5_esw_offloads_devcom_cleanup()
3108 return mlx5_devcom_comp_is_ready(esw->devcom); in mlx5_esw_offloads_devcom_is_ready()
H A DMakefile18 lib/devcom.o lib/pci_vsc.o lib/dm.o lib/fs_ttc.o diag/fs_tracepoint.o \
H A Den_main.c213 mlx5_devcom_comp_set_ready(slave_priv->devcom, true); in mlx5e_devcom_event_mpv()
231 priv->devcom = mlx5_devcom_register_component(priv->mdev->priv.devc, in mlx5e_devcom_init_mpv()
236 if (IS_ERR(priv->devcom)) in mlx5e_devcom_init_mpv()
237 return PTR_ERR(priv->devcom); in mlx5e_devcom_init_mpv()
240 mlx5_devcom_send_event(priv->devcom, MPV_DEVCOM_MASTER_UP, in mlx5e_devcom_init_mpv()
250 if (IS_ERR_OR_NULL(priv->devcom)) in mlx5e_devcom_cleanup_mpv()
254 mlx5_devcom_send_event(priv->devcom, MPV_DEVCOM_MASTER_DOWN, in mlx5e_devcom_cleanup_mpv()
259 mlx5_devcom_unregister_component(priv->devcom); in mlx5e_devcom_cleanup_mpv()
H A Deswitch.h385 struct mlx5_devcom_comp_dev *devcom; member
H A Den.h941 struct mlx5_devcom_comp_dev *devcom; member
/linux/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
H A Dipsec.h310 int mlx5e_accel_ipsec_fs_init(struct mlx5e_ipsec *ipsec, struct mlx5_devcom_comp_dev **devcom);
H A Dipsec.c919 ret = mlx5e_accel_ipsec_fs_init(ipsec, &priv->devcom); in mlx5e_ipsec_init()