diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-10 13:41:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-10 13:41:33 -0400 |
commit | 1d21b1bf53f81256002f93387ec80ca13e3c5a8f (patch) | |
tree | 4535c50194df875b261f879b09c2bb678f5e92f2 /drivers/infiniband/hw/cxgb4/iw_cxgb4.h | |
parent | 77c32bbbe0d0e963ba5723b8d1f6c42c5d56858b (diff) | |
parent | eeaddf3670d4974e17268ec78a576ad397e2dcd9 (diff) |
Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
Pull main InfiniBand/RDMA updates from Roland Dreier:
- add iWARP port mapper to avoid conflicts between RDMA and normal
stack TCP connections.
- fixes for i386 / x86-64 structure padding differences (ABI
compatibility for 32-on-64) from Yann Droneaud.
- a pile of SRP initiator fixes from Bart Van Assche.
- fixes for a writeback / memory allocation deadlock with NFS over
IPoIB connected mode from Jiri Kosina.
- the usual fixes and cleanups to mlx4, mlx5, cxgb4 and other low-level
drivers.
* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (61 commits)
RDMA/cxgb4: Add support for iWARP Port Mapper user space service
RDMA/nes: Add support for iWARP Port Mapper user space service
RDMA/core: Add support for iWARP Port Mapper user space service
IB/mlx4: Fix gfp passing in create_qp_common()
IB/umad: Fix use-after-free on close
IB/core: Fix kobject leak on device register error flow
RDMA/cxgb4: add missing padding at end of struct c4iw_alloc_ucontext_resp
mlx4_core: Fix GFP flags parameters to be gfp_t
IB/core: Fix port kobject deletion during error flow
IB/core: Remove unneeded kobject_get/put calls
IB/core: Fix sparse warnings about redeclared functions
IB/mad: Fix sparse warning about gfp_t use
IB/mlx4: Implement IB_QP_CREATE_USE_GFP_NOIO
IB: Add a QP creation flag to use GFP_NOIO allocations
IB: Return error for unsupported QP creation flags
IB: Allow build of hw/ and ulp/ subdirectories independently
mlx4_core: Move handling of MLX4_QP_ST_MLX to proper switch statement
RDMA/cxgb4: Add missing padding at end of struct c4iw_create_cq_resp
IB/srp: Avoid problems if a header uses pr_fmt
IB/umad: Fix error handling
...
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/iw_cxgb4.h')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h index 7474b490760a..6f533fbcc4b3 100644 --- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h +++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h | |||
@@ -52,6 +52,8 @@ | |||
52 | 52 | ||
53 | #include <rdma/ib_verbs.h> | 53 | #include <rdma/ib_verbs.h> |
54 | #include <rdma/iw_cm.h> | 54 | #include <rdma/iw_cm.h> |
55 | #include <rdma/rdma_netlink.h> | ||
56 | #include <rdma/iw_portmap.h> | ||
55 | 57 | ||
56 | #include "cxgb4.h" | 58 | #include "cxgb4.h" |
57 | #include "cxgb4_uld.h" | 59 | #include "cxgb4_uld.h" |
@@ -728,6 +730,7 @@ enum c4iw_ep_flags { | |||
728 | CLOSE_SENT = 3, | 730 | CLOSE_SENT = 3, |
729 | TIMEOUT = 4, | 731 | TIMEOUT = 4, |
730 | QP_REFERENCED = 5, | 732 | QP_REFERENCED = 5, |
733 | RELEASE_MAPINFO = 6, | ||
731 | }; | 734 | }; |
732 | 735 | ||
733 | enum c4iw_ep_history { | 736 | enum c4iw_ep_history { |
@@ -764,6 +767,8 @@ struct c4iw_ep_common { | |||
764 | struct mutex mutex; | 767 | struct mutex mutex; |
765 | struct sockaddr_storage local_addr; | 768 | struct sockaddr_storage local_addr; |
766 | struct sockaddr_storage remote_addr; | 769 | struct sockaddr_storage remote_addr; |
770 | struct sockaddr_storage mapped_local_addr; | ||
771 | struct sockaddr_storage mapped_remote_addr; | ||
767 | struct c4iw_wr_wait wr_wait; | 772 | struct c4iw_wr_wait wr_wait; |
768 | unsigned long flags; | 773 | unsigned long flags; |
769 | unsigned long history; | 774 | unsigned long history; |
@@ -807,6 +812,45 @@ struct c4iw_ep { | |||
807 | unsigned int retry_count; | 812 | unsigned int retry_count; |
808 | }; | 813 | }; |
809 | 814 | ||
815 | static inline void print_addr(struct c4iw_ep_common *epc, const char *func, | ||
816 | const char *msg) | ||
817 | { | ||
818 | |||
819 | #define SINA(a) (&(((struct sockaddr_in *)(a))->sin_addr.s_addr)) | ||
820 | #define SINP(a) ntohs(((struct sockaddr_in *)(a))->sin_port) | ||
821 | #define SIN6A(a) (&(((struct sockaddr_in6 *)(a))->sin6_addr)) | ||
822 | #define SIN6P(a) ntohs(((struct sockaddr_in6 *)(a))->sin6_port) | ||
823 | |||
824 | if (c4iw_debug) { | ||
825 | switch (epc->local_addr.ss_family) { | ||
826 | case AF_INET: | ||
827 | PDBG("%s %s %pI4:%u/%u <-> %pI4:%u/%u\n", | ||
828 | func, msg, SINA(&epc->local_addr), | ||
829 | SINP(&epc->local_addr), | ||
830 | SINP(&epc->mapped_local_addr), | ||
831 | SINA(&epc->remote_addr), | ||
832 | SINP(&epc->remote_addr), | ||
833 | SINP(&epc->mapped_remote_addr)); | ||
834 | break; | ||
835 | case AF_INET6: | ||
836 | PDBG("%s %s %pI6:%u/%u <-> %pI6:%u/%u\n", | ||
837 | func, msg, SIN6A(&epc->local_addr), | ||
838 | SIN6P(&epc->local_addr), | ||
839 | SIN6P(&epc->mapped_local_addr), | ||
840 | SIN6A(&epc->remote_addr), | ||
841 | SIN6P(&epc->remote_addr), | ||
842 | SIN6P(&epc->mapped_remote_addr)); | ||
843 | break; | ||
844 | default: | ||
845 | break; | ||
846 | } | ||
847 | } | ||
848 | #undef SINA | ||
849 | #undef SINP | ||
850 | #undef SIN6A | ||
851 | #undef SIN6P | ||
852 | } | ||
853 | |||
810 | static inline struct c4iw_ep *to_ep(struct iw_cm_id *cm_id) | 854 | static inline struct c4iw_ep *to_ep(struct iw_cm_id *cm_id) |
811 | { | 855 | { |
812 | return cm_id->provider_data; | 856 | return cm_id->provider_data; |