Home
last modified time | relevance | path

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

/linux/drivers/net/ethernet/mellanox/mlx5/core/lib/
H A Ddevcom.c150 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()
163 return devcom; in devcom_alloc_comp_dev()
176 kfree(devcom); in devcom_free_comp_dev()
185 return devcom->id == id && devcom->key == key; in devcom_component_equal()
243 if (IS_ERR(devcom)) in mlx5_devcom_register_component()
246 return devcom; in mlx5_devcom_register_component()
250 return devcom; in mlx5_devcom_register_component()
[all …]
H A Ddevcom.h32 int mlx5_devcom_send_event(struct mlx5_devcom_comp_dev *devcom,
35 int mlx5_devcom_comp_get_size(struct mlx5_devcom_comp_dev *devcom);
38 bool mlx5_devcom_comp_is_ready(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,
46 for (pos = NULL, data = mlx5_devcom_get_next_peer_data(devcom, &pos); \
48 data = mlx5_devcom_get_next_peer_data(devcom, &pos))
56 data = mlx5_devcom_get_next_peer_data_rcu(devcom, &pos))
58 void mlx5_devcom_comp_lock(struct mlx5_devcom_comp_dev *devcom);
59 void mlx5_devcom_comp_unlock(struct mlx5_devcom_comp_dev *devcom);
[all …]
H A Dsd.c19 struct mlx5_devcom_comp_dev *devcom; member
220 if (IS_ERR(devcom)) in sd_register()
221 return PTR_ERR(devcom); in sd_register()
223 sd->devcom = devcom; in sd_register()
228 mlx5_devcom_comp_lock(devcom); in sd_register()
230 mlx5_devcom_comp_unlock(devcom); in sd_register()
254 mlx5_devcom_for_each_peer_end(devcom); in sd_register()
258 mlx5_devcom_comp_lock(sd->devcom); in sd_register()
260 mlx5_devcom_comp_unlock(sd->devcom); in sd_register()
269 mlx5_devcom_comp_lock(sd->devcom); in sd_unregister()
[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()
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()
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()
585 mlx5_devcom_for_each_peer_end(*ipsec_roce->devcom); in mlx5_ipsec_fs_roce_tx_destroy()
592 mlx5_devcom_for_each_peer_end(*ipsec_roce->devcom); in mlx5_ipsec_fs_roce_tx_destroy()
838 struct mlx5_devcom_comp_dev **devcom) in mlx5_ipsec_fs_roce_init() argument
[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()
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()
4971 if (esw && !mlx5_devcom_for_each_peer_begin(esw->devcom)) in mlx5e_stats_flower()
[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_fs.c2287 struct mlx5_devcom_comp_dev **devcom) in mlx5e_accel_ipsec_fs_init() argument
2339 ipsec->roce = mlx5_ipsec_fs_roce_init(mdev, devcom); in mlx5e_accel_ipsec_fs_init()
2415 mlx5_devcom_send_event(priv->devcom, event, event, priv); in mlx5e_ipsec_send_event()
H A Dipsec.c919 ret = mlx5e_accel_ipsec_fs_init(ipsec, &priv->devcom); in mlx5e_ipsec_init()