From patchwork Tue Oct 3 08:54:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kalderon, Michal" X-Patchwork-Id: 9981945 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 2A7476029B for ; Tue, 3 Oct 2017 08:55:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CE441FFCA for ; Tue, 3 Oct 2017 08:55:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 11C65286FD; Tue, 3 Oct 2017 08:55:46 +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 7934C1FFCA for ; Tue, 3 Oct 2017 08:55:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751236AbdJCIzn (ORCPT ); Tue, 3 Oct 2017 04:55:43 -0400 Received: from mail-co1nam03on0049.outbound.protection.outlook.com ([104.47.40.49]:39720 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751156AbdJCIzm (ORCPT ); Tue, 3 Oct 2017 04:55:42 -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=hrqg4NeMd/NIfDwPa6izGwMUJ7aMSyXYfywHNXuXlic=; b=Cv1FtFwHSTFdEzHFh/4m8UUNmJGH7lt4q/dKpHLtViXpgtCPBsP16w3hVpKZUy1xH87pU/ew8YTA0j6J2QyVuz8UD5SwhmuHpSvWSCEQXIE+lg88JpjT4Oe5wrTo3c/+PQ9jKEacu51ojn+QsS7gNjpS7JQbUPolvD3ycr4vqkI= Received: from DM5PR07CA0039.namprd07.prod.outlook.com (10.168.109.25) by BLUPR07MB882.namprd07.prod.outlook.com (10.242.190.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Tue, 3 Oct 2017 08:55:37 +0000 Received: from BY2FFO11FD001.protection.gbl (2a01:111:f400:7c0c::185) by DM5PR07CA0039.outlook.office365.com (2603:10b6:3:16::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.56.11 via Frontend Transport; Tue, 3 Oct 2017 08:55:36 +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 BY2FFO11FD001.mail.protection.outlook.com (10.1.14.123) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.77.10 via Frontend Transport; Tue, 3 Oct 2017 08:55:36 +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; Tue, 3 Oct 2017 01:55:34 -0700 From: Michal Kalderon To: CC: , , , Michal Kalderon , "Ariel Elior" Subject: [PATCH v2 net-next 02/12] qed: Add ll2 ability of opening a secondary queue Date: Tue, 3 Oct 2017 11:54:52 +0300 Message-ID: <1507020902-4952-3-git-send-email-Michal.Kalderon@cavium.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1507020902-4952-1-git-send-email-Michal.Kalderon@cavium.com> References: <1507020902-4952-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)(376002)(346002)(2980300002)(428002)(189002)(199003)(86362001)(16586007)(54906003)(575784001)(2351001)(305945005)(2950100002)(5660300001)(316002)(2906002)(356003)(189998001)(5003940100001)(48376002)(69596002)(81166006)(72206003)(478600001)(105586002)(81156014)(47776003)(107886003)(77096006)(50466002)(8676002)(104016004)(50986999)(6666003)(6916009)(76176999)(4326008)(106466001)(50226002)(36756003)(8936002)(101416001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR07MB882; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD001; 1:Us2ZsuZJhTM68mosM+Bvr9MiMX0VCNnQnMZk2K4x1Az4G7ouEOgkZhu6q7FyT4XdxVi/6kHzWwSDmEjmXD9a2Im/sz59gM4p7I6cUCXVVSLjKUqz/B9pQNi5Ussn93Zh X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3e9f20ed-6142-453b-b1d5-08d50a3c8375 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:BLUPR07MB882; X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB882; 3:TC/6oG0TJUQhlo4lQ2uLPeqwWDS7m80UIp5HQ4XV06ByBhLi9UIOVLbM/vd1pjCJQ7vTx1U3TiPn02ioI232ocljO37fq6OX1Mu1BIQRuPoMH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nhwehuqMW0UHAt3mf4RdS+BkxuUJVaU5RnaxpFgyEVAOOKr4Y/Ft6U0DomaxVR/KXuitJNTnPxXDDeAH1kVY4eu8ISZG6RwSZz+jKdlnh/14WqpVg+l1/ZXzhdUwriu5adYzPlnpPOe65fyVSniHoSerfNYTSSKjziogMXCufUKvxlXlSw/P/DftzKOQb0XXKUhaXvSXxo/9MIBsMzy3mCgqHhH6SwGHFA+yLrRWTNb/eeNJJ81KhEnp2FZ0VISAttITFK1g9dHa6NbNzu6yikAAHntC9KyByo8njtSSNFWpGE6qGYWwMu+Qz+Cuh5rIDVHxFA0x/X2BUB; 4:hI7T3CJUoDgh5N2JqHpnPoddKEBL+fJaSDNU3nWlc/EmJ+/YWjpcyaWM+OozUZ7WngmQL2b9PrGUeyi/CQwIrW4iT5oSA6ZEbjgbSA0At7wyLK7T7RO2+QtswzGZJRXDOBcQzRJNqDYW0OEYg3VYexr7nJfOCNRBP3RK8oU6uPyg7iQ8B7wkDuwvxQLTio2648/OsXGGhtfkyr74tAeZOiwtbUIqXQe2ddkuHRgsrIEKjWpt2vdagCbErDXubnKQ X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6041248)(20161123558100)(20161123564025)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR07MB882; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR07MB882; X-Forefront-PRVS: 044968D9E1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR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FN7MUqezmD5o= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2017 08:55:36.0453 (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: BLUPR07MB882 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 When more than one ll2 queue is opened ( that is not an OOO queue ) ll2 code does not have enough information to determine whether the queue is the main one or not, so a new field is added to the acquire input data to expose the control of determining whether the queue is the main queue or a secondary queue. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 7 ++++++- drivers/net/ethernet/qlogic/qed/qed_ll2.h | 1 + include/linux/qed/qed_ll2_if.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_ll2.c b/drivers/net/ethernet/qlogic/qed/qed_ll2.c index 75af40a..3c695da 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_ll2.c +++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.c @@ -894,7 +894,7 @@ static int qed_sp_ll2_rx_queue_start(struct qed_hwfn *p_hwfn, p_ramrod->drop_ttl0_flg = p_ll2_conn->input.rx_drop_ttl0_flg; p_ramrod->inner_vlan_removal_en = p_ll2_conn->input.rx_vlan_removal_en; p_ramrod->queue_id = p_ll2_conn->queue_id; - p_ramrod->main_func_queue = (conn_type == QED_LL2_TYPE_OOO) ? 0 : 1; + p_ramrod->main_func_queue = p_ll2_conn->main_func_queue ? 1 : 0; if ((IS_MF_DEFAULT(p_hwfn) || IS_MF_SI(p_hwfn)) && p_ramrod->main_func_queue && (conn_type != QED_LL2_TYPE_ROCE) && @@ -1265,6 +1265,11 @@ int qed_ll2_acquire_connection(void *cxt, struct qed_ll2_acquire_data *data) p_ll2_info->tx_dest = (data->input.tx_dest == QED_LL2_TX_DEST_NW) ? CORE_TX_DEST_NW : CORE_TX_DEST_LB; + if (data->input.conn_type == QED_LL2_TYPE_OOO || + data->input.secondary_queue) + p_ll2_info->main_func_queue = false; + else + p_ll2_info->main_func_queue = true; /* Correct maximum number of Tx BDs */ p_tx_max = &p_ll2_info->input.tx_max_bds_per_packet; diff --git a/drivers/net/ethernet/qlogic/qed/qed_ll2.h b/drivers/net/ethernet/qlogic/qed/qed_ll2.h index 9bdd08f..f658170 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_ll2.h +++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.h @@ -121,6 +121,7 @@ struct qed_ll2_info { bool b_active; enum core_tx_dest tx_dest; u8 tx_stats_en; + bool main_func_queue; struct qed_ll2_rx_queue rx_queue; struct qed_ll2_tx_queue tx_queue; struct qed_ll2_cbs cbs; diff --git a/include/linux/qed/qed_ll2_if.h b/include/linux/qed/qed_ll2_if.h index 89fa0bb..d7cca59 100644 --- a/include/linux/qed/qed_ll2_if.h +++ b/include/linux/qed/qed_ll2_if.h @@ -171,6 +171,7 @@ struct qed_ll2_acquire_data_inputs { enum qed_ll2_tx_dest tx_dest; enum qed_ll2_error_handle ai_err_packet_too_big; enum qed_ll2_error_handle ai_err_no_buf; + bool secondary_queue; u8 gsi_enable; };