| .. | .. |
|---|
| 4 | 4 | |
|---|
| 5 | 5 | NetApp provides this source code under the GPL v2 License. |
|---|
| 6 | 6 | The GPL v2 license is available at |
|---|
| 7 | | -http://opensource.org/licenses/gpl-license.php. |
|---|
| 7 | +https://opensource.org/licenses/gpl-license.php. |
|---|
| 8 | 8 | |
|---|
| 9 | 9 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
|---|
| 10 | 10 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
|---|
| .. | .. |
|---|
| 34 | 34 | #ifdef CONFIG_SUNRPC_BACKCHANNEL |
|---|
| 35 | 35 | struct rpc_rqst *xprt_lookup_bc_request(struct rpc_xprt *xprt, __be32 xid); |
|---|
| 36 | 36 | void xprt_complete_bc_request(struct rpc_rqst *req, uint32_t copied); |
|---|
| 37 | +void xprt_init_bc_request(struct rpc_rqst *req, struct rpc_task *task); |
|---|
| 37 | 38 | void xprt_free_bc_request(struct rpc_rqst *req); |
|---|
| 38 | 39 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); |
|---|
| 39 | 40 | void xprt_destroy_backchannel(struct rpc_xprt *, unsigned int max_reqs); |
|---|
| .. | .. |
|---|
| 42 | 43 | int xprt_setup_bc(struct rpc_xprt *xprt, unsigned int min_reqs); |
|---|
| 43 | 44 | void xprt_destroy_bc(struct rpc_xprt *xprt, unsigned int max_reqs); |
|---|
| 44 | 45 | void xprt_free_bc_rqst(struct rpc_rqst *req); |
|---|
| 46 | +unsigned int xprt_bc_max_slots(struct rpc_xprt *xprt); |
|---|
| 45 | 47 | |
|---|
| 46 | 48 | /* |
|---|
| 47 | 49 | * Determine if a shared backchannel is in use |
|---|
| 48 | 50 | */ |
|---|
| 49 | | -static inline int svc_is_backchannel(const struct svc_rqst *rqstp) |
|---|
| 51 | +static inline bool svc_is_backchannel(const struct svc_rqst *rqstp) |
|---|
| 50 | 52 | { |
|---|
| 51 | | - if (rqstp->rq_server->sv_bc_xprt) |
|---|
| 52 | | - return 1; |
|---|
| 53 | | - return 0; |
|---|
| 53 | + return rqstp->rq_server->sv_bc_enabled; |
|---|
| 54 | +} |
|---|
| 55 | + |
|---|
| 56 | +static inline void set_bc_enabled(struct svc_serv *serv) |
|---|
| 57 | +{ |
|---|
| 58 | + serv->sv_bc_enabled = true; |
|---|
| 54 | 59 | } |
|---|
| 55 | 60 | #else /* CONFIG_SUNRPC_BACKCHANNEL */ |
|---|
| 56 | 61 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, |
|---|
| .. | .. |
|---|
| 59 | 64 | return 0; |
|---|
| 60 | 65 | } |
|---|
| 61 | 66 | |
|---|
| 62 | | -static inline int svc_is_backchannel(const struct svc_rqst *rqstp) |
|---|
| 67 | +static inline void xprt_destroy_backchannel(struct rpc_xprt *xprt, |
|---|
| 68 | + unsigned int max_reqs) |
|---|
| 63 | 69 | { |
|---|
| 64 | | - return 0; |
|---|
| 70 | +} |
|---|
| 71 | + |
|---|
| 72 | +static inline bool svc_is_backchannel(const struct svc_rqst *rqstp) |
|---|
| 73 | +{ |
|---|
| 74 | + return false; |
|---|
| 75 | +} |
|---|
| 76 | + |
|---|
| 77 | +static inline void set_bc_enabled(struct svc_serv *serv) |
|---|
| 78 | +{ |
|---|
| 65 | 79 | } |
|---|
| 66 | 80 | |
|---|
| 67 | 81 | static inline void xprt_free_bc_request(struct rpc_rqst *req) |
|---|