linux/drivers/infiniband/hw
Jack Morgenstein 3e0629cb6c IB/mlx4: Avoid accessing netdevice when building RoCE qp1 header
The source MAC is needed in RoCE when building the QP1 header.

Currently, this is obtained from the source net device. However, the net
device may not yet exist, or can be destroyed in parallel to this QP1 send
operation (e.g through the VPI port change flow) so accessing it may cause
a kernel crash.

To fix this, we maintain a source MAC cache per port for the net device in
struct mlx4_ib_roce.  This cached MAC is initialized to be the default MAC
address obtained during HCA initialization via QUERY_PORT. This cached MAC
is updated via the netdev event notifier handler.

Since the cached MAC is held in an atomic64 object, we do not need locking
when accessing it.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2014-09-22 09:46:53 -07:00
..
amso1100 Main set of InfiniBand/RDMA updates for 3.17 merge window: 2014-08-14 11:09:05 -06:00
cxgb3 RDMA/cxgb3: Remove a couple unneeded conditions 2014-05-28 10:04:00 -07:00
cxgb4 Main set of InfiniBand/RDMA updates for 3.17 merge window: 2014-08-14 11:09:05 -06:00
ehca Merge branches 'core', 'cxgb4', 'ip-roce', 'iser', 'misc', 'mlx4', 'nes', 'ocrdma', 'qib', 'sgwrapper', 'srp' and 'usnic' into for-next 2014-04-03 08:30:17 -07:00
ipath IB/ipath: Add P_Key change event support 2014-08-05 07:47:33 -07:00
mlx4 IB/mlx4: Avoid accessing netdevice when building RoCE qp1 header 2014-09-22 09:46:53 -07:00
mlx5 Main set of InfiniBand/RDMA updates for 3.17 merge window: 2014-08-14 11:09:05 -06:00
mthca IB/mad: add new ioctl to ABI to support new registration options 2014-08-10 20:36:00 -07:00
nes infiniband: use pci_zalloc_consistent 2014-08-08 15:57:28 -07:00
ocrdma RDMA/ocrdma: report asic-id in query device 2014-08-12 22:07:47 -07:00
qib PCI changes for the v3.17 merge window (part 2): 2014-08-14 18:10:33 -06:00
usnic PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
Makefile IB: Allow build of hw/ and ulp/ subdirectories independently 2014-06-02 14:51:12 -07:00