~ubuntu-branches/debian/experimental/linux-tools/experimental

« back to all changes in this revision

Viewing changes to include/linux/mlx4/device.h

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2014-02-02 16:57:49 UTC
  • mfrom: (1.1.10) (0.1.21 sid)
  • Revision ID: package-import@ubuntu.com-20140202165749-tw94o9t1t0a8txk6
Tags: 3.13-1~exp2
Merge changes from sid up to 3.12.6-3

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
        MLX4_FLAG_MASTER        = 1 << 2,
55
55
        MLX4_FLAG_SLAVE         = 1 << 3,
56
56
        MLX4_FLAG_SRIOV         = 1 << 4,
 
57
        MLX4_FLAG_OLD_REG_MAC   = 1 << 6,
57
58
};
58
59
 
59
60
enum {
155
156
        MLX4_DEV_CAP_FLAG2_RSS_TOP              = 1LL <<  1,
156
157
        MLX4_DEV_CAP_FLAG2_RSS_XOR              = 1LL <<  2,
157
158
        MLX4_DEV_CAP_FLAG2_FS_EN                = 1LL <<  3,
158
 
        MLX4_DEV_CAP_FLAGS2_REASSIGN_MAC_EN     = 1LL <<  4,
 
159
        MLX4_DEV_CAP_FLAG2_REASSIGN_MAC_EN      = 1LL <<  4,
159
160
        MLX4_DEV_CAP_FLAG2_TS                   = 1LL <<  5,
160
161
        MLX4_DEV_CAP_FLAG2_VLAN_CONTROL         = 1LL <<  6,
161
162
        MLX4_DEV_CAP_FLAG2_FSM                  = 1LL <<  7,
640
641
        __be64  tx_bytes;
641
642
};
642
643
 
 
644
struct mlx4_quotas {
 
645
        int qp;
 
646
        int cq;
 
647
        int srq;
 
648
        int mpt;
 
649
        int mtt;
 
650
        int counter;
 
651
        int xrcd;
 
652
};
 
653
 
643
654
struct mlx4_dev {
644
655
        struct pci_dev         *pdev;
645
656
        unsigned long           flags;
646
657
        unsigned long           num_slaves;
647
658
        struct mlx4_caps        caps;
648
659
        struct mlx4_phys_caps   phys_caps;
 
660
        struct mlx4_quotas      quotas;
649
661
        struct radix_tree_root  qp_table_tree;
650
662
        u8                      rev_id;
651
663
        char                    board_id[MLX4_BOARD_ID_LEN];
652
664
        int                     num_vfs;
 
665
        int                     numa_node;
653
666
        int                     oper_log_mgm_entry_size;
654
667
        u64                     regid_promisc_array[MLX4_MAX_PORTS + 1];
655
668
        u64                     regid_allmulti_array[MLX4_MAX_PORTS + 1];
771
784
        return dev->flags & MLX4_FLAG_MASTER;
772
785
}
773
786
 
 
787
static inline int mlx4_num_reserved_sqps(struct mlx4_dev *dev)
 
788
{
 
789
        return dev->phys_caps.base_sqpn + 8 +
 
790
                16 * MLX4_MFUNC_MAX * !!mlx4_is_master(dev);
 
791
}
 
792
 
774
793
static inline int mlx4_is_qp_reserved(struct mlx4_dev *dev, u32 qpn)
775
794
{
776
795
        return (qpn < dev->phys_caps.base_sqpn + 8 +
816
835
 
817
836
int mlx4_uar_alloc(struct mlx4_dev *dev, struct mlx4_uar *uar);
818
837
void mlx4_uar_free(struct mlx4_dev *dev, struct mlx4_uar *uar);
819
 
int mlx4_bf_alloc(struct mlx4_dev *dev, struct mlx4_bf *bf);
 
838
int mlx4_bf_alloc(struct mlx4_dev *dev, struct mlx4_bf *bf, int node);
820
839
void mlx4_bf_free(struct mlx4_dev *dev, struct mlx4_bf *bf);
821
840
 
822
841
int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift,
1078
1097
                u8 *pg, u16 *ratelimit);
1079
1098
int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx);
1080
1099
int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index);
1081
 
void mlx4_unregister_vlan(struct mlx4_dev *dev, u8 port, int index);
 
1100
void mlx4_unregister_vlan(struct mlx4_dev *dev, u8 port, u16 vlan);
1082
1101
 
1083
1102
int mlx4_map_phys_fmr(struct mlx4_dev *dev, struct mlx4_fmr *fmr, u64 *page_list,
1084
1103
                      int npages, u64 iova, u32 *lkey, u32 *rkey);