The RDMA transport includes an ONCRDMA header that precedes the RPC 
message. This header needs to be saved in addition to the RPC message 
itself. The RPC transport uses page swapping to implement copy avoidance.
These transport dependencies are hidden in the xpt_defer routine allowing
the bulk of the deferral processing to remain in transport independent 
code.

Signed-off-by: Tom Tucker <[EMAIL PROTECTED]>
---

 include/linux/sunrpc/svcsock.h |    5 +++++
 net/sunrpc/svcsock.c           |    5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h
index a920e9b..145c82b 100644
--- a/include/linux/sunrpc/svcsock.h
+++ b/include/linux/sunrpc/svcsock.h
@@ -51,6 +51,10 @@ struct svc_xprt {
         * Accept a pending connection, for connection-oriented transports
         */
        int                     (*xpt_accept)(struct svc_sock *svsk);
+
+       /* RPC defer routine. */
+       struct cache_deferred_req *(*xpt_defer)(struct cache_req *req);
+
        /* Transport list link */
        struct list_head        xpt_list;
 };
@@ -138,6 +142,7 @@ void                svc_sock_add_connection(struct svc
 void           svc_sock_add_listener(struct svc_sock *);
 /* Add an initialised connectionless svc_sock to the server */
 void           svc_sock_add_connectionless(struct svc_sock *);
+void           svc_revisit(struct cache_deferred_req *dreq, int too_many);
 
 /*
  * svc_makesock socket characteristics
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 03ce7e9..b89c577 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1651,7 +1651,7 @@ svc_recv(struct svc_rqst *rqstp, long ti
        clear_bit(SK_OLD, &svsk->sk_flags);
 
        rqstp->rq_secure = svc_port_is_privileged(svc_addr(rqstp));
-       rqstp->rq_chandle.defer = svc_defer;
+       rqstp->rq_chandle.defer = svsk->sk_xprt->xpt_defer;
 
        if (serv->sv_stats)
                serv->sv_stats->netcnt++;
@@ -2116,7 +2116,7 @@ EXPORT_SYMBOL_GPL(svc_create_svcsock);
  * Handle defer and revisit of requests
  */
 
-static void svc_revisit(struct cache_deferred_req *dreq, int too_many)
+void svc_revisit(struct cache_deferred_req *dreq, int too_many)
 {
        struct svc_deferred_req *dr = container_of(dreq, struct 
svc_deferred_req, handle);
        struct svc_sock *svsk;
@@ -2136,6 +2136,7 @@ static void svc_revisit(struct cache_def
        svc_sock_enqueue(svsk);
        svc_sock_put(svsk);
 }
+EXPORT_SYMBOL_GPL(svc_revisit);
 
 static struct cache_deferred_req *
 svc_defer(struct cache_req *req)
_______________________________________________
general mailing list
general@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to