verbs.c (7731b8bc94e599c9a79e428f3359ff2c34b7576a) verbs.c (33023fb85a42b53bf778bc025f9667b582282be4)
1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2/*
3 * Copyright (c) 2014-2017 Oracle. All rights reserved.
4 * Copyright (c) 2003-2007 Network Appliance, Inc. All rights reserved.
5 *
6 * This software is available to you under a choice of one of two
7 * licenses. You may choose to be licensed under the terms of the GNU
8 * General Public License (GPL) Version 2, available from the file

--- 494 unchanged lines hidden (view full) ---

503rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia,
504 struct rpcrdma_create_data_internal *cdata)
505{
506 struct rpcrdma_connect_private *pmsg = &ep->rep_cm_private;
507 struct ib_cq *sendcq, *recvcq;
508 unsigned int max_sge;
509 int rc;
510
1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2/*
3 * Copyright (c) 2014-2017 Oracle. All rights reserved.
4 * Copyright (c) 2003-2007 Network Appliance, Inc. All rights reserved.
5 *
6 * This software is available to you under a choice of one of two
7 * licenses. You may choose to be licensed under the terms of the GNU
8 * General Public License (GPL) Version 2, available from the file

--- 494 unchanged lines hidden (view full) ---

503rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia,
504 struct rpcrdma_create_data_internal *cdata)
505{
506 struct rpcrdma_connect_private *pmsg = &ep->rep_cm_private;
507 struct ib_cq *sendcq, *recvcq;
508 unsigned int max_sge;
509 int rc;
510
511 max_sge = min_t(unsigned int, ia->ri_device->attrs.max_sge,
511 max_sge = min_t(unsigned int, ia->ri_device->attrs.max_send_sge,
512 RPCRDMA_MAX_SEND_SGES);
513 if (max_sge < RPCRDMA_MIN_SEND_SGES) {
514 pr_warn("rpcrdma: HCA provides only %d send SGEs\n", max_sge);
515 return -ENOMEM;
516 }
517 ia->ri_max_send_sges = max_sge;
518
519 rc = ia->ri_ops->ro_open(ia, ep, cdata);

--- 1055 unchanged lines hidden ---
512 RPCRDMA_MAX_SEND_SGES);
513 if (max_sge < RPCRDMA_MIN_SEND_SGES) {
514 pr_warn("rpcrdma: HCA provides only %d send SGEs\n", max_sge);
515 return -ENOMEM;
516 }
517 ia->ri_max_send_sges = max_sge;
518
519 rc = ia->ri_ops->ro_open(ia, ep, cdata);

--- 1055 unchanged lines hidden ---