RDMA/qedr: Fix RDMA CM loopback
authorRam Amrani <Ram.Amrani@Cavium.com>
Tue, 24 Jan 2017 11:51:41 +0000 (13:51 +0200)
committerDoug Ledford <dledford@redhat.com>
Tue, 24 Jan 2017 20:35:02 +0000 (15:35 -0500)
The loopback logic in RDMA CM packets compares Ethernet addresses and
was accidently inverse.

Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/qedr/qedr_cm.c

index 00361f310d154c8a7639be96d011268b151a436d..a9a8d8745d2e7f9ca20a5c849e042fdc6af261d6 100644 (file)
@@ -398,9 +398,9 @@ static inline int qedr_gsi_build_packet(struct qedr_dev *dev,
        }
 
        if (ether_addr_equal(udh.eth.smac_h, udh.eth.dmac_h))
-               packet->tx_dest = QED_ROCE_LL2_TX_DEST_NW;
-       else
                packet->tx_dest = QED_ROCE_LL2_TX_DEST_LB;
+       else
+               packet->tx_dest = QED_ROCE_LL2_TX_DEST_NW;
 
        packet->roce_mode = roce_mode;
        memcpy(packet->header.vaddr, ud_header_buffer, header_size);