From patchwork Mon Oct 9 09:37:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kalderon, Michal" X-Patchwork-Id: 9992441 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 98EAA60223 for ; Mon, 9 Oct 2017 09:38:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89CA7285E2 for ; Mon, 9 Oct 2017 09:38:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7EA5128755; Mon, 9 Oct 2017 09:38:34 +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 C1CB5285E2 for ; Mon, 9 Oct 2017 09:38:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751676AbdJIJi2 (ORCPT ); Mon, 9 Oct 2017 05:38:28 -0400 Received: from mail-bn3nam01on0050.outbound.protection.outlook.com ([104.47.33.50]:38469 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751693AbdJIJi0 (ORCPT ); Mon, 9 Oct 2017 05:38:26 -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=OdbyhUhJxVbThUx3W+lNl67m0InZ8muf6CulpZ5Ma+m2VRps+PwGxzXZPlS4SG/h72L3tOwgv8r5zXBGw6UG4dVrz/Ss9rFgAh0dyaqXBHLQUsebtfGfo8N41s5Vm13YWWKjzFCI5QBtqGAHRzRUtNWDqDfaiNS10RMPGkhxmLM= Received: from SN1PR0701CA0038.namprd07.prod.outlook.com (2a01:111:e400:5173::48) by CY4PR0701MB3812.namprd07.prod.outlook.com (2603:10b6:910:94::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Mon, 9 Oct 2017 09:38:24 +0000 Received: from BL2FFO11FD046.protection.gbl (2a01:111:f400:7c09::105) by SN1PR0701CA0038.outlook.office365.com (2a01:111:e400:5173::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.77.7 via Frontend Transport; Mon, 9 Oct 2017 09:38:24 +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 BL2FFO11FD046.mail.protection.outlook.com (10.173.161.208) 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; Mon, 9 Oct 2017 09:38:24 +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, 9 Oct 2017 02:38:20 -0700 From: Michal Kalderon To: CC: , , , Michal Kalderon , "Ariel Elior" Subject: [PATCH v3 net-next 02/12] qed: Add ll2 ability of opening a secondary queue Date: Mon, 9 Oct 2017 12:37:44 +0300 Message-ID: <1507541874-18344-3-git-send-email-Michal.Kalderon@cavium.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1507541874-18344-1-git-send-email-Michal.Kalderon@cavium.com> References: <1507541874-18344-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)(199003)(189002)(36756003)(106466001)(2351001)(575784001)(86362001)(105586002)(6666003)(54906003)(50986999)(189998001)(76176999)(104016004)(69596002)(16586007)(316002)(47776003)(101416001)(5003940100001)(50226002)(72206003)(478600001)(4326008)(107886003)(5660300001)(2950100002)(6916009)(77096006)(356003)(48376002)(305945005)(50466002)(8936002)(2906002)(81156014)(8676002)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3812; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; PTR:50-232-66-26-static.hfc.comcastbusiness.net; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD046; 1:lGo6x/n3fO15BLByNZvbcvqSCSqn/Kbm/1Kcu0+G0MX08QJkrSn8Yfx5WBVig4zGtY6QuW/+p50z4OVZCYnPmUxoeRXQWgst3HOG33pMdU2jlOuOnFmMXSnucDcGCfnX X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1ae5f9ae-8542-4972-323f-08d50ef97cb0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:CY4PR0701MB3812; X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3812; 3:jSzR1xunsFgbr+fxL5f8VhDV+R8jPijBeoEmkx05B/j9tZ0vRVzTWLeKtPOH14ezjLt/ULBZOaLxSwi2zRSPjZNw1S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csEIfooOUOcgqGaSfdUsdxk5FMv3S5/s54zm4CMCSMP6f1XO8PGsz9hsH4dHjbmEEjqmpVw1Yx5h//mNwf+WkD97R8rP47inh4OyuQtXwWY1vk45qndXORVBPTub38d621rEH41R+wTjxSPV6Fa1HhwVl8RUFjbaiebJfCKDRkbdUl9udDR66fSTG91AGJXz981nWzNnoKK+FJcSAK/mUGm5wnkpRc1/SRBfbnAH6kp8a501JmVlFWCRpFuxaHRFcz6YpG/2ZMHUEKAqrSeKAwnzLCx9Q/JOB05ggmIPrlU2ydZ3iQJvk3/uPcKRigiU5RbFyaXfgLLFPEvoaT3g76V9DTog7QmjlZR7qK5pbUBt86TU7X9noAT7vRJQE7XyWER9 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)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(100000703101)(100105400095)(6041248)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR0701MB3812; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR0701MB3812; X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3812; 4:iX9FS8q5AP6uHE97CmcbKwWrHKh/pT+nT0y9M2tejBPfDC0z/YJhgTH/1L1BGzJUdOs+QuEUWancVtbxWzzT0hKbH2IZL+45cjd/KwThIlMofFzWExlGoZesuY1acdKTgyniGnyDLmV6qgamBZAWSN4EulWQttvXEC4M1IavGtWbPz+SOFUieOOX22nNNZ2MQUqSdEVytiL7Kx5nsEjeFXy8TSf6joHklVqulq7m94IP+RK2/TgAvW7lfV4swEoY X-Forefront-PRVS: 045584D28C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR0701MB3812; 23:NHRP7S6Syb5E8hdqcWAZ1+DaTxyBsWdr4NLGr89?= =?us-ascii?Q?uxKjjCuBdxaDcg39Ugp9a5+TpCuS5xkPkEsqLBhmECQLKjYwlLZCEbxpeVBT?= =?us-ascii?Q?X5unVrQ6+KhuNQWL6rC1G5hNyTRcYfMJSj9rzkOPp7fumkly1vJlb5DGm0+c?= =?us-ascii?Q?JFYMjGvG2eBIyvMynlbQa/1o7BQi0TZkeUGJB7lHBMVg96klfJfj4GH9S0rd?= =?us-ascii?Q?QWQYH4vte+DVdfpfRyLt9kxJugYzWnYNtqaTNna5XtVUU0HGOczZ+gSRnUqz?= =?us-ascii?Q?hlNnO/1N2bJy/8rkA0YUr9r71oJB33Xl8/i70h9jHI9GNOEr1vnnKz+Y57vt?= =?us-ascii?Q?fhwbGOgiqlwKzLXYsfSc4Ro3t15Q5mbS+Moc+Sojh5PG1VuXjmfYf9l8taiU?= =?us-ascii?Q?4jIrHNRTFqZoJCCQaoEFDifqXNqhyr2UfPXMrBBfxxZEEx3wen1D65pwh3yy?= =?us-ascii?Q?TbzkXiD/A6XqwR9XhpLea+sXAF07JDr4f3di874REsNxVoCcfjI68i1JPxI3?= =?us-ascii?Q?JU5migReYNI3tlUhLKfz/5YzwV7KJXFH0lf14+vEK+MSJZUJoVobcm1fbBQX?= =?us-ascii?Q?caNwdTwZsWuA2PdFjUGoZVMN//d9BBidUVao77uLb/mYeI/iG62F0wP0Vfsm?= =?us-ascii?Q?aMtcrkLRjaXX72N3VHPPL8o+MkY81r+EMPOKKE0CAteGlhVLbtQkjMmHqmM4?= =?us-ascii?Q?Y3h3ZvClhE829ac7rM0E8y7JtFtKDNEKeMiO/rswKQ6BvHGGlg98Ykex774d?= =?us-ascii?Q?chC5Mo0OQ6dAb1IY3goQXTbgmgOIVFz0X+ToOnH8QBgdeMXNcWRaB0GL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H3Jta+Fv2UAPcPbRMnGdDxAejopx8UpPVLVGY7X5PIZHtemHDPD+v93dhAt7GwRQD6woldOGbYtuWP3cOlMnLb4AUNs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2017 09:38:24.0928 (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: CY4PR0701MB3812 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; };