xref: /linux/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.h (revision 9948a0641a17a38935a28d05f6c56d9d1ffabae6)
1*9948a064SJiri Pirko /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2*9948a064SJiri Pirko /* Copyright (c) 2017-2018 Mellanox Technologies. All rights reserved */
3230ead01SArkadi Sharshevsky 
4230ead01SArkadi Sharshevsky #ifndef _MLXSW_PIPELINE_H_
5230ead01SArkadi Sharshevsky #define _MLXSW_PIPELINE_H_
6230ead01SArkadi Sharshevsky 
710bfec0aSJiri Pirko #if IS_ENABLED(CONFIG_NET_DEVLINK)
810bfec0aSJiri Pirko 
9230ead01SArkadi Sharshevsky int mlxsw_sp_dpipe_init(struct mlxsw_sp *mlxsw_sp);
10230ead01SArkadi Sharshevsky void mlxsw_sp_dpipe_fini(struct mlxsw_sp *mlxsw_sp);
11230ead01SArkadi Sharshevsky 
1210bfec0aSJiri Pirko #else
1310bfec0aSJiri Pirko 
1410bfec0aSJiri Pirko static inline int mlxsw_sp_dpipe_init(struct mlxsw_sp *mlxsw_sp)
1510bfec0aSJiri Pirko {
1610bfec0aSJiri Pirko 	return 0;
1710bfec0aSJiri Pirko }
1810bfec0aSJiri Pirko 
1910bfec0aSJiri Pirko static inline void mlxsw_sp_dpipe_fini(struct mlxsw_sp *mlxsw_sp)
2010bfec0aSJiri Pirko {
2110bfec0aSJiri Pirko }
2210bfec0aSJiri Pirko 
2310bfec0aSJiri Pirko #endif
2410bfec0aSJiri Pirko 
25d54b70feSArkadi Sharshevsky #define MLXSW_SP_DPIPE_TABLE_NAME_ERIF "mlxsw_erif"
266aecb36bSArkadi Sharshevsky #define MLXSW_SP_DPIPE_TABLE_NAME_HOST4 "mlxsw_host4"
27506f7dd5SArkadi Sharshevsky #define MLXSW_SP_DPIPE_TABLE_NAME_HOST6 "mlxsw_host6"
28c538adb3SArkadi Sharshevsky #define MLXSW_SP_DPIPE_TABLE_NAME_ADJ "mlxsw_adj"
29d54b70feSArkadi Sharshevsky 
30230ead01SArkadi Sharshevsky #endif /* _MLXSW_PIPELINE_H_*/
31