Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4649812ybl; Mon, 13 Jan 2020 17:50:55 -0800 (PST) X-Google-Smtp-Source: APXvYqxCgEaGfjA460eY3AYguBs3EkExWBTpMhMAehvAFzcCgHrJHlmxx0ciAUVED8gdO4hzfG13 X-Received: by 2002:aca:3542:: with SMTP id c63mr15357089oia.135.1578966655855; Mon, 13 Jan 2020 17:50:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578966655; cv=none; d=google.com; s=arc-20160816; b=i8QrH4VaXt4tlqvcADEucm7y00libBGFahNIiFOcDmh8w/zccp/4JFZwnHpwFeT6oO Gvy5xaknZww/cSgY7KJeb+h7SLHaPiIjpFvJ3MTht6aYBRFpOYzv6oRhzaJYLJnLwN10 JoPaO96psoAVEKPV0CV1VLsyg4fSMgDGF84LmxkEUxCEoiWVcjr01eMFz38i+ZLy/iHl NTkkNNAsiY+yM/SHC1wK7pXNzOL2Oeia1Ua1O6Bb6egv/2mvGlHC6Xqjin2HpYnrjOTO egy/u4b2m8NpbrE8l275Ar5GhUHr93o2YzfHz8+BiA6OnCTPlRlDeDpjnHRJwkYNEBGX z0xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=dbOTCt1Jy/5ixH1+zM/4jFaSoET4MFpcc6Ziu6cX3kI=; b=twRJy4z+0XrFpoBXmT5Guve7mRW8LAMZ1xtTqEQPhg6dWIoE8VyzfTFOVKISG+Evxz 0U8HTLyaKWFO9rX6mPGYs/m5m3TUg9RqwB+sr+NhIvIyKrvq/6VfK5kEdwidtSNSGSz6 cR9XEymqR75fT8Z426ciXuzF7Qu9lYlnfE1fr5wd/9uVfu2eBhUjZUt1M66NqQX44f/F q4wyH41BpkA+vhidk7CNmBSGOdzbQkFfTaKJLd1qYqlNRGpJyO7aZZaSA017T+uH0M2V 1I1+nhOM5LU18mkHsbk2HISL6HdirOaF5y+apIi8Mj0C1iaxizXtFNQGztYjXBbDuKdZ Kl4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=m9wqUdYP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p19si6664427oic.216.2020.01.13.17.50.42; Mon, 13 Jan 2020 17:50:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=m9wqUdYP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729137AbgANAls (ORCPT + 99 others); Mon, 13 Jan 2020 19:41:48 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:41174 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728778AbgANAlr (ORCPT ); Mon, 13 Jan 2020 19:41:47 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00E0d6d2101644; Tue, 14 Jan 2020 00:41:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2019-08-05; bh=dbOTCt1Jy/5ixH1+zM/4jFaSoET4MFpcc6Ziu6cX3kI=; b=m9wqUdYP0zqcgh7R1HUt2GTLRmrs1z8mH+1+K0qTKkrVFtEG3lmczT1YssEuwapmmP24 22ZRxvRZ4IzhbZYOqtiUzjZydtq1wEUBWDld5Npvgbv+Z8ya6s9aYFj6YtJQSRdHYNo2 BOEboORTtBSrccw5Z+m4SaQcc4qpNqm72FdYHkud0Q4+Roa7KuNcxb8sBAsPV/Fjvmw9 lU++4IEdjQlW76bpLEW6Op7pMOsRxE+cVQh4trkncxTlgPikxY25aK0KMytUFZvJroDm 1pxrlEFMR/nMxvMEeEN1xKolyrrliV80A589b/MlpSkd7tIHW1KnZAEvT9Rn5fsaJYrk Sg== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 2xf74s2h35-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Jan 2020 00:41:39 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00E0d7eT057238; Tue, 14 Jan 2020 00:41:38 GMT Received: from pps.reinject (localhost [127.0.0.1]) by userp3020.oracle.com with ESMTP id 2xfrgjmaet-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 14 Jan 2020 00:41:38 +0000 Received: from userp3020.oracle.com (userp3020.oracle.com [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id 00E0fbfj067024; Tue, 14 Jan 2020 00:41:38 GMT Received: from ca-dev107.us.oracle.com (ca-dev107.us.oracle.com [10.129.135.36]) by userp3020.oracle.com with ESMTP id 2xfrgjmae0-2; Tue, 14 Jan 2020 00:41:38 +0000 From: rao Shoaib To: linux-rdma@vger.kernel.org Cc: jgg@ziepe.ca, monis@mellanox.com, dledford@redhat.com, sean.hefty@intel.com, hal.rosenstock@gmail.com, linux-kernel@vger.kernel.org, Rao Shoaib Subject: [PATCH v3 1/2] Introduce maximum WQE size to check limits Date: Mon, 13 Jan 2020 16:41:19 -0800 Message-Id: <1578962480-17814-2-git-send-email-rao.shoaib@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1578962480-17814-1-git-send-email-rao.shoaib@oracle.com> References: <1578962480-17814-1-git-send-email-rao.shoaib@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9499 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=945 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001140003 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rao Shoaib Introduce maximum WQE size to impose limits on max SGE's and inline data Signed-off-by: Rao Shoaib --- drivers/infiniband/sw/rxe/rxe_param.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/sw/rxe/rxe_param.h b/drivers/infiniband/sw/rxe/rxe_param.h index 1b596fb..a0e4075 100644 --- a/drivers/infiniband/sw/rxe/rxe_param.h +++ b/drivers/infiniband/sw/rxe/rxe_param.h @@ -34,6 +34,8 @@ #ifndef RXE_PARAM_H #define RXE_PARAM_H +#include + static inline enum ib_mtu rxe_mtu_int_to_enum(int mtu) { if (mtu < 256) @@ -68,7 +70,6 @@ enum rxe_device_param { RXE_HW_VER = 0, RXE_MAX_QP = 0x10000, RXE_MAX_QP_WR = 0x4000, - RXE_MAX_INLINE_DATA = 400, RXE_DEVICE_CAP_FLAGS = IB_DEVICE_BAD_PKEY_CNTR | IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_AUTO_PATH_MIG @@ -80,6 +81,10 @@ enum rxe_device_param { | IB_DEVICE_SRQ_RESIZE | IB_DEVICE_MEM_MGT_EXTENSIONS, RXE_MAX_SGE = 32, + RXE_MAX_WQE_SIZE = sizeof(struct rxe_send_wqe) + + sizeof(struct ib_sge) * RXE_MAX_SGE, + RXE_MAX_INLINE_DATA = RXE_MAX_WQE_SIZE - + sizeof(struct rxe_send_wqe), RXE_MAX_SGE_RD = 32, RXE_MAX_CQ = 16384, RXE_MAX_LOG_CQE = 15, -- 1.8.3.1