cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

mp.h (1164B)


      1/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
      2/* Copyright (c) 2019 Mellanox Technologies. */
      3
      4#ifndef __MLX5_LAG_MP_H__
      5#define __MLX5_LAG_MP_H__
      6
      7#include "lag.h"
      8#include "mlx5_core.h"
      9
     10enum mlx5_lag_port_affinity {
     11	MLX5_LAG_NORMAL_AFFINITY,
     12	MLX5_LAG_P1_AFFINITY,
     13	MLX5_LAG_P2_AFFINITY,
     14};
     15
     16struct lag_mp {
     17	struct notifier_block     fib_nb;
     18	struct {
     19		const void        *mfi; /* used in tracking fib events */
     20		u32               priority;
     21		u32               dst;
     22		int               dst_len;
     23	} fib;
     24	struct workqueue_struct   *wq;
     25};
     26
     27#ifdef CONFIG_MLX5_ESWITCH
     28
     29void mlx5_lag_mp_reset(struct mlx5_lag *ldev);
     30int mlx5_lag_mp_init(struct mlx5_lag *ldev);
     31void mlx5_lag_mp_cleanup(struct mlx5_lag *ldev);
     32bool mlx5_lag_is_multipath(struct mlx5_core_dev *dev);
     33
     34#else /* CONFIG_MLX5_ESWITCH */
     35
     36static inline void mlx5_lag_mp_reset(struct mlx5_lag *ldev) {};
     37static inline int mlx5_lag_mp_init(struct mlx5_lag *ldev) { return 0; }
     38static inline void mlx5_lag_mp_cleanup(struct mlx5_lag *ldev) {}
     39static inline bool mlx5_lag_is_multipath(struct mlx5_core_dev *dev) { return false; }
     40
     41#endif /* CONFIG_MLX5_ESWITCH */
     42#endif /* __MLX5_LAG_MP_H__ */