Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
port.c File Reference
#include <linux/errno.h>
#include <linux/if_ether.h>
#include <linux/export.h>
#include <linux/mlx4/cmd.h>
#include "mlx4.h"

Go to the source code of this file.

Macros

#define MLX4_MAC_VALID   (1ull << 63)
 
#define MLX4_VLAN_VALID   (1u << 31)
 
#define MLX4_VLAN_MASK   0xfff
 
#define MLX4_STATS_TRAFFIC_COUNTERS_MASK   0xfULL
 
#define MLX4_STATS_TRAFFIC_DROPS_MASK   0xc0ULL
 
#define MLX4_STATS_ERROR_COUNTERS_MASK   0x1ffc30ULL
 
#define MLX4_STATS_PORT_COUNTERS_MASK   0x1fe00000ULL
 

Enumerations

enum  {
  MLX4_SET_PORT_VL_CAP = 4, MLX4_SET_PORT_MTU_CAP = 12, MLX4_CHANGE_PORT_PKEY_TBL_SZ = 20, MLX4_CHANGE_PORT_VL_CAP = 21,
  MLX4_CHANGE_PORT_MTU_CAP = 22
}
 

Functions

void mlx4_init_mac_table (struct mlx4_dev *dev, struct mlx4_mac_table *table)
 
void mlx4_init_vlan_table (struct mlx4_dev *dev, struct mlx4_vlan_table *table)
 
int mlx4_get_eth_qp (struct mlx4_dev *dev, u8 port, u64 mac, int *qpn)
 
 EXPORT_SYMBOL_GPL (mlx4_get_eth_qp)
 
void mlx4_put_eth_qp (struct mlx4_dev *dev, u8 port, u64 mac, int qpn)
 
 EXPORT_SYMBOL_GPL (mlx4_put_eth_qp)
 
int __mlx4_register_mac (struct mlx4_dev *dev, u8 port, u64 mac)
 
 EXPORT_SYMBOL_GPL (__mlx4_register_mac)
 
int mlx4_register_mac (struct mlx4_dev *dev, u8 port, u64 mac)
 
 EXPORT_SYMBOL_GPL (mlx4_register_mac)
 
void __mlx4_unregister_mac (struct mlx4_dev *dev, u8 port, u64 mac)
 
 EXPORT_SYMBOL_GPL (__mlx4_unregister_mac)
 
void mlx4_unregister_mac (struct mlx4_dev *dev, u8 port, u64 mac)
 
 EXPORT_SYMBOL_GPL (mlx4_unregister_mac)
 
int mlx4_replace_mac (struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac)
 
 EXPORT_SYMBOL_GPL (mlx4_replace_mac)
 
int mlx4_find_cached_vlan (struct mlx4_dev *dev, u8 port, u16 vid, int *idx)
 
 EXPORT_SYMBOL_GPL (mlx4_find_cached_vlan)
 
int mlx4_register_vlan (struct mlx4_dev *dev, u8 port, u16 vlan, int *index)
 
 EXPORT_SYMBOL_GPL (mlx4_register_vlan)
 
void mlx4_unregister_vlan (struct mlx4_dev *dev, u8 port, int index)
 
 EXPORT_SYMBOL_GPL (mlx4_unregister_vlan)
 
int mlx4_get_port_ib_caps (struct mlx4_dev *dev, u8 port, __be32 *caps)
 
int mlx4_SET_PORT_wrapper (struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, struct mlx4_cmd_mailbox *outbox, struct mlx4_cmd_info *cmd)
 
int mlx4_SET_PORT (struct mlx4_dev *dev, u8 port, int pkey_tbl_sz)
 
int mlx4_SET_PORT_general (struct mlx4_dev *dev, u8 port, int mtu, u8 pptx, u8 pfctx, u8 pprx, u8 pfcrx)
 
 EXPORT_SYMBOL (mlx4_SET_PORT_general)
 
int mlx4_SET_PORT_qpn_calc (struct mlx4_dev *dev, u8 port, u32 base_qpn, u8 promisc)
 
 EXPORT_SYMBOL (mlx4_SET_PORT_qpn_calc)
 
int mlx4_SET_PORT_PRIO2TC (struct mlx4_dev *dev, u8 port, u8 *prio2tc)
 
 EXPORT_SYMBOL (mlx4_SET_PORT_PRIO2TC)
 
int mlx4_SET_PORT_SCHEDULER (struct mlx4_dev *dev, u8 port, u8 *tc_tx_bw, u8 *pg, u16 *ratelimit)
 
 EXPORT_SYMBOL (mlx4_SET_PORT_SCHEDULER)
 
int mlx4_SET_MCAST_FLTR_wrapper (struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, struct mlx4_cmd_mailbox *outbox, struct mlx4_cmd_info *cmd)
 
int mlx4_SET_MCAST_FLTR (struct mlx4_dev *dev, u8 port, u64 mac, u64 clear, u8 mode)
 
 EXPORT_SYMBOL (mlx4_SET_MCAST_FLTR)
 
int mlx4_SET_VLAN_FLTR_wrapper (struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, struct mlx4_cmd_mailbox *outbox, struct mlx4_cmd_info *cmd)
 
int mlx4_common_dump_eth_stats (struct mlx4_dev *dev, int slave, u32 in_mod, struct mlx4_cmd_mailbox *outbox)
 
int mlx4_DUMP_ETH_STATS_wrapper (struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, struct mlx4_cmd_mailbox *outbox, struct mlx4_cmd_info *cmd)
 
void mlx4_set_stats_bitmap (struct mlx4_dev *dev, u64 *stats_bitmap)
 
 EXPORT_SYMBOL (mlx4_set_stats_bitmap)
 

Macro Definition Documentation

#define MLX4_MAC_VALID   (1ull << 63)

Definition at line 41 of file port.c.

#define MLX4_STATS_ERROR_COUNTERS_MASK   0x1ffc30ULL

Definition at line 48 of file port.c.

#define MLX4_STATS_PORT_COUNTERS_MASK   0x1fe00000ULL

Definition at line 49 of file port.c.

#define MLX4_STATS_TRAFFIC_COUNTERS_MASK   0xfULL

Definition at line 46 of file port.c.

#define MLX4_STATS_TRAFFIC_DROPS_MASK   0xc0ULL

Definition at line 47 of file port.c.

#define MLX4_VLAN_MASK   0xfff

Definition at line 44 of file port.c.

#define MLX4_VLAN_VALID   (1u << 31)

Definition at line 43 of file port.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
MLX4_SET_PORT_VL_CAP 
MLX4_SET_PORT_MTU_CAP 
MLX4_CHANGE_PORT_PKEY_TBL_SZ 
MLX4_CHANGE_PORT_VL_CAP 
MLX4_CHANGE_PORT_MTU_CAP 

Definition at line 785 of file port.c.

Function Documentation

int __mlx4_register_mac ( struct mlx4_dev dev,
u8  port,
u64  mac 
)

Definition at line 292 of file port.c.

void __mlx4_unregister_mac ( struct mlx4_dev dev,
u8  port,
u64  mac 
)

Definition at line 363 of file port.c.

EXPORT_SYMBOL ( mlx4_SET_PORT_general  )
EXPORT_SYMBOL ( mlx4_SET_PORT_qpn_calc  )
EXPORT_SYMBOL ( mlx4_SET_PORT_PRIO2TC  )
EXPORT_SYMBOL ( mlx4_SET_PORT_SCHEDULER  )
EXPORT_SYMBOL ( mlx4_SET_MCAST_FLTR  )
EXPORT_SYMBOL ( mlx4_set_stats_bitmap  )
EXPORT_SYMBOL_GPL ( mlx4_get_eth_qp  )
EXPORT_SYMBOL_GPL ( mlx4_put_eth_qp  )
EXPORT_SYMBOL_GPL ( __mlx4_register_mac  )
EXPORT_SYMBOL_GPL ( mlx4_register_mac  )
EXPORT_SYMBOL_GPL ( __mlx4_unregister_mac  )
EXPORT_SYMBOL_GPL ( mlx4_unregister_mac  )
EXPORT_SYMBOL_GPL ( mlx4_replace_mac  )
EXPORT_SYMBOL_GPL ( mlx4_find_cached_vlan  )
EXPORT_SYMBOL_GPL ( mlx4_register_vlan  )
EXPORT_SYMBOL_GPL ( mlx4_unregister_vlan  )
int mlx4_common_dump_eth_stats ( struct mlx4_dev dev,
int  slave,
u32  in_mod,
struct mlx4_cmd_mailbox outbox 
)

Definition at line 994 of file port.c.

int mlx4_DUMP_ETH_STATS_wrapper ( struct mlx4_dev dev,
int  slave,
struct mlx4_vhcr vhcr,
struct mlx4_cmd_mailbox inbox,
struct mlx4_cmd_mailbox outbox,
struct mlx4_cmd_info cmd 
)

Definition at line 1002 of file port.c.

int mlx4_find_cached_vlan ( struct mlx4_dev dev,
u8  port,
u16  vid,
int idx 
)

Definition at line 465 of file port.c.

int mlx4_get_eth_qp ( struct mlx4_dev dev,
u8  port,
u64  mac,
int qpn 
)

Definition at line 184 of file port.c.

int mlx4_get_port_ib_caps ( struct mlx4_dev dev,
u8  port,
__be32 caps 
)

Definition at line 604 of file port.c.

void mlx4_init_mac_table ( struct mlx4_dev dev,
struct mlx4_mac_table table 
)

Definition at line 51 of file port.c.

void mlx4_init_vlan_table ( struct mlx4_dev dev,
struct mlx4_vlan_table table 
)

Definition at line 64 of file port.c.

void mlx4_put_eth_qp ( struct mlx4_dev dev,
u8  port,
u64  mac,
int  qpn 
)

Definition at line 245 of file port.c.

int mlx4_register_mac ( struct mlx4_dev dev,
u8  port,
u64  mac 
)

Definition at line 343 of file port.c.

int mlx4_register_vlan ( struct mlx4_dev dev,
u8  port,
u16  vlan,
int index 
)

Definition at line 539 of file port.c.

int mlx4_replace_mac ( struct mlx4_dev dev,
u8  port,
int  qpn,
u64  new_mac 
)

Definition at line 400 of file port.c.

int mlx4_SET_MCAST_FLTR ( struct mlx4_dev dev,
u8  port,
u64  mac,
u64  clear,
u8  mode 
)

Definition at line 974 of file port.c.

int mlx4_SET_MCAST_FLTR_wrapper ( struct mlx4_dev dev,
int  slave,
struct mlx4_vhcr vhcr,
struct mlx4_cmd_mailbox inbox,
struct mlx4_cmd_mailbox outbox,
struct mlx4_cmd_info cmd 
)

Definition at line 963 of file port.c.

int mlx4_SET_PORT ( struct mlx4_dev dev,
u8  port,
int  pkey_tbl_sz 
)

Definition at line 793 of file port.c.

int mlx4_SET_PORT_general ( struct mlx4_dev dev,
u8  port,
int  mtu,
u8  pptx,
u8  pfctx,
u8  pprx,
u8  pfcrx 
)

Definition at line 832 of file port.c.

int mlx4_SET_PORT_PRIO2TC ( struct mlx4_dev dev,
u8  port,
u8 prio2tc 
)

Definition at line 901 of file port.c.

int mlx4_SET_PORT_qpn_calc ( struct mlx4_dev dev,
u8  port,
u32  base_qpn,
u8  promisc 
)

Definition at line 862 of file port.c.

int mlx4_SET_PORT_SCHEDULER ( struct mlx4_dev dev,
u8  port,
u8 tc_tx_bw,
u8 pg,
u16 ratelimit 
)

Definition at line 927 of file port.c.

int mlx4_SET_PORT_wrapper ( struct mlx4_dev dev,
int  slave,
struct mlx4_vhcr vhcr,
struct mlx4_cmd_mailbox inbox,
struct mlx4_cmd_mailbox outbox,
struct mlx4_cmd_info cmd 
)

Definition at line 774 of file port.c.

void mlx4_set_stats_bitmap ( struct mlx4_dev dev,
u64 stats_bitmap 
)

Definition at line 1014 of file port.c.

int mlx4_SET_VLAN_FLTR_wrapper ( struct mlx4_dev dev,
int  slave,
struct mlx4_vhcr vhcr,
struct mlx4_cmd_mailbox inbox,
struct mlx4_cmd_mailbox outbox,
struct mlx4_cmd_info cmd 
)

Definition at line 983 of file port.c.

void mlx4_unregister_mac ( struct mlx4_dev dev,
u8  port,
u64  mac 
)

Definition at line 384 of file port.c.

void mlx4_unregister_vlan ( struct mlx4_dev dev,
u8  port,
int  index 
)

Definition at line 584 of file port.c.