diff options
| author | Hadar Hen Zion <hadarh@mellanox.co.il> | 2012-07-05 00:03:48 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2012-07-07 19:23:06 -0400 |
| commit | 592e49dda8122ab621cdc59cc429bdb968ee6364 (patch) | |
| tree | 285ab049c09b7fd6a1614e869f2ceac3cfb73961 /include/linux/mlx4 | |
| parent | 1b9c6b064ef4fbc6f55485a8b5aab7ce889592c2 (diff) | |
net/mlx4: Implement promiscuous mode with device managed flow-steering
The device managed flow steering API has three promiscuous modes:
1. Uplink - captures all the packets that arrive to the port.
2. Allmulti - captures all multicast packets arriving to the port.
3. Function port - for future use, this mode is not implemented yet.
Use these modes with the flow_attach and flow_detach firmware commands
according to the promiscuous state of the netdevice.
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4')
| -rw-r--r-- | include/linux/mlx4/device.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index e45fc20bd01f..6f0d133cc7ad 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -542,6 +542,8 @@ struct mlx4_dev { | |||
| 542 | u8 rev_id; | 542 | u8 rev_id; |
| 543 | char board_id[MLX4_BOARD_ID_LEN]; | 543 | char board_id[MLX4_BOARD_ID_LEN]; |
| 544 | int num_vfs; | 544 | int num_vfs; |
| 545 | u64 regid_promisc_array[MLX4_MAX_PORTS + 1]; | ||
| 546 | u64 regid_allmulti_array[MLX4_MAX_PORTS + 1]; | ||
| 545 | }; | 547 | }; |
| 546 | 548 | ||
| 547 | struct mlx4_init_port_param { | 549 | struct mlx4_init_port_param { |
| @@ -681,6 +683,7 @@ enum mlx4_net_trans_rule_id { | |||
| 681 | enum mlx4_net_trans_promisc_mode { | 683 | enum mlx4_net_trans_promisc_mode { |
| 682 | MLX4_FS_PROMISC_NONE = 0, | 684 | MLX4_FS_PROMISC_NONE = 0, |
| 683 | MLX4_FS_PROMISC_UPLINK, | 685 | MLX4_FS_PROMISC_UPLINK, |
| 686 | /* For future use. Not implemented yet */ | ||
| 684 | MLX4_FS_PROMISC_FUNCTION_PORT, | 687 | MLX4_FS_PROMISC_FUNCTION_PORT, |
| 685 | MLX4_FS_PROMISC_ALL_MULTI, | 688 | MLX4_FS_PROMISC_ALL_MULTI, |
| 686 | }; | 689 | }; |
| @@ -744,6 +747,10 @@ struct mlx4_net_trans_rule { | |||
| 744 | u32 qpn; | 747 | u32 qpn; |
| 745 | }; | 748 | }; |
| 746 | 749 | ||
| 750 | int mlx4_flow_steer_promisc_add(struct mlx4_dev *dev, u8 port, u32 qpn, | ||
| 751 | enum mlx4_net_trans_promisc_mode mode); | ||
| 752 | int mlx4_flow_steer_promisc_remove(struct mlx4_dev *dev, u8 port, | ||
| 753 | enum mlx4_net_trans_promisc_mode mode); | ||
| 747 | int mlx4_multicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); | 754 | int mlx4_multicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); |
| 748 | int mlx4_multicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port); | 755 | int mlx4_multicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port); |
| 749 | int mlx4_unicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); | 756 | int mlx4_unicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); |
