aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/mlx4.h
diff options
context:
space:
mode:
authorEugenia Emantayev <eugenia@mellanox.co.il>2011-12-12 23:16:21 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-13 13:56:07 -0500
commitffe455ad04681f3fc48eef595fe526a795f809a3 (patch)
treeba21abb4371d780357dd1a91810dd171ce3b05b2 /drivers/net/ethernet/mellanox/mlx4/mlx4.h
parent0ec2c0f86d31ab36547307f133b0016006bdc6b5 (diff)
mlx4: Ethernet port management modifications
The physical port is now common to the PF and VFs. The port resources and configuration is managed by the PF, VFs can only influence the MTU of the port, it is set as max among all functions, Each function allocates RX buffers of required size to meet it's MTU enforcement. Port management code was moved to mlx4_core, as the mlx4_en module is virtualization unaware Move handling qp functionality to mlx4_get_eth_qp/mlx4_put_eth_qp including reserve/release range and add/release unicast steering. Let mlx4_register/unregister_mac deal only with MAC (un)registration. Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il> Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/mlx4.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mlx4.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
index a38ffc997367..abf65d8af48d 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
@@ -419,12 +419,23 @@ struct mlx4_comm {
419 u32 slave_read; 419 u32 slave_read;
420}; 420};
421 421
422enum {
423 MLX4_MCAST_CONFIG = 0,
424 MLX4_MCAST_DISABLE = 1,
425 MLX4_MCAST_ENABLE = 2,
426};
427
422#define VLAN_FLTR_SIZE 128 428#define VLAN_FLTR_SIZE 128
423 429
424struct mlx4_vlan_fltr { 430struct mlx4_vlan_fltr {
425 __be32 entry[VLAN_FLTR_SIZE]; 431 __be32 entry[VLAN_FLTR_SIZE];
426}; 432};
427 433
434struct mlx4_mcast_entry {
435 struct list_head list;
436 u64 addr;
437};
438
428struct mlx4_promisc_qp { 439struct mlx4_promisc_qp {
429 struct list_head list; 440 struct list_head list;
430 u32 qpn; 441 u32 qpn;
@@ -615,6 +626,48 @@ struct mlx4_vlan_table {
615 int max; 626 int max;
616}; 627};
617 628
629#define SET_PORT_GEN_ALL_VALID 0x7
630#define SET_PORT_PROMISC_SHIFT 31
631#define SET_PORT_MC_PROMISC_SHIFT 30
632
633enum {
634 MCAST_DIRECT_ONLY = 0,
635 MCAST_DIRECT = 1,
636 MCAST_DEFAULT = 2
637};
638
639
640struct mlx4_set_port_general_context {
641 u8 reserved[3];
642 u8 flags;
643 u16 reserved2;
644 __be16 mtu;
645 u8 pptx;
646 u8 pfctx;
647 u16 reserved3;
648 u8 pprx;
649 u8 pfcrx;
650 u16 reserved4;
651};
652
653struct mlx4_set_port_rqp_calc_context {
654 __be32 base_qpn;
655 u8 rererved;
656 u8 n_mac;
657 u8 n_vlan;
658 u8 n_prio;
659 u8 reserved2[3];
660 u8 mac_miss;
661 u8 intra_no_vlan;
662 u8 no_vlan;
663 u8 intra_vlan_miss;
664 u8 vlan_miss;
665 u8 reserved3[3];
666 u8 no_vlan_prio;
667 __be32 promisc;
668 __be32 mcast;
669};
670
618struct mlx4_mac_entry { 671struct mlx4_mac_entry {
619 u64 mac; 672 u64 mac;
620}; 673};