Message ID | 1507020902-4952-4-git-send-email-Michal.Kalderon@cavium.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show
Return-Path: <linux-rdma-owner@kernel.org> 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 E1EFB6029B for <patchwork-linux-rdma@patchwork.kernel.org>; Tue, 3 Oct 2017 08:56:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D11621FFCA for <patchwork-linux-rdma@patchwork.kernel.org>; Tue, 3 Oct 2017 08:56:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C48D02862A; Tue, 3 Oct 2017 08:56:54 +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 4A4091FFCA for <patchwork-linux-rdma@patchwork.kernel.org>; Tue, 3 Oct 2017 08:56:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751156AbdJCIzs (ORCPT <rfc822;patchwork-linux-rdma@patchwork.kernel.org>); Tue, 3 Oct 2017 04:55:48 -0400 Received: from mail-bl2nam02on0078.outbound.protection.outlook.com ([104.47.38.78]:40290 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751250AbdJCIzp (ORCPT <rfc822;linux-rdma@vger.kernel.org>); Tue, 3 Oct 2017 04:55:45 -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=gy7WpG9ydRvu8leMRu6pLPtZn81k2oFhIYAQJxRs8Ow=; b=GNrySo1EUhhajHpXImRhHYqtehPCMk1fg0CaO35WG0xcCBmZjFn4uPb0dFK92Mbfs1dwZBrLHGddqrp2eFSQBlb0ugPHsvavGWDyRMbKr2bWISfBqfRcvKpQXubseSgv5rkWENzBXeoiQP1qdl6WN1wisu07sA6TyRjtE1WIgk0= Received: from SN4PR0701CA0009.namprd07.prod.outlook.com (10.161.192.147) by BLUPR07MB881.namprd07.prod.outlook.com (10.242.190.25) 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:42 +0000 Received: from BY2FFO11OLC016.protection.gbl (2a01:111:f400:7c0c::162) by SN4PR0701CA0009.outlook.office365.com (2603:10b6:803:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.8 via Frontend Transport; Tue, 3 Oct 2017 08:55:42 +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 BY2FFO11OLC016.mail.protection.outlook.com (10.1.15.61) 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:41 +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:40 -0700 From: Michal Kalderon <Michal.Kalderon@cavium.com> To: <davem@davemloft.net> CC: <netdev@vger.kernel.org>, <linux-rdma@vger.kernel.org>, <dledford@redhat.com>, Michal Kalderon <Michal.Kalderon@cavium.com>, "Ariel Elior" <Ariel.Elior@cavium.com> Subject: [PATCH v2 net-next 03/12] qed: Add ll2 option for dropping a tx packet Date: Tue, 3 Oct 2017 11:54:53 +0300 Message-ID: <1507020902-4952-4-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 Content-Type: text/plain 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)(4326008)(107886003)(5003940100001)(86362001)(72206003)(47776003)(6666003)(104016004)(478600001)(77096006)(101416001)(2351001)(54906003)(2906002)(69596002)(50466002)(105586002)(106466001)(48376002)(305945005)(356003)(16586007)(189998001)(50226002)(316002)(8676002)(76176999)(36756003)(5660300001)(6916009)(2950100002)(8936002)(50986999)(81166006)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR07MB881; 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; BY2FFO11OLC016; 1:ZGxlUmOUsV6bG17JegRkSul+kDSWBWLoWF2IwPBQj93Z/rvV6oqgGU7z0unmRgsiVk8KwC8udSC7wmEyecTnSKBB1ND6JSw9AYzkXO/NWm20McuC9GodJtX0QiA6oiWJ X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 971fb3b6-4a6c-428a-4c98-08d50a3c8702 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:BLUPR07MB881; X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB881; 3:6l/KaC9gTlEMog+PQf8OXhWjXVoReZnb5Xitj8V8Aub6OG/12/voXHAiz7aoAU7gtpFD2mbIQ2pzk2UORiP4HLFnOV/eqNQu+1BZAW1HhD9MuoFSOfPruyTjMedZNqQyELB468ikZWXrOmdKE2giWoix1kxCiaJMtbm6K1tFCbDJxyPqc/TKIjW8T8RzTz4xea9pC3wgOORTiYfKmSaRy0XrN6EvkSB+ctEMdrVMSKhsSuNImZ82AdEMxP3WaGUs3cdt3jl5YS99N0kYyn24GxP4R/KX5e1Gq5pIvNhAKOlrzymcBMO9LC9YdUVzTRFNNAkBs4VhGpc6kNGTmw4//A==; 25:Ubq/XqsEksAkx4gYcDKxu21MqxBURLTGFgc5RhNLDPjBEsGDP0UoSxhUps8yfnzH1Wd7ekvvvHJd/RiWA6XN+8dsK6ghiR0sg0tpGOn+mHZ63v353TsbTvwG1GPJDA9+1/tc9P6+Hlefw1uR3DVK4B65QbGn1KwfhIGmrajVNeFCQgomPYphGoS+t0xXlt/iA6bAMEIEb+xM5p3yTExFES1q2KEVH1zOwb1lI7PBY0e9RaqmiLM7AydVyg3rTdPrIr2qJNHXjcWUNCMze0YKXHO2WoBTZOavCmcpZHGtpGH9A6HvXiUAoqCreEANIOUKq0MRGPawODqbfeG6hTlyYQ==; 31:+rpt2bs+YmFIjvCIV66qpfGIcallO/zSh2a3/QAC5XO4+FMLYZtxsq6vuXgAUR4f1q4By/PKV9HVwZvf1/95db9KYZ8ITivPwjSIkfyNEiNs0OKpF1OiVmKZEYYBRWxiAAvDRFTuWqhpL3jT0f9tsARAPRBAEgxoSZaIrAgEpIGC0+2q2aYLAQW2eRnhLWZTU4KhAd4lEa3XgCgj2H8YfX15hNa3CEluuzqIg0/hdlE= X-MS-TrafficTypeDiagnostic: BLUPR07MB881: X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB881; 20:KaQmtYBXo24eVOdvc6iU6HbV8RAtOInufmbvLQrXyp83hF7uHkx674EodS+N29cvMJ0o3OtA7k/FJXel5xrRrsQcmzn3IA1Sx1+xISMHLKa4kLVuso1NXWKFFYrwOE66AT6LCvEAlEQ4Lp2x6kmmEng0ibzJYhLcIevsoub2SGYt02RlK7fvLkao4K9DLdUqKIOPBbclO77+5Gq+wdF2//4fHLjXTpG7dUlNv8naVZ6XBHd3s/MOaKGfUjLMlW6FSQd+7ZLxHQs/1RMSRDhMGnSvq2Vv04AhDBZIxWwItXc+ZzCNkzvoWUZqeWdBfyqbkXK9+ov3+TXR0Uie1n/ewNIInc9r/nxtuqdJRlReNgcUm4vpxyeNjxO2UnKaDKPM/PbfgZTB6RiPkRhD3HYNnVY/HS4VphAqm7HpAcVBS7Yj66lfcU14dIZNUfbpHlLaS1LS9XhuVm+RE13Iq/DOBvqg7RhjSrSqPVnDJqD5N2mEeTuR/z86Y8CV1I/A6i0K; 4:6OH6t4lMXUpNGY3Cj8g/2JVg+0TevO653/c6qJlHGsAgWu8ivC9wHHuavXKUsJWjl/1aD9b28PW0VFcRljuo5Ey2OjbtwAwq3bYE2CJo/8dJkL77OI8wbWOzM181fQ1ijUv3GERCeeEY8UaTwqzvbLBtkEfpQyxMYQH76wYCffP4znea3CZKA7g/RgoDz4UnlZcIp7EGW1pQi/GJg2EfDu69hAkgpbBA7/y60WLAASQtq890QOLNjvmXGfTAshnm X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: <BLUPR07MB8817A055CE27307369FA1DD88720@BLUPR07MB881.namprd07.prod.outlook.com> 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)(20161123564025)(20161123555025)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR07MB881; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR07MB881; X-Forefront-PRVS: 044968D9E1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR07MB881; 23:3ZKjtWL6Ryvob/RgwryjNIEAeL2qqhdLybc6H/CPpI?= =?us-ascii?Q?xtBEiW79n/E20Uz1CUzSIVJP3Yloqv6zfhlA6by43qbL1On0lJcBqtHBgE6v?= =?us-ascii?Q?inQpL9OFoOR72d4NbRjYSaowEpjH+vIMbYMPRIkvpSU7FXGp4W3iCAV89Axa?= =?us-ascii?Q?j4yeWgo70dABGpsN+EyRzOVHzCMP3HgjVI/ZEWhOlvtz8Br4ixpUJnTtaFlx?= =?us-ascii?Q?UfeWI8p7lPzMZDTzLRyGXGemdObOQz/x1CzQ6LkXdPZD7wRHfWde22P1zhqI?= =?us-ascii?Q?JLrsWSw3dJHr5/SHR05YhdmI0+bkrKfg63nuOtwkvEXQHzgjMrc6bDFGgg83?= =?us-ascii?Q?f31faORdQxKnNza2asyvh7DMCq1Zeb1943C4u2RP6saBBenalpJI5uQ98VSA?= =?us-ascii?Q?9lYG1/0/GEJqm4RCgkY8B7hCAHQsOa1JkgvXFpNV2sRqFNAR1lmVlJDj7qW6?= =?us-ascii?Q?O/Ww8ZGCxrDjaTpRaRcQqFQKNlLFA+L1eW8k4O+ktBAp/9JCIjNuWk3oDd4j?= =?us-ascii?Q?jwLJzCr+brh7gDaAafiVXj3CdQDCahidyScV3vzGreN1Z0NoDXbMo6SOezOn?= =?us-ascii?Q?fZ3OUGZxdoy8nD70s9GZOBPhwGl2opQfArCYzTzt2jKe5Z5KHDmDIL6NZbB4?= =?us-ascii?Q?q4yqB2sG8XDJEoeKjqhSXz+Z/J/nfW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s/7tQ=; 7:6ItulQ8A2YJCltNUbG91nQdCS1J0VOcv10fqocWGh/isASoicoJ5xdkmibKGL0HAVKpD5qtWY+BcZhv+yMZOjJISu29+DRYdEQaljcMITNfWUFzNRJvkLX3fodyZs7b5As/Omgwpcc2tlt4eStWUtI0KBqY1O/nC+LaSJXjbATOYMSRkJRhxQEmi+6Z92QDa7FVkQG4CF9tsh64SCPSwRCV90FJV3YDFpx13ZbJK+uY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2017 08:55:41.9999 (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: BLUPR07MB881 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: <linux-rdma.vger.kernel.org> X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/net/ethernet/qlogic/qed/qed_ll2.c b/drivers/net/ethernet/qlogic/qed/qed_ll2.c index 3c695da..ad67d36 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_ll2.c +++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.c @@ -1597,8 +1597,20 @@ static void qed_ll2_prepare_tx_packet_set(struct qed_hwfn *p_hwfn, roce_flavor = (pkt->qed_roce_flavor == QED_LL2_ROCE) ? CORE_ROCE : CORE_RROCE; - tx_dest = (pkt->tx_dest == QED_LL2_TX_DEST_NW) ? CORE_TX_DEST_NW - : CORE_TX_DEST_LB; + switch (pkt->tx_dest) { + case QED_LL2_TX_DEST_NW: + tx_dest = CORE_TX_DEST_NW; + break; + case QED_LL2_TX_DEST_LB: + tx_dest = CORE_TX_DEST_LB; + break; + case QED_LL2_TX_DEST_DROP: + tx_dest = CORE_TX_DEST_DROP; + break; + default: + tx_dest = CORE_TX_DEST_LB; + break; + } start_bd = (struct core_tx_bd *)qed_chain_produce(p_tx_chain); start_bd->nw_vlan_or_lb_echo = cpu_to_le16(pkt->vlan); diff --git a/include/linux/qed/qed_ll2_if.h b/include/linux/qed/qed_ll2_if.h index d7cca59..95fdf02 100644 --- a/include/linux/qed/qed_ll2_if.h +++ b/include/linux/qed/qed_ll2_if.h @@ -64,6 +64,7 @@ enum qed_ll2_roce_flavor_type { enum qed_ll2_tx_dest { QED_LL2_TX_DEST_NW, /* Light L2 TX Destination to the Network */ QED_LL2_TX_DEST_LB, /* Light L2 TX Destination to the Loopback */ + QED_LL2_TX_DEST_DROP, /* Light L2 Drop the TX packet */ QED_LL2_TX_DEST_MAX };