From patchwork Mon Jun 26 18:06:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kalderon, Michal" X-Patchwork-Id: 9810163 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 17C0160209 for ; Mon, 26 Jun 2017 18:11:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B7C428450 for ; Mon, 26 Jun 2017 18:11:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1D8328520; Mon, 26 Jun 2017 18:11:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B18A428450 for ; Mon, 26 Jun 2017 18:11:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751425AbdFZSLK (ORCPT ); Mon, 26 Jun 2017 14:11:10 -0400 Received: from mail-sn1nam02on0044.outbound.protection.outlook.com ([104.47.36.44]:52352 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751386AbdFZSLH (ORCPT ); Mon, 26 Jun 2017 14:11:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=VPc9E8DDb+LT/WAJVEykd05JBsVQwN6dzWgvWEUbTdk=; b=J+XZVfuahN4gt9kvDswhuj0hwBT/5pH8BTkVrNUvTQ/J2G3/xUNIjlFN+h09x9DboZtDiNFYa5ci+gv45GwDR7YjyBbuLN+i11KOT90XvFj5jvW38J1u9lKb5Xw9MiaQZl6p29pdaQ7Zmc4+RIhz+y7C9OnaW7Py46xx7Y3Us8w= Received: from CO2PR07CA0059.namprd07.prod.outlook.com (2603:10b6:100::27) by CO1PR07MB428.namprd07.prod.outlook.com (2a01:111:e400:103d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Mon, 26 Jun 2017 18:11:05 +0000 Received: from BY2FFO11FD026.protection.gbl (2a01:111:f400:7c0c::173) by CO2PR07CA0059.outlook.office365.com (2603:10b6:100::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15 via Frontend Transport; Mon, 26 Jun 2017 18:11:05 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BY2FFO11FD026.mail.protection.outlook.com (10.1.15.215) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1199.9 via Frontend Transport; Mon, 26 Jun 2017 18:11:05 +0000 Received: from lb-tlvb-michal.il.qlogic.com.com (10.185.6.89) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Mon, 26 Jun 2017 11:11:03 -0700 From: Michal Kalderon To: , , , , , , , CC: Michal Kalderon , Yuval Mintz , Ariel Elior Subject: [RFC 06/19] qed: iWARP CM add listener functions and initial SYN processing Date: Mon, 26 Jun 2017 21:06:56 +0300 Message-ID: <1498500429-22557-7-git-send-email-Michal.Kalderon@cavium.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1498500429-22557-1-git-send-email-Michal.Kalderon@cavium.com> References: <1498500429-22557-1-git-send-email-Michal.Kalderon@cavium.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39450400003)(39840400002)(39850400002)(39410400002)(39400400002)(2980300002)(428002)(189002)(199003)(9170700003)(104016004)(38730400002)(107886003)(54906002)(36756003)(6666003)(47776003)(2950100002)(50986999)(76176999)(77096006)(305945005)(105586002)(2201001)(106466001)(5003940100001)(101416001)(50466002)(72206003)(48376002)(8936002)(2906002)(4326008)(189998001)(478600001)(356003)(50226002)(5660300001)(8676002)(81166006)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO1PR07MB428; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD026; 1:9nYPm1RB1POHuSL4MfWTHEsdGI83D5Zgrg7S1OAbjPvx3LQV5ZPB7UfTIA0jkh2OwT1qBdcWytUv1e9EWuFAVHt/lsqJ05Mk0jKgm8HzDrZYCztqgYCqtyxmDf7GuBg1b6eVKgNXNB0etk5jxD69RNocWa3gNBNi1oevPg9A2O8ALCJ1TgJghSHCCz2wFnUHoigwejZ7HXs2ITfI060dD82hx8AMNbIpjiY9XX4hOOtLF/BW3ir4q/ODVIzB5cpg7eNunLNhFXizyOY3P4maS4xjVMIlEG/UiTlNZxageqDFvOgnm6qzzuIbAcUcjJLeeQb5kFH+n/7SaAWfK8c1j/dA5U67pj7qn/0KPPL4Q7bBMIFxLOwzSNbRcwlwrSJda14aLr+dhbr8MYjILymUbtcSnN7lgbZYGHsdJ24cfC13eP5aoAH4HTmb8CeKkaO1jp8YQfEMnrDChIy++FdHOyLWjhuGOm0K9e9xIFNg0LQ8aj5g5yWxebxv88DFzw4dQxnubsE4eNzmO/aJDWGKK/xKJzFMb8ILb2jI4VxXqEoYRlWaQTXYh3+1V18SoCDIiMCAUztpLcmxqHdKVlSp6T8cFjClUh10apxWsk0mameu6ZBfNutpTCifcMJiAJvSTyRI1HnAD2JbCpz3euJInG6UVHRYzkjYn1RoaAoQEr7nqh4+N0us5CyI/AUfJq9YVHd8DJQ9c0ttL5R3NHlz0CBkd8XJ81HS0c/i3KGQJl/2411p8G1bmtnftRNzvX+uiSdUL1RWDywh91aMGGEVcvqFmVRMXfqjac8Dr/lFWlK7/jJOLRrHZAymtKhseUnSOUanZRob6JvTMerkSOX6x86HVA0sd87zKp1+hJHTWZk= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9ab4c2c5-e553-411b-166d-08d4bcbeb635 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506067)(300135500095); SRVR:CO1PR07MB428; X-Microsoft-Exchange-Diagnostics: 1; CO1PR07MB428; 3:WGcFwPss4dxHD4eIwgPfu+Sjo0TCQfC+lxW7wAU3D41Byl5KxMq+D/y1Ex0bRpuQcRPBdjSa8rsEGwHFPI3/a+tvY9+jjVG3iunj7o0eBf5dgcPUiR2jlxrXM/FfKOfy5N0yybR6rUjPpYXrZN/8duyDfeDaizb/ctTfvzd37x7X/XMEde59W59x/qI3WIQD3WdgDaNJqhoG/L6XCVZ9F0nvFwACRSJ43GI0cu8/9864Fbu1CRKEGz4SypS5CGwUv3W6abuYk3+b0PfvaOa6DXsbkXZ+efv6Whl2rPoY4s+HvGvKxt+m8CcwcK9cX+EChS2MGv27CXS2DX9xCCByqgbGILPBDjZ+SfP95zNC2rqUd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ZUIWNi3VRbj4q5MaCLZXq5/1Rp8Y2lml0THOpFBG7KeZfe55sY9YIi7wCXiIp8YAcTVRnAcnPfrdRfdHo+GFVroylxzemjX0iHmJ7IPyWMFM6RyiwBbCJLjdd21RQk3BcGkasCEeHvc+cUn5id76NG5g2fTTJlA== X-Microsoft-Exchange-Diagnostics: 1; CO1PR07MB428; 20:zdtg0ADYYYqwDJkSy4lKx4Ps6wVZge2bA2IvAk1RQcgl0iNu0kWbGt3WFlKmDjA1V3elO/qYWGnopGomR0kgrQ9W+iW1oO8co0rLAmLq/8FvyiMP65t3vsWwJCh4ND9DJ4tzV0m3jcJ67mV5l9ymcvUB9J6dnLpT7A+iPrBG7OPugWkGEkd88WLxkzBUF0R6aXW2EBh+8pKPFso/y/mPm3iFj56AASJ5EmbEnJnQlH0ySxXuRIPANSweFYwc8cDNjPsMBZr/4/5W9qb7nOcOpclDRbSYdT0clLlgLLh35XS+BSJIfjKbCvAmHF0s/Z4k59jGC91tGBhjDJl0rI3K9wV/2E+c5stlbn4lYWQHbCIU3pF0zImExgVcux0TcmDGHRkxUJeO5bHrIhlcFdcUwKefvsjl9OH++rm3It+FHnjgKB2wvoK7MNctV3HvHw7jHc8s3P5ySw6JP+9KsfXHMInGdpcnLd0MqvbD9+lO2NnkAUsIT0gelFC330VgnIBU X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13016025)(5005006)(13018025)(8121501046)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6041248)(20161123558100)(20161123560025)(20161123564025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO1PR07MB428; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO1PR07MB428; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO1PR07MB428; 4:o1+Wn//yojZrCUKcWAKXX4rbTndTP/fKAcDPAr8zffO?= =?us-ascii?Q?kALvBPjKefmb3DcA28xdVFpz67XnugCaCXJzI2dDksq2EoahHxzRmdBTHm0U?= =?us-ascii?Q?xX1l0AuDK7eJReHGRdsaKPuaT10vC8fpEUe7tBeexJNhfL/5boYGlI6yhjf2?= =?us-ascii?Q?MJussZ7SpVP/5IUNdSbowKGxFPRYGlUGAasri4BYeTDbfAVlRM9+nm1GcTxM?= =?us-ascii?Q?lE8uqPiXvEaXiJF3EsgdCCsgbxNHcsxFN9656Irwgjqfkzk/ZDgWKrqUZkjQ?= =?us-ascii?Q?wb4d6cDUUqtHF+rz+wS2Td4AUPXhqvOp1V/wfSgEl/MrGPy/QoE7wlFgUSXg?= =?us-ascii?Q?NoMHMq+UqHGfNNt1tZb4pTvClFNZhmBX37rT31XcTePn40MKMHE2rrnRX1o1?= =?us-ascii?Q?FEwuX6EaikKTPR7raqJjSlWqL88z5EUGVlxOn+iDpfZLA2E3P5Md34zd4LYY?= =?us-ascii?Q?4xWLE9p6UbffUjEiBUhM/j4pbZPitYrPW0i9i4On5/LgkirtFIvNm8pLuTQ3?= =?us-ascii?Q?M8dcaxcEFhAiL7ElJPJ3Beo9JDs3t3hu5hEpsl1heaC/Rg8NAXDl8yGvQwSC?= =?us-ascii?Q?xbQEpY5CE94O8zUz3rUBX+9ckwUjNSa33glICrUaE2KJNygqjWegBSwD5H4i?= =?us-ascii?Q?J+SpSnBktHoTtztlON0tGfaGvnXxA7K1cl3UirVXCBObuv7Ep3e1Xy0gwaz4?= =?us-ascii?Q?VpSgxCSF4TIbjIB700L6uRGNCF1Th0dZFkeV+EbgIai0YpajganL+kWS/+ay?= =?us-ascii?Q?OvlB1c15FK1/qJwRWUl1SxmZeiGyytuKH6fNtrPlwYaltpKMijXzNkvdRYps?= =?us-ascii?Q?jWiamyY3GKnvXTafA2bA+vtaskNFrsDAj9mrLlusGOhO7Lht9U2+Rx8xHh0H?= =?us-ascii?Q?brHi8uRv9xxsTo6a7HjjSVM1kPrabh6wx6HHT37g2dtrx82QmSSSuTCz/J2v?= =?us-ascii?Q?KC8Ka8WWD8lt99Thx7W9yTW4sAdhdmAGCZ94oyCKklWgTHc71sYHa1LoKs0M?= =?us-ascii?Q?qXVJX+reMeLCId/6IYt4zUVu30ATD1+VV+R9x92ah7gUnJTEEgovftF2Dd+m?= =?us-ascii?Q?p63FhbhxmDoDYk1UePjdPZB8m3ShM4DpEPDfrijcaVcsr1cUyFMlnelg8Fo3?= =?us-ascii?Q?qJ4vWBTeS6yoKSBT+bGNOV7eY+K2Y1Gd3IeKOJZ4aYZgJRWzBnVouv41ti1F?= =?us-ascii?Q?jNbvVrlTlXAuTIha7rYHsdmBqIJQrth8iwaV34LxuyKxIk/9zOr/idA=3D?= =?us-ascii?Q?=3D?= X-Forefront-PRVS: 0350D7A55D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO1PR07MB428; 23:SHE3sH/K6BS+VhWmvyzHAAIV9VCiJVJYtSpMktnpV4?= =?us-ascii?Q?lobwRvMVsMSJnx3aU00hxP5Agkl5G0r+sNPmDrDXbVQ0aWx3IAVTP8dBo3It?= =?us-ascii?Q?sLdFeXgJ83aZMzM26IvLYKkeBegYUvJCGzFvTWsVzAUd6rC/jSQs/Qw8F2rC?= =?us-ascii?Q?g4b/YOILKLd5q0VPk2pOxuFJX/vJQkE7lRDbXOAsy9Juxab9C+62cfNHhFcP?= =?us-ascii?Q?sF6ZmIrEj7vXr/N9vhRnaXu5+fmQzxF0pfzEW1gw4tS7RhE8I1X23YqIedD7?= =?us-ascii?Q?1ECVBbmlvJ/s9fEsrActbiN6FEUtyCEuhjMVqM2SiYShj0XNs3miAfKv0KSl?= =?us-ascii?Q?FeyfA5sG2gGRyN3linq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2sazUug?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; CO1PR07MB428; 5:ODTo0YIXVnTcwtbiZ2MyD1v5KHxcKnUt68ecmh9yQ7Q++1V+YkDeVCvJoxS8ayF1CormVQd2H7TA4IU6NIWVlIwwDzvjwcIRfq1lZpSzizTpcuXBF/rvaxeNzKIHjTDDXrtllFTjf6PsZv3NqxMkzI8pzQL/17QTr8l8xuMtKqV4i/FXqnPvTKfOTlsC2cHZjMakV4VqtL9GIEyFKZ8R976SdavmK957Pursr/l2tiMVyzkfSK3hNbMO6Pq1atnsC6OKahHHqLkgObm5o4+9C2fLR5aDVOoXMKUZSuQ6m/82pVhc4D5dvZD4mbNYkHKdvvu5+buraTTKiXgtWLCBPBs0rLoCjRstfg0WLHe7rR1bgXtzT93UXHkmDrSBgxDm02QhD05vMfiD+5DStp4WGgB6XyXlvr2r0ZzG71D6+xnFzygkEqj1uAXCswB/7sYKQGWcQNhON14o0YijMTSZkqML+C561PYByRMc5nLdwBgy1BYi8cU2LK5nS5MSXCHa; 24:5be2zlRvuKZ893XKIzmbfZdgQJjMs6DZS0MxgUbF+lRo2wrtHXSGo0eerCeR4z2Y2S4BtXqHI4fZwyypzyVs1r4oo7Ys7VtQW/bTOcdXzH0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO1PR07MB428; 7:6ye88Rk0o7zGsxr43K2OIsqlKk4vNWia0dz/dxPJUvloO8Az2ptpnh3eIMVYyf7soFxL0bepT8zvzjhV00W3/X6Hh/iXiYxOqKpojY25FH7U34aq08cDgTYta8jvIVeSg+lu6H6kOBZwAMBaKoywV2R+a1dtizfTkgIZd7D0zrrsxVMpw8puaZlBHu1I6pxEkh+qHTQJvF/5Kghw3Js7kfNOx3SsDxIPRTKpw4daKj5X1caTfuK4Omfq4D44KXyKPwaEyxOMO+qx33FiISTZB6WPlHeGJOpdaM8SN+8lFZxu8f/Dfo0uy0/hy5B+HIdfpYlhc8gV3Hf39Tu3ymf19fLuQN9NJVDbdZTUfFikEntUDBt4ICAJtewh1T46rsLpstcxBrh21zwk6W8B+xujXND+++qDQKj5A3NFGXe1dOBjERbEjVCjltCXjpNEwjrdPp/ngWmfe6PNB02GaMFaL2cN0ZC194Y9FV/2Srt8yV1Ht0jK2DCsXCzWbhy96S38d7j7sXLQmUtpeSaNfRoankr8EqTGl3t0l579p0kX40as/4gvmZeFY44gdOaOQV/mmzXqsHu42s2b0/W4i5IdYjJyMQjgwQuDh0qyXSF0+ibvALIT7b+NFgkv9tW3eJfvNl/WRmCQ0aA2e3+tOiO12FA3sSAkeQQtD/Y4aMq9naUg/xXpJevlYiNMmW4R4RcV0Iv+yfJ9xc95QyDH08RLxW8z8cv3xQ+h/dty6P++SZwGjppYWDHk2Ucy2pOjxt9zL4d5YmEgaDvvAkpaX33Wssif2j8luJRwQqisBlWiNyI= X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2017 18:11:05.0951 (UTC) X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR07MB428 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds the ability to add and remove listeners and identify whether the SYN packet received is intended for iWARP or not. If a listener is not found the SYN packet is posted back to the chip. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 269 +++++++++++++++++++++++++++- drivers/net/ethernet/qlogic/qed/qed_iwarp.h | 23 +++ drivers/net/ethernet/qlogic/qed/qed_rdma.c | 2 + include/linux/qed/qed_rdma_if.h | 52 ++++++ 4 files changed, 343 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c index f3b4b32..2bab57c 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c +++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c @@ -31,6 +31,10 @@ */ #include #include +#include +#include +#include +#include #include "qed_cxt.h" #include "qed_hw.h" #include "qed_ll2.h" @@ -477,6 +481,31 @@ void qed_iwarp_resc_free(struct qed_hwfn *p_hwfn) { } +static void +qed_iwarp_print_cm_info(struct qed_hwfn *p_hwfn, + struct qed_iwarp_cm_info *cm_info) +{ + DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "ip_version = %d\n", + cm_info->ip_version); + + if (cm_info->ip_version == QED_TCP_IPV4) + DP_VERBOSE(p_hwfn, QED_MSG_RDMA, + "remote_ip %pI4h:%x, local_ip %pI4h:%x vlan=%x\n", + cm_info->remote_ip, cm_info->remote_port, + cm_info->local_ip, cm_info->local_port, + cm_info->vlan); + else + DP_VERBOSE(p_hwfn, QED_MSG_RDMA, + "remote_ip %pI6h:%x, local_ip %pI6h:%x vlan=%x\n", + cm_info->remote_ip, cm_info->remote_port, + cm_info->local_ip, cm_info->local_port, + cm_info->vlan); + + DP_VERBOSE(p_hwfn, QED_MSG_RDMA, + "private_data_len = %x ord = %d, ird = %d\n", + cm_info->private_data_len, cm_info->ord, cm_info->ird); +} + static int qed_iwarp_ll2_post_rx(struct qed_hwfn *p_hwfn, struct qed_iwarp_ll2_buff *buf, u8 handle) @@ -497,11 +526,147 @@ void qed_iwarp_resc_free(struct qed_hwfn *p_hwfn) return rc; } +static struct qed_iwarp_listener * +qed_iwarp_get_listener(struct qed_hwfn *p_hwfn, + struct qed_iwarp_cm_info *cm_info) +{ + struct qed_iwarp_listener *listener = NULL; + static const u32 ip_zero[4] = { 0, 0, 0, 0 }; + bool found = false; + + qed_iwarp_print_cm_info(p_hwfn, cm_info); + + list_for_each_entry(listener, + &p_hwfn->p_rdma_info->iwarp.listen_list, + list_entry) { + if (listener->port == cm_info->local_port) { + if (!memcmp(listener->ip_addr, + ip_zero, sizeof(ip_zero))) { + found = true; + break; + } + + if (!memcmp(listener->ip_addr, + cm_info->local_ip, + sizeof(cm_info->local_ip)) && + (listener->vlan == cm_info->vlan)) { + found = true; + break; + } + } + } + + if (found) { + DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "listener found = %p\n", + listener); + return listener; + } + + DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "listener not found\n"); + return NULL; +} + +static int +qed_iwarp_parse_rx_pkt(struct qed_hwfn *p_hwfn, + struct qed_iwarp_cm_info *cm_info, + void *buf, + u8 *remote_mac_addr, + u8 *local_mac_addr, + int *payload_len, int *tcp_start_offset) +{ + struct vlan_ethhdr *vethh; + bool vlan_valid = false; + struct ipv6hdr *ip6h; + struct ethhdr *ethh; + struct tcphdr *tcph; + struct iphdr *iph; + int eth_hlen; + int ip_hlen; + int eth_type; + int i; + + ethh = buf; + eth_type = ntohs(ethh->h_proto); + if (eth_type == ETH_P_8021Q) { + vlan_valid = true; + vethh = (struct vlan_ethhdr *)ethh; + cm_info->vlan = ntohs(vethh->h_vlan_TCI) & VLAN_VID_MASK; + eth_type = ntohs(vethh->h_vlan_encapsulated_proto); + } + + eth_hlen = ETH_HLEN + (vlan_valid ? sizeof(u32) : 0); + + memcpy(remote_mac_addr, ethh->h_source, ETH_ALEN); + + memcpy(local_mac_addr, ethh->h_dest, ETH_ALEN); + + DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "eth_type =%d source mac: %pM\n", + eth_type, ethh->h_source); + + DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "eth_hlen=%d destination mac: %pM\n", + eth_hlen, ethh->h_dest); + + iph = (struct iphdr *)((u8 *)(ethh) + eth_hlen); + + if (eth_type == ETH_P_IP) { + cm_info->local_ip[0] = ntohl(iph->daddr); + cm_info->remote_ip[0] = ntohl(iph->saddr); + cm_info->ip_version = TCP_IPV4; + + ip_hlen = (iph->ihl) * sizeof(u32); + *payload_len = ntohs(iph->tot_len) - ip_hlen; + } else if (eth_type == ETH_P_IPV6) { + ip6h = (struct ipv6hdr *)iph; + for (i = 0; i < 4; i++) { + cm_info->local_ip[i] = + ntohl(ip6h->daddr.in6_u.u6_addr32[i]); + cm_info->remote_ip[i] = + ntohl(ip6h->saddr.in6_u.u6_addr32[i]); + } + cm_info->ip_version = TCP_IPV6; + + ip_hlen = sizeof(*ip6h); + *payload_len = ntohs(ip6h->payload_len); + } else { + DP_NOTICE(p_hwfn, "Unexpected ethertype on ll2 %x\n", eth_type); + return -EINVAL; + } + + tcph = (struct tcphdr *)((u8 *)iph + ip_hlen); + + if (!tcph->syn) { + DP_NOTICE(p_hwfn, + "Only SYN type packet expected on this ll2 conn, iph->ihl=%d source=%d dest=%d\n", + iph->ihl, tcph->source, tcph->dest); + return -EINVAL; + } + + cm_info->local_port = ntohs(tcph->dest); + cm_info->remote_port = ntohs(tcph->source); + + qed_iwarp_print_cm_info(p_hwfn, cm_info); + + *tcp_start_offset = eth_hlen + ip_hlen; + + return 0; +} + static void qed_iwarp_ll2_comp_syn_pkt(void *cxt, struct qed_ll2_comp_rx_data *data) { struct qed_iwarp_ll2_buff *buf = data->cookie; + struct qed_iwarp_listener *listener; + struct qed_ll2_tx_pkt_info tx_pkt; + struct qed_iwarp_cm_info cm_info; struct qed_hwfn *p_hwfn = cxt; + u8 remote_mac_addr[ETH_ALEN]; + u8 local_mac_addr[ETH_ALEN]; + int tcp_start_offset; + u8 ll2_syn_handle; + int payload_len; + int rc; + + memset(&cm_info, 0, sizeof(cm_info)); if (GET_FIELD(data->parse_flags, PARSING_AND_ERR_FLAGS_L4CHKSMWASCALCULATED) && @@ -510,11 +675,52 @@ void qed_iwarp_resc_free(struct qed_hwfn *p_hwfn) goto err; } - /* Process SYN packet - added later on in series */ + rc = qed_iwarp_parse_rx_pkt(p_hwfn, &cm_info, (u8 *)(buf->data) + + data->u.placement_offset, remote_mac_addr, + local_mac_addr, &payload_len, + &tcp_start_offset); + if (rc) + goto err; + /* Check if there is a listener for this 4-tuple+vlan */ + ll2_syn_handle = p_hwfn->p_rdma_info->iwarp.ll2_syn_handle; + listener = qed_iwarp_get_listener(p_hwfn, &cm_info); + if (!listener) { + DP_VERBOSE(p_hwfn, + QED_MSG_RDMA, + "SYN received on tuple not listened on parse_flags=%d packet len=%d\n", + data->parse_flags, data->length.packet_length); + + memset(&tx_pkt, 0, sizeof(tx_pkt)); + tx_pkt.num_of_bds = 1; + tx_pkt.vlan = data->vlan; + + if (GET_FIELD(data->parse_flags, + PARSING_AND_ERR_FLAGS_TAG8021QEXIST)) + SET_FIELD(tx_pkt.bd_flags, + CORE_TX_BD_DATA_VLAN_INSERTION, 1); + + tx_pkt.l4_hdr_offset_w = (data->length.packet_length) >> 2; + tx_pkt.tx_dest = QED_LL2_TX_DEST_LB; + tx_pkt.first_frag = buf->data_phys_addr + + data->u.placement_offset; + tx_pkt.first_frag_len = data->length.packet_length; + tx_pkt.cookie = buf; + + rc = qed_ll2_prepare_tx_packet(p_hwfn, ll2_syn_handle, + &tx_pkt, true); + + if (rc) { + DP_NOTICE(p_hwfn, + "Can't post SYN back to chip rc=%d\n", rc); + goto err; + } + return; + } + + DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Received syn on listening port\n"); err: - qed_iwarp_ll2_post_rx(p_hwfn, buf, - p_hwfn->p_rdma_info->iwarp.ll2_syn_handle); + qed_iwarp_ll2_post_rx(p_hwfn, buf, ll2_syn_handle); } static void qed_iwarp_ll2_rel_rx_pkt(void *cxt, u8 connection_handle, @@ -700,6 +906,7 @@ int qed_iwarp_setup(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, iwarp_info->peer2peer = QED_IWARP_PARAM_P2P; spin_lock_init(&p_hwfn->p_rdma_info->iwarp.qp_lock); + INIT_LIST_HEAD(&p_hwfn->p_rdma_info->iwarp.listen_list); qed_spq_register_async_cb(p_hwfn, PROTOCOLID_IWARP, qed_iwarp_async_event); @@ -728,6 +935,62 @@ static int qed_iwarp_async_event(struct qed_hwfn *p_hwfn, return 0; } +int +qed_iwarp_create_listen(void *rdma_cxt, + struct qed_iwarp_listen_in *iparams, + struct qed_iwarp_listen_out *oparams) +{ + struct qed_hwfn *p_hwfn = rdma_cxt; + struct qed_iwarp_listener *listener; + + listener = kzalloc(sizeof(*listener), GFP_KERNEL); + if (!listener) + return -ENOMEM; + + listener->ip_version = iparams->ip_version; + memcpy(listener->ip_addr, iparams->ip_addr, sizeof(listener->ip_addr)); + listener->port = iparams->port; + listener->vlan = iparams->vlan; + + listener->event_cb = iparams->event_cb; + listener->cb_context = iparams->cb_context; + listener->max_backlog = iparams->max_backlog; + oparams->handle = listener; + + spin_lock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock); + list_add_tail(&listener->list_entry, + &p_hwfn->p_rdma_info->iwarp.listen_list); + spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock); + + DP_VERBOSE(p_hwfn, + QED_MSG_RDMA, + "callback=%p handle=%p ip=%x:%x:%x:%x port=0x%x vlan=0x%x\n", + listener->event_cb, + listener, + listener->ip_addr[0], + listener->ip_addr[1], + listener->ip_addr[2], + listener->ip_addr[3], listener->port, listener->vlan); + + return 0; +} + +int qed_iwarp_destroy_listen(void *rdma_cxt, void *handle) +{ + struct qed_iwarp_listener *listener = handle; + struct qed_hwfn *p_hwfn = rdma_cxt; + + DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "handle=%p\n", handle); + + spin_lock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock); + list_del(&listener->list_entry); + spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock); + + kfree(listener); + + return 0; +} + void qed_iwarp_query_qp(struct qed_rdma_qp *qp, struct qed_rdma_query_qp_out_params *out_params) diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.h b/drivers/net/ethernet/qlogic/qed/qed_iwarp.h index 068b859..29005ac 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.h +++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.h @@ -54,6 +54,7 @@ struct qed_iwarp_ll2_buff { }; struct qed_iwarp_info { + struct list_head listen_list; /* qed_iwarp_listener */ spinlock_t iw_lock; /* for iwarp resources */ spinlock_t qp_lock; /* for teardown races */ u32 rcv_wnd_scale; @@ -67,6 +68,21 @@ struct qed_iwarp_info { enum mpa_rtr_type rtr_type; }; +struct qed_iwarp_listener { + struct list_head list_entry; + + /* The event_cb function is called for connection requests. + * The cb_context is passed to the event_cb function. + */ + iwarp_event_handler event_cb; + void *cb_context; + u32 max_backlog; + u32 ip_addr[4]; + u16 port; + u16 vlan; + u8 ip_version; +}; + int qed_iwarp_alloc(struct qed_hwfn *p_hwfn); int qed_iwarp_setup(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, @@ -94,4 +110,11 @@ int qed_iwarp_modify_qp(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp, void qed_iwarp_query_qp(struct qed_rdma_qp *qp, struct qed_rdma_query_qp_out_params *out_params); +int +qed_iwarp_create_listen(void *rdma_cxt, + struct qed_iwarp_listen_in *iparams, + struct qed_iwarp_listen_out *oparams); + +int qed_iwarp_destroy_listen(void *rdma_cxt, void *handle); + #endif diff --git a/drivers/net/ethernet/qlogic/qed/qed_rdma.c b/drivers/net/ethernet/qlogic/qed/qed_rdma.c index ee6887f..29de915 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_rdma.c +++ b/drivers/net/ethernet/qlogic/qed/qed_rdma.c @@ -1772,6 +1772,8 @@ static int qed_roce_ll2_set_mac_filter(struct qed_dev *cdev, .ll2_set_fragment_of_tx_packet = &qed_ll2_set_fragment_of_tx_packet, .ll2_set_mac_filter = &qed_roce_ll2_set_mac_filter, .ll2_get_stats = &qed_ll2_get_stats, + .iwarp_create_listen = &qed_iwarp_create_listen, + .iwarp_destroy_listen = &qed_iwarp_destroy_listen, }; const struct qed_rdma_ops *qed_get_rdma_ops(void) diff --git a/include/linux/qed/qed_rdma_if.h b/include/linux/qed/qed_rdma_if.h index 5b4bb09..28df568 100644 --- a/include/linux/qed/qed_rdma_if.h +++ b/include/linux/qed/qed_rdma_if.h @@ -470,6 +470,52 @@ struct qed_rdma_counters_out_params { #define QED_ROCE_TX_HEAD_FAILURE (1) #define QED_ROCE_TX_FRAG_FAILURE (2) +enum qed_iwarp_event_type { + QED_IWARP_EVENT_MPA_REQUEST, /* Passive side request received */ +}; + +enum qed_tcp_ip_version { + QED_TCP_IPV4, + QED_TCP_IPV6, +}; + +struct qed_iwarp_cm_info { + enum qed_tcp_ip_version ip_version; + u32 remote_ip[4]; + u32 local_ip[4]; + u16 remote_port; + u16 local_port; + u16 vlan; + u8 ord; + u8 ird; + u16 private_data_len; + const void *private_data; +}; + +struct qed_iwarp_cm_event_params { + enum qed_iwarp_event_type event; + const struct qed_iwarp_cm_info *cm_info; + void *ep_context; /* To be passed to accept call */ + int status; +}; + +typedef int (*iwarp_event_handler) (void *context, + struct qed_iwarp_cm_event_params *event); + +struct qed_iwarp_listen_in { + iwarp_event_handler event_cb; + void *cb_context; /* passed to event_cb */ + u32 max_backlog; + enum qed_tcp_ip_version ip_version; + u32 ip_addr[4]; + u16 port; + u16 vlan; +}; + +struct qed_iwarp_listen_out { + void *handle; +}; + struct qed_roce_ll2_header { void *vaddr; dma_addr_t baddr; @@ -576,6 +622,12 @@ struct qed_rdma_ops { int (*ll2_set_mac_filter)(struct qed_dev *cdev, u8 *old_mac_address, u8 *new_mac_address); + int (*iwarp_create_listen)(void *rdma_cxt, + struct qed_iwarp_listen_in *iparams, + struct qed_iwarp_listen_out *oparams); + + int (*iwarp_destroy_listen)(void *rdma_cxt, void *handle); + }; const struct qed_rdma_ops *qed_get_rdma_ops(void);