From patchwork Mon Oct 2 08:23:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kalderon, Michal" X-Patchwork-Id: 9980385 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 192166029B for ; Mon, 2 Oct 2017 08:25:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B56428952 for ; Mon, 2 Oct 2017 08:25:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F3D2328955; Mon, 2 Oct 2017 08:25:07 +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 6664828952 for ; Mon, 2 Oct 2017 08:25:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751179AbdJBIZF (ORCPT ); Mon, 2 Oct 2017 04:25:05 -0400 Received: from mail-cys01nam02on0044.outbound.protection.outlook.com ([104.47.37.44]:22848 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751128AbdJBIZC (ORCPT ); Mon, 2 Oct 2017 04:25:02 -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=RnKD5+PY5dhb1+zRM7KqHk5ldpnIi4cqofCjLuUCVx4=; b=lrUpPR2/PYA7r31bWlxAfRUntyi/0/TWDoWm+MuO7LMC4tSyp6+dC89A+esDjCl/Ytl1zL9vjsuoEJLq0t/BXOQO3ExWa4e8mF++XmbEbnv49cStB4sy35lyEQkso6AD/jf7LxpgvFSZF3WZD0+WKkgaRiZcPZdO4Tgw5cLIGm4= Received: from CO2PR07CA0061.namprd07.prod.outlook.com (2603:10b6:100::29) by DM2PR07MB495.namprd07.prod.outlook.com (2a01:111:e400:2446::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Mon, 2 Oct 2017 08:25:00 +0000 Received: from BL2FFO11OLC004.protection.gbl (2a01:111:f400:7c09::183) by CO2PR07CA0061.outlook.office365.com (2603:10b6:100::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11 via Frontend Transport; Mon, 2 Oct 2017 08:25:00 +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 BL2FFO11OLC004.mail.protection.outlook.com (10.173.161.188) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.56.11 via Frontend Transport; Mon, 2 Oct 2017 08:24:59 +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, 2 Oct 2017 01:24:56 -0700 From: Michal Kalderon To: CC: , , , Michal Kalderon , "Ariel Elior" Subject: [PATCH net-next 05/12] qed: Add the source of a packet sent on an iWARP ll2 connection Date: Mon, 2 Oct 2017 11:23:51 +0300 Message-ID: <1506932638-26268-6-git-send-email-Michal.Kalderon@cavium.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1506932638-26268-1-git-send-email-Michal.Kalderon@cavium.com> References: <1506932638-26268-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)(346002)(376002)(2980300002)(428002)(199003)(189002)(316002)(69596002)(305945005)(8936002)(16586007)(5660300001)(6916009)(5003940100001)(54906003)(47776003)(101416001)(189998001)(50226002)(2906002)(81166006)(81156014)(6666003)(4326008)(105586002)(86362001)(356003)(104016004)(36756003)(50466002)(106466001)(48376002)(2351001)(107886003)(77096006)(76176999)(50986999)(72206003)(2950100002)(478600001)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR07MB495; 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; BL2FFO11OLC004; 1:L/G8HHzOtjDIpqLXcRYR+RBQz+F2M8ett3dJHlC6oXK2hbCsdFC5IxIfGxAVJ7UNy9JU9jiKfVstunWWlPvZYBYMsQYw5lKuvNK19/0H89F+8GeiDEyhR3k7JP1zGmSS X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1f622120-924b-4f9b-6e81-08d5096f1285 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DM2PR07MB495; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB495; 3:VE2V8htGnQI7ES3STfNfQ+JBDzJ148RZDDtDkd1r5tIxXjJs19d93W3CxjxD9yFLOXZ68bSlfpoAXWcQfbQF0RVHKYxO8QiLzHUjTNic80d1Ls+FP4lhD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EHzO3Q1aBSjDnNrjsO2q+zXNz/gSVEcw1+hS9tvfEJSL8LfHtsyW7psVb43I2aB6r6ySATKHjsAkswyl3t/xCCRwZS0xT+Y9XdNK+iXi9oCAM6Ru433P7HsvCixWo9+xUpooowIjWDQwQBt/yICUQcrohI1k/sSPy5dEpOYq+a+4Ceemm2D26YQJtGN6GLHqxIvOWyo5/9YaH/hiDg+eAfYTXXHLNAURcxg0rwXc6UBqqa1dq+76Yt1K/LLm39w9hVKiWlN8B9s/wZNYEBzcrD/1xpzOawGyj0vYzBTDRxkNCTOkoSZ2q606nWbVh2fSlXFtCKWGwdr44Rx4WoTY0JI9j; 4:EkLJkDuUm1A8gdTm4OwNIM7Geyf8R3iVq+xtVMRzuxiWB5rUvdw3b9hGEWenPC7ZbjabD43aLayGwDzECFmx07LzYsYp8FyKt2b0AZOnMVYm2QhPYZsQDvC2kRGSBOL243LckvquC4eOeHkQzSeEe7naBzGH8tT+4qD2pjwdOHPYBh0Uxprdj7YRFTx6Kf21KEmEvpsPp5tM16JXpDgv8ddbEzg6ieGMwBPcu/YgOykkGr4tcrLAEohuKH1GJ7UC+B943RqRf2E1NOklbHjrgl6OZLmyHPBk8rUIrPOrBgk= X-Exchange-Antispam-Report-Test: UriScan:(17755550239193); 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)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123560025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR07MB495; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR07MB495; X-Forefront-PRVS: 0448A97BF2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR07MB495; 23:SUScg35H0HSpx3FLgDPFNhuISDlOIat0+jj/1c2Mzq?= =?us-ascii?Q?AeDUp7n+vRtE66QF5KF1OXX/tuMwZOlWVBVt/Nu4BebjMEi+/I0jLpID8AUL?= =?us-ascii?Q?CtGahV7f/TSioFG3We3drRug/PzRt1ta3MFqg4rovc4TXtXuZHSl9vHZuZnM?= =?us-ascii?Q?Yh4Qgsz882Pyer96jtR66QjLCguQZLbZBWqY6UoMBM2Nb3Zp3/nRFy8UMad9?= =?us-ascii?Q?hyqC0tCIV4EGXHP0/0P5AARh1H5NPTdpDaHTGEuxpF2M04qwqFnLiEY8YZrL?= =?us-ascii?Q?0a5bdIkVb371c+0AiEZAA8/aQaqflivOC/9ywlnQTk4ElWLhat2ju+MlX0TV?= =?us-ascii?Q?3lcAfbfer1s5e86vgpz1AeO2gzF8rznO/08T40Ze5aHaxG9RBhHJ4DOMSyYA?= =?us-ascii?Q?Z5OTF9qPcZvzaZxYO7xvSaDTKnvuVW+rxhAMYS+MFO4dDro+hG0vK/OcLBqx?= =?us-ascii?Q?PTuJKuRFjKObo7jyumCgxo+8IWEDLoXQTKDz1GReLkZhPhGFNp0JmDquH6js?= =?us-ascii?Q?H3Jryz9xRSdHQ+3ZHKsELOF2kBfQ99YKFryYmgrkMbrRautysUYi+25tWLsU?= =?us-ascii?Q?sOUVTJIMFklRzseuBPTQ5bh2DDTRLQ4xBlLSiwlA+qOLwHW95wmmI4GitKC7?= =?us-ascii?Q?xEQXqgqAFKvBGvUChQJH76r+21OVjNoDQLLeQFVM6tQgXBNc/lBWzdO6XJf3?= =?us-ascii?Q?jTM5J71szThhejUQYp420/tlsChv88dckLQqC3UBdW2jjCE0//XC+wQsiOn5?= =?us-ascii?Q?9r5TfpbXlKL1NNaJ5oRe80MR/mUQzX/WKU2U1hmFSVutW+XYHp48Uw9GLTVw?= =?us-ascii?Q?AmL4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sPa2LqFBRFMUJytbbSNopslapA37sMRXWomPmXurdedjHeVXrvTkcEk597Xg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2017 08:24:59.6115 (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: DM2PR07MB495 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 a packet is sent back to iWARP FW via the tx ll2 connection the FW needs to know the source of the packet. Whether it is OOO or unaligned MPA related. Since OOO is implemented entirely inside the ll2 code (and shared with iSCSI), packets are marked as IN_ORDER inside the ll2 code. For unaligned mpa the value will be determined in the iWARP code and sent on the pkt->vlan field. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_ll2.c b/drivers/net/ethernet/qlogic/qed/qed_ll2.c index 864132a..dbcbf86 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_ll2.c +++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.c @@ -1613,7 +1613,12 @@ static void qed_ll2_prepare_tx_packet_set(struct qed_hwfn *p_hwfn, } start_bd = (struct core_tx_bd *)qed_chain_produce(p_tx_chain); - start_bd->nw_vlan_or_lb_echo = cpu_to_le16(pkt->vlan); + if (QED_IS_IWARP_PERSONALITY(p_hwfn) && + p_ll2->input.conn_type == QED_LL2_TYPE_OOO) + start_bd->nw_vlan_or_lb_echo = + cpu_to_le16(IWARP_LL2_IN_ORDER_TX_QUEUE); + else + start_bd->nw_vlan_or_lb_echo = cpu_to_le16(pkt->vlan); SET_FIELD(start_bd->bitfield1, CORE_TX_BD_L4_HDR_OFFSET_W, cpu_to_le16(pkt->l4_hdr_offset_w)); SET_FIELD(start_bd->bitfield1, CORE_TX_BD_TX_DST, tx_dest);