linux_dsm_epyc7002/drivers/net/ethernet/mellanox/mlx4
Jack Morgenstein 2f5bb47368 mlx4: Add ref counting to port MAC table for RoCE
The IB side of RoCE requires the MAC table index of the
MAC address used by its QPs.

To obtain the real MAC index, the IB side registers the
MAC (increasing its ref count, and also returning the
real MAC index) during the modify-qp sequence.

This protects against the ETH side deleting or modifying
that MAC table entry while the QP is active.

Note that until the modify-qp command returns success,
the MAC and VLAN information only has "candidate" status.
If the modify-qp succeeds, the "candidate" info is promoted
to the operational MAC/VLAN info for the qp. If the modify fails,
the candidate MAC/VLAN is unregistered, and the old qp info
is preserved.

The patch is a bit complex, because there are multiple qp
transitions where the primary-path information may be
modified:  INIT-to-RTR, and SQD-to-SQD.

Similarly for the alternate path information.

Therefore the code must handle cases where path information
has already been entered into the QP context by previous
qp transitions.

For the MAC address, the success logic is as follows:
1. If there was no previous MAC, simply move the candidate
   MAC information to the operational information, and reset
   the candidate MAC info.
2. If there was a previous MAC, unregister it.  Then move
   the MAC information from candidate to operational, and
   reset the candidate info (as in 1. above).

The MAC address failure logic is the same for all cases:
 - Unregister the candidate MAC, and reset the candidate MAC info.

For Vlan registration, the logic is similar.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-12 15:57:15 -04:00
..
alloc.c mlx4_core: Roll back round robin bitmap allocation commit for CQs, SRQs, and MPTs 2013-12-09 21:12:13 -05:00
catas.c mlx4: Add support for EEH error recovery 2012-07-25 15:24:13 -07:00
cmd.c mlx4_core: Add support for steerable IB UD QPs 2014-01-14 14:06:50 -08:00
cq.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
en_clock.c mlx4_en: Only cycle port if HW timestamp config changes 2014-01-02 03:30:36 -05:00
en_cq.c net/mlx4_en: Add NAPI support for transmit side 2013-12-19 19:04:44 -05:00
en_dcb_nl.c net/mlx4_en: Fix UP limit in ieee_ets->prio_tc 2014-03-02 20:04:00 -05:00
en_ethtool.c mlx4_en: Add PTP hardware clock 2014-01-02 03:30:36 -05:00
en_main.c net/mlx4_en: mlx4_en_verify_params() can be static 2014-03-06 16:53:36 -05:00
en_netdev.c net/mlx4: Replace mlx4_en_mac_to_u64() with mlx4_mac_to_u64() 2014-03-02 20:04:01 -05:00
en_port.c net/mlx4_en: Move queue stopped/waked counters to be per ring 2014-03-02 20:04:01 -05:00
en_port.h net/mlx4_core: set port QoS attributes 2012-04-05 05:08:03 -04:00
en_resources.c net/mlx4_en: Add netdev support for TCP/IP offloads of vxlan tunneling 2013-12-31 14:31:43 -05:00
en_rx.c net/mlx4: Fix limiting number of IRQ's instead of RSS queues 2014-02-24 18:38:14 -05:00
en_selftest.c net/mlx4_en: Fix selftest failing on non 10G link speed 2014-03-02 20:04:01 -05:00
en_tx.c net/mlx4_en: Use union for BlueFlame WQE 2014-03-02 20:04:01 -05:00
eq.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
fw.c mlx4: In RoCE allow guests to have multiple GIDS 2014-03-12 15:57:14 -04:00
fw.h net/mlx4_core: Expose physical port id as PF/VF capability 2013-12-19 19:04:43 -05:00
icm.c net/mlx4_core: ICM pages are allocated on device NUMA node 2013-11-07 19:22:48 -05:00
icm.h mlx4_core: Fix integer overflows so 8TBs of memory registration works 2012-09-13 17:52:02 -07:00
intf.c mlx4: Use port management change event instead of smp_snoop 2012-07-10 09:47:10 -07:00
Kconfig net/mlx4_en: Change Connect-X description in kconfig 2014-03-02 20:04:01 -05:00
main.c mlx4: In RoCE allow guests to have multiple GIDS 2014-03-12 15:57:14 -04:00
Makefile net/mlx4_en: Add HW timestamping (TS) support 2013-04-24 16:30:14 -04:00
mcg.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-01-25 11:17:34 -08:00
mlx4_en.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-03-05 20:32:02 -05:00
mlx4.h mlx4: In RoCE allow guests to have multiple GIDS 2014-03-12 15:57:14 -04:00
mr.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
pd.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
port.c mlx4: In RoCE allow guests to have multiple GIDS 2014-03-12 15:57:14 -04:00
profile.c mlx4_core: Fix integer overflow issues around MTT table 2012-08-15 21:05:26 -07:00
qp.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
reset.c mlx4: Use PCI Express Capability accessors 2012-08-23 10:11:13 -06:00
resource_tracker.c mlx4: Add ref counting to port MAC table for RoCE 2014-03-12 15:57:15 -04:00
sense.c Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
srq.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00