diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
commit | 0191b625ca5a46206d2fb862bb08f36f2fcb3b31 (patch) | |
tree | 454d1842b1833d976da62abcbd5c47521ebe9bd7 /net/sunrpc/xprtrdma | |
parent | 54a696bd07c14d3b1192d03ce7269bc59b45209a (diff) | |
parent | eb56092fc168bf5af199d47af50c0d84a96db898 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits)
net: Allow dependancies of FDDI & Tokenring to be modular.
igb: Fix build warning when DCA is disabled.
net: Fix warning fallout from recent NAPI interface changes.
gro: Fix potential use after free
sfc: If AN is enabled, always read speed/duplex from the AN advertising bits
sfc: When disabling the NIC, close the device rather than unregistering it
sfc: SFT9001: Add cable diagnostics
sfc: Add support for multiple PHY self-tests
sfc: Merge top-level functions for self-tests
sfc: Clean up PHY mode management in loopback self-test
sfc: Fix unreliable link detection in some loopback modes
sfc: Generate unique names for per-NIC workqueues
802.3ad: use standard ethhdr instead of ad_header
802.3ad: generalize out mac address initializer
802.3ad: initialize ports LACPDU from const initializer
802.3ad: remove typedef around ad_system
802.3ad: turn ports is_individual into a bool
802.3ad: turn ports is_enabled into a bool
802.3ad: make ntt bool
ixgbe: Fix set_ringparam in ixgbe to use the same memory pools.
...
Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due
to the conversion to %pI (in this networking merge) and the addition of
doing IPv6 addresses (from the earlier merge of CIFS).
Diffstat (limited to 'net/sunrpc/xprtrdma')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 4 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_sendto.c | 2 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_transport.c | 16 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/transport.c | 14 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/verbs.c | 16 |
5 files changed, 26 insertions, 26 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c index a4756576d687..629a28764da9 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | |||
@@ -646,8 +646,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp) | |||
646 | ret = rdma_read_xdr(rdma_xprt, rmsgp, rqstp, ctxt); | 646 | ret = rdma_read_xdr(rdma_xprt, rmsgp, rqstp, ctxt); |
647 | if (ret > 0) { | 647 | if (ret > 0) { |
648 | /* read-list posted, defer until data received from client. */ | 648 | /* read-list posted, defer until data received from client. */ |
649 | svc_xprt_received(xprt); | 649 | goto defer; |
650 | return 0; | ||
651 | } | 650 | } |
652 | if (ret < 0) { | 651 | if (ret < 0) { |
653 | /* Post of read-list failed, free context. */ | 652 | /* Post of read-list failed, free context. */ |
@@ -679,6 +678,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp) | |||
679 | * close bit and call svc_xprt_delete | 678 | * close bit and call svc_xprt_delete |
680 | */ | 679 | */ |
681 | set_bit(XPT_CLOSE, &xprt->xpt_flags); | 680 | set_bit(XPT_CLOSE, &xprt->xpt_flags); |
681 | defer: | ||
682 | svc_xprt_received(xprt); | 682 | svc_xprt_received(xprt); |
683 | return 0; | 683 | return 0; |
684 | } | 684 | } |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c index 9a7a8e7ae038..a3334e3b73cc 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c | |||
@@ -69,7 +69,7 @@ | |||
69 | * array is only concerned with the reply we are assured that we have | 69 | * array is only concerned with the reply we are assured that we have |
70 | * on extra page for the RPCRMDA header. | 70 | * on extra page for the RPCRMDA header. |
71 | */ | 71 | */ |
72 | int fast_reg_xdr(struct svcxprt_rdma *xprt, | 72 | static int fast_reg_xdr(struct svcxprt_rdma *xprt, |
73 | struct xdr_buf *xdr, | 73 | struct xdr_buf *xdr, |
74 | struct svc_rdma_req_map *vec) | 74 | struct svc_rdma_req_map *vec) |
75 | { | 75 | { |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index 6fb493cbd29f..3d810e7df3fb 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c | |||
@@ -61,7 +61,7 @@ static int svc_rdma_has_wspace(struct svc_xprt *xprt); | |||
61 | static void rq_cq_reap(struct svcxprt_rdma *xprt); | 61 | static void rq_cq_reap(struct svcxprt_rdma *xprt); |
62 | static void sq_cq_reap(struct svcxprt_rdma *xprt); | 62 | static void sq_cq_reap(struct svcxprt_rdma *xprt); |
63 | 63 | ||
64 | DECLARE_TASKLET(dto_tasklet, dto_tasklet_func, 0UL); | 64 | static DECLARE_TASKLET(dto_tasklet, dto_tasklet_func, 0UL); |
65 | static DEFINE_SPINLOCK(dto_lock); | 65 | static DEFINE_SPINLOCK(dto_lock); |
66 | static LIST_HEAD(dto_xprt_q); | 66 | static LIST_HEAD(dto_xprt_q); |
67 | 67 | ||
@@ -827,7 +827,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) | |||
827 | struct rdma_conn_param conn_param; | 827 | struct rdma_conn_param conn_param; |
828 | struct ib_qp_init_attr qp_attr; | 828 | struct ib_qp_init_attr qp_attr; |
829 | struct ib_device_attr devattr; | 829 | struct ib_device_attr devattr; |
830 | int dma_mr_acc; | 830 | int uninitialized_var(dma_mr_acc); |
831 | int need_dma_mr; | 831 | int need_dma_mr; |
832 | int ret; | 832 | int ret; |
833 | int i; | 833 | int i; |
@@ -1048,21 +1048,21 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) | |||
1048 | 1048 | ||
1049 | dprintk("svcrdma: new connection %p accepted with the following " | 1049 | dprintk("svcrdma: new connection %p accepted with the following " |
1050 | "attributes:\n" | 1050 | "attributes:\n" |
1051 | " local_ip : %d.%d.%d.%d\n" | 1051 | " local_ip : %pI4\n" |
1052 | " local_port : %d\n" | 1052 | " local_port : %d\n" |
1053 | " remote_ip : %d.%d.%d.%d\n" | 1053 | " remote_ip : %pI4\n" |
1054 | " remote_port : %d\n" | 1054 | " remote_port : %d\n" |
1055 | " max_sge : %d\n" | 1055 | " max_sge : %d\n" |
1056 | " sq_depth : %d\n" | 1056 | " sq_depth : %d\n" |
1057 | " max_requests : %d\n" | 1057 | " max_requests : %d\n" |
1058 | " ord : %d\n", | 1058 | " ord : %d\n", |
1059 | newxprt, | 1059 | newxprt, |
1060 | NIPQUAD(((struct sockaddr_in *)&newxprt->sc_cm_id-> | 1060 | &((struct sockaddr_in *)&newxprt->sc_cm_id-> |
1061 | route.addr.src_addr)->sin_addr.s_addr), | 1061 | route.addr.src_addr)->sin_addr.s_addr, |
1062 | ntohs(((struct sockaddr_in *)&newxprt->sc_cm_id-> | 1062 | ntohs(((struct sockaddr_in *)&newxprt->sc_cm_id-> |
1063 | route.addr.src_addr)->sin_port), | 1063 | route.addr.src_addr)->sin_port), |
1064 | NIPQUAD(((struct sockaddr_in *)&newxprt->sc_cm_id-> | 1064 | &((struct sockaddr_in *)&newxprt->sc_cm_id-> |
1065 | route.addr.dst_addr)->sin_addr.s_addr), | 1065 | route.addr.dst_addr)->sin_addr.s_addr, |
1066 | ntohs(((struct sockaddr_in *)&newxprt->sc_cm_id-> | 1066 | ntohs(((struct sockaddr_in *)&newxprt->sc_cm_id-> |
1067 | route.addr.dst_addr)->sin_port), | 1067 | route.addr.dst_addr)->sin_port), |
1068 | newxprt->sc_max_sge, | 1068 | newxprt->sc_max_sge, |
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c index 9839c3d94145..1dd6123070e9 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c | |||
@@ -174,7 +174,7 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt) | |||
174 | 174 | ||
175 | buf = kzalloc(20, GFP_KERNEL); | 175 | buf = kzalloc(20, GFP_KERNEL); |
176 | if (buf) | 176 | if (buf) |
177 | snprintf(buf, 20, NIPQUAD_FMT, NIPQUAD(addr->sin_addr.s_addr)); | 177 | snprintf(buf, 20, "%pI4", &addr->sin_addr.s_addr); |
178 | xprt->address_strings[RPC_DISPLAY_ADDR] = buf; | 178 | xprt->address_strings[RPC_DISPLAY_ADDR] = buf; |
179 | 179 | ||
180 | buf = kzalloc(8, GFP_KERNEL); | 180 | buf = kzalloc(8, GFP_KERNEL); |
@@ -186,8 +186,8 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt) | |||
186 | 186 | ||
187 | buf = kzalloc(48, GFP_KERNEL); | 187 | buf = kzalloc(48, GFP_KERNEL); |
188 | if (buf) | 188 | if (buf) |
189 | snprintf(buf, 48, "addr="NIPQUAD_FMT" port=%u proto=%s", | 189 | snprintf(buf, 48, "addr=%pI4 port=%u proto=%s", |
190 | NIPQUAD(addr->sin_addr.s_addr), | 190 | &addr->sin_addr.s_addr, |
191 | ntohs(addr->sin_port), "rdma"); | 191 | ntohs(addr->sin_port), "rdma"); |
192 | xprt->address_strings[RPC_DISPLAY_ALL] = buf; | 192 | xprt->address_strings[RPC_DISPLAY_ALL] = buf; |
193 | 193 | ||
@@ -204,8 +204,8 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt) | |||
204 | 204 | ||
205 | buf = kzalloc(30, GFP_KERNEL); | 205 | buf = kzalloc(30, GFP_KERNEL); |
206 | if (buf) | 206 | if (buf) |
207 | snprintf(buf, 30, NIPQUAD_FMT".%u.%u", | 207 | snprintf(buf, 30, "%pI4.%u.%u", |
208 | NIPQUAD(addr->sin_addr.s_addr), | 208 | &addr->sin_addr.s_addr, |
209 | ntohs(addr->sin_port) >> 8, | 209 | ntohs(addr->sin_port) >> 8, |
210 | ntohs(addr->sin_port) & 0xff); | 210 | ntohs(addr->sin_port) & 0xff); |
211 | xprt->address_strings[RPC_DISPLAY_UNIVERSAL_ADDR] = buf; | 211 | xprt->address_strings[RPC_DISPLAY_UNIVERSAL_ADDR] = buf; |
@@ -369,8 +369,8 @@ xprt_setup_rdma(struct xprt_create *args) | |||
369 | if (ntohs(sin->sin_port) != 0) | 369 | if (ntohs(sin->sin_port) != 0) |
370 | xprt_set_bound(xprt); | 370 | xprt_set_bound(xprt); |
371 | 371 | ||
372 | dprintk("RPC: %s: %u.%u.%u.%u:%u\n", __func__, | 372 | dprintk("RPC: %s: %pI4:%u\n", |
373 | NIPQUAD(sin->sin_addr.s_addr), ntohs(sin->sin_port)); | 373 | __func__, &sin->sin_addr.s_addr, ntohs(sin->sin_port)); |
374 | 374 | ||
375 | /* Set max requests */ | 375 | /* Set max requests */ |
376 | cdata.max_requests = xprt->max_reqs; | 376 | cdata.max_requests = xprt->max_reqs; |
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index a5fef5e6c323..3b21e0cc5e69 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c | |||
@@ -276,7 +276,9 @@ rpcrdma_conn_upcall(struct rdma_cm_id *id, struct rdma_cm_event *event) | |||
276 | struct rpcrdma_xprt *xprt = id->context; | 276 | struct rpcrdma_xprt *xprt = id->context; |
277 | struct rpcrdma_ia *ia = &xprt->rx_ia; | 277 | struct rpcrdma_ia *ia = &xprt->rx_ia; |
278 | struct rpcrdma_ep *ep = &xprt->rx_ep; | 278 | struct rpcrdma_ep *ep = &xprt->rx_ep; |
279 | #ifdef RPC_DEBUG | ||
279 | struct sockaddr_in *addr = (struct sockaddr_in *) &ep->rep_remote_addr; | 280 | struct sockaddr_in *addr = (struct sockaddr_in *) &ep->rep_remote_addr; |
281 | #endif | ||
280 | struct ib_qp_attr attr; | 282 | struct ib_qp_attr attr; |
281 | struct ib_qp_init_attr iattr; | 283 | struct ib_qp_init_attr iattr; |
282 | int connstate = 0; | 284 | int connstate = 0; |
@@ -323,12 +325,11 @@ rpcrdma_conn_upcall(struct rdma_cm_id *id, struct rdma_cm_event *event) | |||
323 | case RDMA_CM_EVENT_DEVICE_REMOVAL: | 325 | case RDMA_CM_EVENT_DEVICE_REMOVAL: |
324 | connstate = -ENODEV; | 326 | connstate = -ENODEV; |
325 | connected: | 327 | connected: |
326 | dprintk("RPC: %s: %s: %u.%u.%u.%u:%u" | 328 | dprintk("RPC: %s: %s: %pI4:%u (ep 0x%p event 0x%x)\n", |
327 | " (ep 0x%p event 0x%x)\n", | ||
328 | __func__, | 329 | __func__, |
329 | (event->event <= 11) ? conn[event->event] : | 330 | (event->event <= 11) ? conn[event->event] : |
330 | "unknown connection error", | 331 | "unknown connection error", |
331 | NIPQUAD(addr->sin_addr.s_addr), | 332 | &addr->sin_addr.s_addr, |
332 | ntohs(addr->sin_port), | 333 | ntohs(addr->sin_port), |
333 | ep, event->event); | 334 | ep, event->event); |
334 | atomic_set(&rpcx_to_rdmax(ep->rep_xprt)->rx_buf.rb_credits, 1); | 335 | atomic_set(&rpcx_to_rdmax(ep->rep_xprt)->rx_buf.rb_credits, 1); |
@@ -348,18 +349,17 @@ connected: | |||
348 | if (connstate == 1) { | 349 | if (connstate == 1) { |
349 | int ird = attr.max_dest_rd_atomic; | 350 | int ird = attr.max_dest_rd_atomic; |
350 | int tird = ep->rep_remote_cma.responder_resources; | 351 | int tird = ep->rep_remote_cma.responder_resources; |
351 | printk(KERN_INFO "rpcrdma: connection to %u.%u.%u.%u:%u " | 352 | printk(KERN_INFO "rpcrdma: connection to %pI4:%u " |
352 | "on %s, memreg %d slots %d ird %d%s\n", | 353 | "on %s, memreg %d slots %d ird %d%s\n", |
353 | NIPQUAD(addr->sin_addr.s_addr), | 354 | &addr->sin_addr.s_addr, |
354 | ntohs(addr->sin_port), | 355 | ntohs(addr->sin_port), |
355 | ia->ri_id->device->name, | 356 | ia->ri_id->device->name, |
356 | ia->ri_memreg_strategy, | 357 | ia->ri_memreg_strategy, |
357 | xprt->rx_buf.rb_max_requests, | 358 | xprt->rx_buf.rb_max_requests, |
358 | ird, ird < 4 && ird < tird / 2 ? " (low!)" : ""); | 359 | ird, ird < 4 && ird < tird / 2 ? " (low!)" : ""); |
359 | } else if (connstate < 0) { | 360 | } else if (connstate < 0) { |
360 | printk(KERN_INFO "rpcrdma: connection to %u.%u.%u.%u:%u " | 361 | printk(KERN_INFO "rpcrdma: connection to %pI4:%u closed (%d)\n", |
361 | "closed (%d)\n", | 362 | &addr->sin_addr.s_addr, |
362 | NIPQUAD(addr->sin_addr.s_addr), | ||
363 | ntohs(addr->sin_port), | 363 | ntohs(addr->sin_port), |
364 | connstate); | 364 | connstate); |
365 | } | 365 | } |