mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-09 15:24:32 +08:00
69ea0582f3
From git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Required for dependencies in the next patches. Resolved the conflicts: - esw_destroy_offloads_acl_tables() use the newer mlx5_esw_for_all_vports() version - esw_offloads_steering_init() drop the cap test - esw_offloads_init() drop the extra function arguments * branch 'mlx5-next': (39 commits) net/mlx5: Expose device definitions for object events net/mlx5: Report EQE data upon CQ completion net/mlx5: Report a CQ error event only when a handler was set net/mlx5: mlx5_core_create_cq() enhancements net/mlx5: Expose the API to register for ANY event net/mlx5: Use event mask based on device capabilities net/mlx5: Fix mlx5_core_destroy_cq() error flow net/mlx5: E-Switch, Handle UC address change in switchdev mode net/mlx5: E-Switch, Consider host PF for inline mode and vlan pop net/mlx5: E-Switch, Use iterator for vlan and min-inline setups net/mlx5: E-Switch, Reg/unreg function changed event at correct stage net/mlx5: E-Switch, Consolidate eswitch function number of VFs net/mlx5: E-Switch, Refactor eswitch SR-IOV interface net/mlx5: Handle host PF vport mac/guid for ECPF net/mlx5: E-Switch, Use correct flags when configuring vlan net/mlx5: Reduce dependency on enabled_vfs counter and num_vfs net/mlx5: Don't handle VF func change if host PF is disabled net/mlx5: Limit scope of mlx5_get_next_phys_dev() to PCI PF devices net/mlx5: Move pci status reg access mutex to mlx5_pci_init net/mlx5: Rename mlx5_pci_dev_type to mlx5_coredev_type ... Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
78 lines
2.0 KiB
C
78 lines
2.0 KiB
C
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
|
|
/*
|
|
* Copyright (c) 2018 Mellanox Technologies. All rights reserved.
|
|
*/
|
|
|
|
#ifndef __MLX5_IB_REP_H__
|
|
#define __MLX5_IB_REP_H__
|
|
|
|
#include <linux/mlx5/eswitch.h>
|
|
#include "mlx5_ib.h"
|
|
|
|
#ifdef CONFIG_MLX5_ESWITCH
|
|
extern const struct mlx5_ib_profile uplink_rep_profile;
|
|
|
|
u8 mlx5_ib_eswitch_mode(struct mlx5_eswitch *esw);
|
|
struct mlx5_ib_dev *mlx5_ib_get_rep_ibdev(struct mlx5_eswitch *esw,
|
|
u16 vport_num);
|
|
struct mlx5_ib_dev *mlx5_ib_get_uplink_ibdev(struct mlx5_eswitch *esw);
|
|
struct mlx5_eswitch_rep *mlx5_ib_vport_rep(struct mlx5_eswitch *esw,
|
|
u16 vport_num);
|
|
void mlx5_ib_register_vport_reps(struct mlx5_core_dev *mdev);
|
|
void mlx5_ib_unregister_vport_reps(struct mlx5_core_dev *mdev);
|
|
struct mlx5_flow_handle *create_flow_rule_vport_sq(struct mlx5_ib_dev *dev,
|
|
struct mlx5_ib_sq *sq,
|
|
u16 port);
|
|
struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw,
|
|
u16 vport_num);
|
|
#else /* CONFIG_MLX5_ESWITCH */
|
|
static inline u8 mlx5_ib_eswitch_mode(struct mlx5_eswitch *esw)
|
|
{
|
|
return MLX5_ESWITCH_NONE;
|
|
}
|
|
|
|
static inline
|
|
struct mlx5_ib_dev *mlx5_ib_get_rep_ibdev(struct mlx5_eswitch *esw,
|
|
u16 vport_num)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
static inline
|
|
struct mlx5_ib_dev *mlx5_ib_get_uplink_ibdev(struct mlx5_eswitch *esw)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
static inline
|
|
struct mlx5_eswitch_rep *mlx5_ib_vport_rep(struct mlx5_eswitch *esw,
|
|
u16 vport_num)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
static inline void mlx5_ib_register_vport_reps(struct mlx5_core_dev *mdev) {}
|
|
static inline void mlx5_ib_unregister_vport_reps(struct mlx5_core_dev *mdev) {}
|
|
static inline
|
|
struct mlx5_flow_handle *create_flow_rule_vport_sq(struct mlx5_ib_dev *dev,
|
|
struct mlx5_ib_sq *sq,
|
|
u16 port)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
static inline
|
|
struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw,
|
|
u16 vport_num)
|
|
{
|
|
return NULL;
|
|
}
|
|
#endif
|
|
|
|
static inline
|
|
struct mlx5_ib_dev *mlx5_ib_rep_to_dev(struct mlx5_eswitch_rep *rep)
|
|
{
|
|
return rep->rep_data[REP_IB].priv;
|
|
}
|
|
#endif /* __MLX5_IB_REP_H__ */
|