From patchwork Mon Jun 26 18:06:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kalderon, Michal" X-Patchwork-Id: 9810161 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 1021760209 for ; Mon, 26 Jun 2017 18:11:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C52F020855 for ; Mon, 26 Jun 2017 18:10:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B95B22851D; Mon, 26 Jun 2017 18:10:50 +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 B736328450 for ; Mon, 26 Jun 2017 18:10:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751403AbdFZSKs (ORCPT ); Mon, 26 Jun 2017 14:10:48 -0400 Received: from mail-bl2nam02on0050.outbound.protection.outlook.com ([104.47.38.50]:8470 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751386AbdFZSKq (ORCPT ); Mon, 26 Jun 2017 14:10:46 -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=Q81w4xvOssIishZ015WFnKO4Mr2Ozghm1F0RCpQk6qk=; b=mnhtRIzCB0ImSgTR4495pcygUfy7bYcZamxBtT2pBAon+pT+foFq2k43ZmksUGQZ0TWKPJbRrf0klcMoLPvSGx7lkiccT68d5bWH2mL+RVu6lHIdaUseWti+VKCXL2G/k+KdUKebOO2QmQDyNJf9bmmWVwqT51NMmL3fc+dowBs= Received: from CY1PR07CA0037.namprd07.prod.outlook.com (10.166.202.47) by BLUPR07MB418.namprd07.prod.outlook.com (10.141.28.15) 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:10:44 +0000 Received: from BY2FFO11FD028.protection.gbl (2a01:111:f400:7c0c::112) by CY1PR07CA0037.outlook.office365.com (2a01:111:e400:c60a::47) 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:10:38 +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 BY2FFO11FD028.mail.protection.outlook.com (10.1.15.217) 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:10:38 +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:10:36 -0700 From: Michal Kalderon To: , , , , , , , CC: Michal Kalderon , Yuval Mintz , Ariel Elior Subject: [RFC 05/19] qed: iWARP CM - setup a ll2 connection for handling SYN packets Date: Mon, 26 Jun 2017 21:06:55 +0300 Message-ID: <1498500429-22557-6-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)(39840400002)(39410400002)(39450400003)(39400400002)(39850400002)(2980300002)(428002)(199003)(189002)(9170700003)(2201001)(2906002)(2950100002)(6666003)(5003940100001)(189998001)(104016004)(54906002)(107886003)(38730400002)(86362001)(5660300001)(36756003)(305945005)(47776003)(106466001)(48376002)(50466002)(77096006)(356003)(72206003)(105586002)(101416001)(76176999)(478600001)(50986999)(50226002)(8936002)(4326008)(81166006)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR07MB418; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD028; 1:/IYgFPH3N6OJQhPcuET8ViUSSKxn/yeg0LMH256kQcOTmPIg0TuNl4ZGShxl+U4V/dHz1LnAcB7vJQQKsK0c/NDKB0Mh5ivyBDWw0OOgFI+fFa22YRqJUl6iKT8jO8u93uVqk6BR5rmWp1Rbib/eaZuWzRxlLanfw/0eT9iyoz01yhIhc1bxLwdfWHmxBqvwbUd9XIpWOdocEKWsoV+CtfJHvlrYx03kcndL9wAh6ddyQpyXVZRFIjY3sNdp2D+3sfvn1Elo/Kg+V64WFxnnTPpqVZDw0Oum6iu/6QvNs8lzUKwAJ0SNLGjHCXVkjG/mAJvkBnmv8SjKbBqZm2Ns4YnGyrIAZnPTvympkpAYnPtpliK+zHbKhTbeJpTsgH+36kBCnfX8CT2yNlqXbJILmNya9UsQ9WggZK0OLKGR7FsE9Z8nr6oVL3Ti68FR7NYeDf+kEmE78HdNrcunXTPEnZ9Eyhs2jWQtDCLBJygQhG3G5+sI8dApsLB7hxdiAe3IwzpNauSLOabeDeho1LsiOQFM4iQ66Be9ljmu+dsDlkfAcaN+DeGf2qfWbPcsBW5iw+l6SUjGeTIpmgpkHvo3QmD3klc67dLUQuMM/lJnU9gI49bYLuwkcTDoU8HcORYgva7aT3wFEBJcAgfu1vkUlpptCLVzAvJNiWhlCBaJdLUAininsZ4Wf+Prwgw2VOe8rfOrX210hqNXZ07gYtW1keY6iLteiEN/3p0LGSSY6IhmGmZoGepF/CWfHHH/HxSBDMX9eHo3HmNIAELF8QhS+gZE92pxn0CNuPbnJq4U9w2HO93nxQnmXFjnW8tudIdY1Jqa09xeJ70aVKdJf7hFBRo96ufLiaD1fdK2b5y36/c= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c2f393eb-6235-4000-1c19-08d4bcbea638 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); SRVR:BLUPR07MB418; X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB418; 3:iBJopnQ5SA9CNLpA8ZhAJIYf16A08wPBpLpUVztGUqpn3mdR40qkV9BfZMqzn282xZF504+hl6gQGonUf8eF7s2hVnt//Rd8JW0yvJuofT+Kx+Zsf1ZNMxmqFCWleOpAEUTTIjWVbZyrM6XaglD5BCTBHJa4jOlp5NawtQNYtZfJC7XJEHcch9GKUPGGEuDd7eJ8it6uWpx7mziZUTK446fqBm0VxRaYOdD9JDDLDLkQWCfvCl+oUkfA9Y2ssDBT9wadvWRbOmthrY6PKKj8PhyxOsPvdhKrbdiIScUjrydh3qXH2ZlgqjhvLX0ihR6SkSY6bNBBy814wn+H3c8Ia1wJUJF1gT15U4OQRGGJwvDk2cRTuKsSjPDuNFMBPLyPCD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TaHzqjQ9klQuDshxdc4f7WvSF/WH8XKxuKbG+cIeeUntXXeYiKSNc4dsaBmbAJf1Mi+gfFtHuHxiKx3hD34GFI6w== X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB418; 20:ROZ3eqk5/w6NsmGQY4ozZ93/C37WLuFAw6ZjwgRQgCYtgrPvPPuTz9W/gg8E1YNSRvN3BwSnfnpphuCW+A24gXLHfECgejeph1XRQ9wQGR+CrTj0xOwiOYetjO6xQtAV6NgpBzPmdqjs70Ov5rssZFlgCo+7wTy+WVnmoV/F/cASJnZNlZFkplY5X/W+9tiRvPmR7ukWoAIhUNhc57MuWyaJsNuC9XuHtN2LCPRvMRLN4t3A+ULcKbftxxfccq8aEaWRhrKQlg0eBcQhs0gJhsJJ6CNApQ1PGUwIXXnHQbE98i4JzDp2caka2FjF8qK6PdwfizCQ8Kffz4aREt1Ult9/e8IiFdvnozuA/VR8adgDyGkkHNs57ypc0VEl3uRboTFU9+3RQHStN9qh4z8LdFg5LQib6tOmnAVaN1hd5/D5ybesJRKWHGo5kTaJWwCiN0iuqAvquswPWMhn5bsEvDuPleHTy/525Ir8Q42dsuY5gwnXyHE4JxVnKSVhH1XF 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)(8121501046)(13018025)(5005006)(13016025)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6041248)(20161123562025)(20161123560025)(20161123564025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR07MB418; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR07MB418; X-Microso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Ee+5hJjh00M+P1KNG4cKMFLvTvz3gQBs7/WEJr2Lo4AHophihURWBy?= =?us-ascii?Q?jDDqCGU4AxlE/dSPis77JeAUwB795/bxyEUChNYO7BA7QDQeqTX2XQIQ0q/i?= =?us-ascii?Q?RLzP7UnajnoFqeYwAdmeYbJMm6XElnZYSnGWTleHlcK8QoZ8LkVyAJOYB0sP?= =?us-ascii?Q?LJOJGn4VmRwzLITWRvDPEvOqyLRjjRn9uQpgAWr6v/epc8sdyJLg3uv3JJ0w?= =?us-ascii?Q?xYifqjQ2acXWFul/7/9AgrCS64nTCmCV3pJesivo0z60G8xzlKjhHGkxmbdr?= =?us-ascii?Q?lu4G8sOVs2WPh7JQrbYnxxIZiVI7hhFcJmHOb0YLXvzsdyEJx8LuzUPRHt5O?= =?us-ascii?Q?qaGe6q+jGwfG/L/Q3oqqVkrMw0tG0Sd2Xu7qo1d/31WmVyKHdx9UTZQ=3D?= =?us-ascii?Q?=3D?= X-Forefront-PRVS: 0350D7A55D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR07MB418; 23:a/sglkoLEBk+3OM5ujfyldvYiWEswpDYITLnEu/8mb?= =?us-ascii?Q?4DoJwo76+NtTdPf0DE6BfIJHP/fGBux5PZ6frU3n07gkGMFbM8P/ujCwrXoz?= =?us-ascii?Q?bATyQzN32FEoLJEMNawvAdtjyhy39aKQtc4dLXAV50CGaGstcN8fqIfV9ISI?= =?us-ascii?Q?gswLkZqQfPggsGy1Bk+yoxp01BdPmie75h4Zn7bnNPEA9ZC2RH3gAE+bGNV2?= =?us-ascii?Q?L/+/aSXzHpL0YNdtg0hqtQg/1XiDUkNYySBIV75rQksATx4RTMQrAOudnj1U?= =?us-ascii?Q?5ejoC6AGUUtIHVt5iPKvQuLdndK4jarrrm73wDZJHThLpU4hPironoisH8wZ?= =?us-ascii?Q?B9JEJIXroiLjpOU7LHjlebi4VF4wlmsP+yJfBG2yh+c9C2gySnj7Rux3U/fu?= =?us-ascii?Q?sF685F+F1EnHC904JiJe73mpbf/Fnc73pNX7Anmkj+odGuhRty472abdIsib?= =?us-ascii?Q?a/KKFzzgMKHFbZRXGGs53yMfW9oJwDMRED1yMooYzxSlb6FHnJwqCjlD0Z4N?= =?us-ascii?Q?IuZMzd7UXixkbwRqkeESnSaZUzRES5j8OplVxvvO83sUISoDMN4EmriXub6s?= =?us-ascii?Q?VIntknjSkfLJ5ePLHxWjr8Jjz+ZRDqpEIQuUghEKOaaUiUc8buo6XkNYU/YC?= =?us-ascii?Q?FYDguy+J5Hw3Miv6JJHshi9ENt1udUCC/RHyWGkZeqybv58tXsaKQq560jVd?= =?us-ascii?Q?jgfZ+0O/r5kTHOtrMbAtu+WsgS4I8Ga+usIbhcvYGuqnXxd6VTVIhQW5upgI?= =?us-ascii?Q?yhdbaJW/fSfVdZ/sUYAN+MICLsF4cbuAteblXvfP/ieL4uR8ULelOBkEVeg0?= =?us-ascii?Q?x7DuHAHiqMyIOM0Wvto2gXBrL4XAPPR/iOVvnb103zIEe5wYhdi38F8GCn38?= =?us-ascii?Q?jamWws6jZ+3ZlTPGnluZ2etw5D1KOkxQpqm0xoqHgIEH6Bd7S1T4TsjuqA2P?= =?us-ascii?Q?AQ/fNp8IIz2aKoynPgt4wTo1hYAy0GzSSkijDFwpYrjRByobztrVmG+CHwke?= =?us-ascii?Q?R05l9tyyjVp7J9j98PGBZywGW4Xx+cKr1eSP2Y5TZOsuXGTd76CMD+ny5DUW?= =?us-ascii?Q?YC/lI=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR07MB418; 6:hM7BNADfXh4SxoX5QfZp8mHxwh++LKKBPyRdBk5iSSf?= =?us-ascii?Q?fSq5D9Fec8ex8svtlidbHZ9GVpTy8TABT3uLETwm+0LvWbVsxN2NKzSIsnvM?= =?us-ascii?Q?kfS4/Uw+UJtpulPg7cobnYEt9aZA2WSXA9ggKUAYuMWmVezICo6SRMDt/dAd?= =?us-ascii?Q?x9BxQHRoJ/I3H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DdIC1CUNnruVJ34B4gxQaVdrW6EqAehTu/tgNOH1rPk3a+0BuMPMGxCBphrQgVt+aEtTvnpKDCdQMFXo4qJ75nkj9AM3u1kP3bFhCg6UkcU+KmonqdCODJY8hNzEjRvoDzUOWUzNZxig/A1naLE6XQv4gg5nUFjGR8/ifq4yzePD7SIi+35MLmP0hC6vgAzmFKOkwJSvGTOjsgJml+RtHy2whS3X3BxnbrDHA20pX1VwDupUCeG/qT9j91sFcNTmq4NeZaTdg4MsZyuMQO0jE7/D9KzDy/4V+x8a+vnsGNiQJPxVkg4LRbbK2UTxPK2owEbiDzuFeIsJP92nQR7/phs+vBH68OTT934ivujhEDqHvqyLsybp/hJQIHFf1IucliCy81LOoAcS1L5BYYD6YCsHk/yZb73Cf6cGY9rRg= X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2017 18:10:38.2401 (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: BLUPR07MB418 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 iWARP handles incoming SYN packets using the ll2 interface. This patch implements ll2 setup and teardown. Additional ll2 connections will be used in the future which are not part of this patch series. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 211 +++++++++++++++++++++++++++- drivers/net/ethernet/qlogic/qed/qed_iwarp.h | 12 ++ 2 files changed, 220 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c index a8bd5f8..f3b4b32 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c +++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c @@ -29,8 +29,11 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ +#include +#include #include "qed_cxt.h" #include "qed_hw.h" +#include "qed_ll2.h" #include "qed_rdma.h" #include "qed_reg_addr.h" #include "qed_sp.h" @@ -474,12 +477,214 @@ void qed_iwarp_resc_free(struct qed_hwfn *p_hwfn) { } +static int +qed_iwarp_ll2_post_rx(struct qed_hwfn *p_hwfn, + struct qed_iwarp_ll2_buff *buf, u8 handle) +{ + int rc; + + rc = qed_ll2_post_rx_buffer(p_hwfn, handle, buf->data_phys_addr, + (u16)buf->buff_size, buf, 1); + if (rc) { + DP_NOTICE(p_hwfn, + "Failed to repost rx buffer to ll2 rc = %d, handle=%d\n", + rc, handle); + dma_free_coherent(&p_hwfn->cdev->pdev->dev, buf->buff_size, + buf->data, buf->data_phys_addr); + kfree(buf); + } + + return rc; +} + +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_hwfn *p_hwfn = cxt; + + if (GET_FIELD(data->parse_flags, + PARSING_AND_ERR_FLAGS_L4CHKSMWASCALCULATED) && + GET_FIELD(data->parse_flags, PARSING_AND_ERR_FLAGS_L4CHKSMERROR)) { + DP_NOTICE(p_hwfn, "Syn packet received with checksum error\n"); + goto err; + } + + /* Process SYN packet - added later on in series */ + +err: + qed_iwarp_ll2_post_rx(p_hwfn, buf, + p_hwfn->p_rdma_info->iwarp.ll2_syn_handle); +} + +static void qed_iwarp_ll2_rel_rx_pkt(void *cxt, u8 connection_handle, + void *cookie, dma_addr_t rx_buf_addr, + bool b_last_packet) +{ + struct qed_iwarp_ll2_buff *buffer = cookie; + struct qed_hwfn *p_hwfn = cxt; + + dma_free_coherent(&p_hwfn->cdev->pdev->dev, buffer->buff_size, + buffer->data, buffer->data_phys_addr); + kfree(buffer); +} + +static void qed_iwarp_ll2_comp_tx_pkt(void *cxt, u8 connection_handle, + void *cookie, dma_addr_t first_frag_addr, + bool b_last_fragment, bool b_last_packet) +{ + struct qed_iwarp_ll2_buff *buffer = cookie; + struct qed_hwfn *p_hwfn = cxt; + + /* this was originally an rx packet, post it back */ + qed_iwarp_ll2_post_rx(p_hwfn, buffer, connection_handle); +} + +static void qed_iwarp_ll2_rel_tx_pkt(void *cxt, u8 connection_handle, + void *cookie, dma_addr_t first_frag_addr, + bool b_last_fragment, bool b_last_packet) +{ + struct qed_iwarp_ll2_buff *buffer = cookie; + struct qed_hwfn *p_hwfn = cxt; + + if (!buffer) + return; + + dma_free_coherent(&p_hwfn->cdev->pdev->dev, buffer->buff_size, + buffer->data, buffer->data_phys_addr); + + kfree(buffer); +} + +static int qed_iwarp_ll2_stop(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) +{ + struct qed_iwarp_info *iwarp_info = &p_hwfn->p_rdma_info->iwarp; + int rc = 0; + + if (iwarp_info->ll2_syn_handle != QED_IWARP_HANDLE_INVAL) { + rc = qed_ll2_terminate_connection(p_hwfn, + iwarp_info->ll2_syn_handle); + if (rc) + DP_INFO(p_hwfn, "Failed to terminate syn connection\n"); + + qed_ll2_release_connection(p_hwfn, iwarp_info->ll2_syn_handle); + iwarp_info->ll2_syn_handle = QED_IWARP_HANDLE_INVAL; + } + + qed_llh_remove_mac_filter(p_hwfn, + p_ptt, p_hwfn->p_rdma_info->iwarp.mac_addr); + return rc; +} + +static int +qed_iwarp_ll2_alloc_buffers(struct qed_hwfn *p_hwfn, + int num_rx_bufs, int buff_size, u8 ll2_handle) +{ + struct qed_iwarp_ll2_buff *buffer; + int rc = 0; + int i; + + for (i = 0; i < num_rx_bufs; i++) { + buffer = kzalloc(sizeof(*buffer), GFP_KERNEL); + if (!buffer) { + rc = -ENOMEM; + break; + } + + buffer->data = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, + buff_size, + &buffer->data_phys_addr, + GFP_KERNEL); + if (!buffer->data) { + kfree(buffer); + rc = -ENOMEM; + break; + } + + buffer->buff_size = buff_size; + rc = qed_iwarp_ll2_post_rx(p_hwfn, buffer, ll2_handle); + if (rc) + /* buffers will be deallocated by qed_ll2 */ + break; + } + return rc; +} + +#define QED_IWARP_MAX_BUF_SIZE(mtu) \ + ALIGN((mtu) + ETH_HLEN + 2 * VLAN_HLEN + 2 + ETH_CACHE_LINE_SIZE, \ + ETH_CACHE_LINE_SIZE) + +static int +qed_iwarp_ll2_start(struct qed_hwfn *p_hwfn, + struct qed_rdma_start_in_params *params, + struct qed_ptt *p_ptt) +{ + struct qed_iwarp_info *iwarp_info; + struct qed_ll2_acquire_data data; + struct qed_ll2_cbs cbs; + int rc = 0; + + iwarp_info = &p_hwfn->p_rdma_info->iwarp; + iwarp_info->ll2_syn_handle = QED_IWARP_HANDLE_INVAL; + + iwarp_info->max_mtu = params->max_mtu; + + ether_addr_copy(p_hwfn->p_rdma_info->iwarp.mac_addr, params->mac_addr); + + rc = qed_llh_add_mac_filter(p_hwfn, p_ptt, params->mac_addr); + if (rc) + return rc; + + /* Start SYN connection */ + cbs.rx_comp_cb = qed_iwarp_ll2_comp_syn_pkt; + cbs.rx_release_cb = qed_iwarp_ll2_rel_rx_pkt; + cbs.tx_comp_cb = qed_iwarp_ll2_comp_tx_pkt; + cbs.tx_release_cb = qed_iwarp_ll2_rel_tx_pkt; + cbs.cookie = p_hwfn; + + memset(&data, 0, sizeof(data)); + data.input.conn_type = QED_LL2_TYPE_IWARP; + data.input.mtu = QED_IWARP_MAX_SYN_PKT_SIZE; + data.input.rx_num_desc = QED_IWARP_LL2_SYN_RX_SIZE; + data.input.tx_num_desc = QED_IWARP_LL2_SYN_TX_SIZE; + data.input.tx_max_bds_per_packet = 1; /* will never be fragmented */ + data.input.tx_tc = PKT_LB_TC; + data.input.tx_dest = QED_LL2_TX_DEST_LB; + data.p_connection_handle = &iwarp_info->ll2_syn_handle; + data.cbs = &cbs; + + rc = qed_ll2_acquire_connection(p_hwfn, &data); + if (rc) { + DP_NOTICE(p_hwfn, "Failed to acquire LL2 connection\n"); + qed_llh_remove_mac_filter(p_hwfn, p_ptt, params->mac_addr); + return rc; + } + + rc = qed_ll2_establish_connection(p_hwfn, iwarp_info->ll2_syn_handle); + if (rc) { + DP_NOTICE(p_hwfn, "Failed to establish LL2 connection\n"); + goto err; + } + + rc = qed_iwarp_ll2_alloc_buffers(p_hwfn, + QED_IWARP_LL2_SYN_RX_SIZE, + QED_IWARP_MAX_SYN_PKT_SIZE, + iwarp_info->ll2_syn_handle); + if (rc) + goto err; + + return rc; +err: + qed_iwarp_ll2_stop(p_hwfn, p_ptt); + + return rc; +} + int qed_iwarp_setup(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, struct qed_rdma_start_in_params *params) { struct qed_iwarp_info *iwarp_info; u32 rcv_wnd_size; - int rc = 0; iwarp_info = &p_hwfn->p_rdma_info->iwarp; @@ -499,7 +704,7 @@ int qed_iwarp_setup(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, qed_spq_register_async_cb(p_hwfn, PROTOCOLID_IWARP, qed_iwarp_async_event); - return rc; + return qed_iwarp_ll2_start(p_hwfn, params, p_ptt); } int qed_iwarp_stop(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) @@ -512,7 +717,7 @@ int qed_iwarp_stop(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) qed_spq_unregister_async_cb(p_hwfn, PROTOCOLID_IWARP); - return 0; + return qed_iwarp_ll2_stop(p_hwfn, p_ptt); } static int qed_iwarp_async_event(struct qed_hwfn *p_hwfn, diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.h b/drivers/net/ethernet/qlogic/qed/qed_iwarp.h index 05e5e45..068b859 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.h +++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.h @@ -42,6 +42,17 @@ enum qed_iwarp_qp_state { enum qed_iwarp_qp_state qed_roce2iwarp_state(enum qed_roce_qp_state state); +#define QED_IWARP_LL2_SYN_TX_SIZE (128) +#define QED_IWARP_LL2_SYN_RX_SIZE (256) +#define QED_IWARP_MAX_SYN_PKT_SIZE (128) +#define QED_IWARP_HANDLE_INVAL (0xff) + +struct qed_iwarp_ll2_buff { + void *data; + dma_addr_t data_phys_addr; + u32 buff_size; +}; + struct qed_iwarp_info { spinlock_t iw_lock; /* for iwarp resources */ spinlock_t qp_lock; /* for teardown races */ @@ -50,6 +61,7 @@ struct qed_iwarp_info { u8 mac_addr[ETH_ALEN]; u8 crc_needed; u8 tcp_flags; + u8 ll2_syn_handle; u8 peer2peer; enum mpa_negotiation_mode mpa_rev; enum mpa_rtr_type rtr_type;