]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/mlx4/device.h
mlx4_en: Enabling new steering
[karo-tx-linux.git] / include / linux / mlx4 / device.h
index 0492146420365ce1b0f2cefa6c2e0ef8d0abb8d4..56fa5e1cd6d4b0cd7f2758a1777f2be993dc55bc 100644 (file)
 
 #include <asm/atomic.h>
 
+#define MAX_MSIX_P_PORT                17
+#define MAX_MSIX               64
+#define MSIX_LEGACY_SZ         4
+#define MIN_MSIX_P_PORT                5
+
 enum {
        MLX4_FLAG_MSI_X         = 1 << 0,
        MLX4_FLAG_OLD_PORT_CMDS = 1 << 1,
@@ -145,8 +150,10 @@ enum {
 };
 
 enum mlx4_protocol {
-       MLX4_PROTOCOL_IB,
-       MLX4_PROTOCOL_EN,
+       MLX4_PROT_IB_IPV6 = 0,
+       MLX4_PROT_ETH,
+       MLX4_PROT_IB_IPV4,
+       MLX4_PROT_FCOE
 };
 
 enum {
@@ -173,6 +180,12 @@ enum mlx4_special_vlan_idx {
        MLX4_VLAN_REGULAR
 };
 
+enum mlx4_steer_type {
+       MLX4_MC_STEER = 0,
+       MLX4_UC_STEER,
+       MLX4_NUM_STEERS
+};
+
 enum {
        MLX4_NUM_FEXCH          = 64 * 1024,
 };
@@ -223,6 +236,7 @@ struct mlx4_caps {
        int                     num_eqs;
        int                     reserved_eqs;
        int                     num_comp_vectors;
+       int                     comp_pool;
        int                     num_mpts;
        int                     num_mtt_segs;
        int                     mtts_per_seg;
@@ -245,6 +259,9 @@ struct mlx4_caps {
        u16                     stat_rate_support;
        int                     udp_rss;
        int                     loopback_support;
+       int                     vep_uc_steering;
+       int                     vep_mc_steering;
+       int                     wol;
        u8                      port_width_cap[MLX4_MAX_PORTS + 1];
        int                     max_gso_sz;
        int                     reserved_qps_cnt[MLX4_NUM_QP_REGION];
@@ -415,7 +432,7 @@ struct mlx4_dev {
        unsigned long           flags;
        struct mlx4_caps        caps;
        struct radix_tree_root  qp_table_tree;
-       u32                     rev_id;
+       u                     rev_id;
        char                    board_id[MLX4_BOARD_ID_LEN];
 };
 
@@ -508,9 +525,15 @@ int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
                          int block_mcast_loopback, enum mlx4_protocol protocol);
 int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
                          enum mlx4_protocol protocol);
+int mlx4_multicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port);
+int mlx4_multicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port);
+int mlx4_unicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port);
+int mlx4_unicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port);
+int mlx4_SET_MCAST_FLTR(struct mlx4_dev *dev, u8 port, u64 mac, u64 clear, u8 mode);
 
-int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index);
-void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index);
+int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn, u8 wrap);
+void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int qpn);
+int mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac, u8 wrap);
 
 int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx);
 int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index);
@@ -526,5 +549,10 @@ void mlx4_fmr_unmap(struct mlx4_dev *dev, struct mlx4_fmr *fmr,
 int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr);
 int mlx4_SYNC_TPT(struct mlx4_dev *dev);
 int mlx4_test_interrupts(struct mlx4_dev *dev);
+int mlx4_assign_eq(struct mlx4_dev *dev, char* name , int* vector);
+void mlx4_release_eq(struct mlx4_dev *dev, int vec);
+
+int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port);
+int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port);
 
 #endif /* MLX4_DEVICE_H */