diff options
author | Steve Wise <swise@opengridcomputing.com> | 2015-05-07 17:34:23 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-05-11 17:16:49 -0400 |
commit | 940fd304d233534038365f56d30c29ed7fd7416b (patch) | |
tree | 31f265af917a9931d035dc627c07a6b80bd544ab /drivers/infiniband | |
parent | 94634e9861abbc3036d7041773971c8e31ec2680 (diff) |
iw_cxgb4: use wildcard mapping for getting remote addr info
For listening endpoints bound to the wildcard address, we need to pass
the wildcard address mapping to iwpm_get_remote_info() instead of the
mapped address of the new child connection.
Without this fix, and with iwarp port mapping enabled, each iw_cxgb4
connection that is spawned from a listening endpoint bound to the wildcard
address, will generate an annoying dmesg entry about failing to find
the remote address mapping info, and the connection state displayed in
debugfs under /sys/kernel/debug/iw_cxgb4/<pci-slot-no>/eps will not have
the peer's address/port mapping info. The connection still works though.
Fixes: 5b6b8fe ("RDMA/cxgb4: Report the actual address of the remote connecting peer")
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Reviewed-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index bb95a6c0477b..3ad8dc798f52 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c | |||
@@ -583,18 +583,18 @@ static void c4iw_record_pm_msg(struct c4iw_ep *ep, | |||
583 | sizeof(ep->com.mapped_remote_addr)); | 583 | sizeof(ep->com.mapped_remote_addr)); |
584 | } | 584 | } |
585 | 585 | ||
586 | static int get_remote_addr(struct c4iw_ep *ep) | 586 | static int get_remote_addr(struct c4iw_ep *parent_ep, struct c4iw_ep *child_ep) |
587 | { | 587 | { |
588 | int ret; | 588 | int ret; |
589 | 589 | ||
590 | print_addr(&ep->com, __func__, "get_remote_addr"); | 590 | print_addr(&parent_ep->com, __func__, "get_remote_addr parent_ep "); |
591 | print_addr(&child_ep->com, __func__, "get_remote_addr child_ep "); | ||
591 | 592 | ||
592 | ret = iwpm_get_remote_info(&ep->com.mapped_local_addr, | 593 | ret = iwpm_get_remote_info(&parent_ep->com.mapped_local_addr, |
593 | &ep->com.mapped_remote_addr, | 594 | &child_ep->com.mapped_remote_addr, |
594 | &ep->com.remote_addr, RDMA_NL_C4IW); | 595 | &child_ep->com.remote_addr, RDMA_NL_C4IW); |
595 | if (ret) | 596 | if (ret) |
596 | pr_info(MOD "Unable to find remote peer addr info - err %d\n", | 597 | PDBG("Unable to find remote peer addr info - err %d\n", ret); |
597 | ret); | ||
598 | 598 | ||
599 | return ret; | 599 | return ret; |
600 | } | 600 | } |
@@ -2420,7 +2420,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb) | |||
2420 | } | 2420 | } |
2421 | memcpy(&child_ep->com.remote_addr, &child_ep->com.mapped_remote_addr, | 2421 | memcpy(&child_ep->com.remote_addr, &child_ep->com.mapped_remote_addr, |
2422 | sizeof(child_ep->com.remote_addr)); | 2422 | sizeof(child_ep->com.remote_addr)); |
2423 | get_remote_addr(child_ep); | 2423 | get_remote_addr(parent_ep, child_ep); |
2424 | 2424 | ||
2425 | c4iw_get_ep(&parent_ep->com); | 2425 | c4iw_get_ep(&parent_ep->com); |
2426 | child_ep->parent_ep = parent_ep; | 2426 | child_ep->parent_ep = parent_ep; |