Message ID | 1507541874-18344-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 A314560223 for <patchwork-linux-rdma@patchwork.kernel.org>; Mon, 9 Oct 2017 09:38:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9543D285E2 for <patchwork-linux-rdma@patchwork.kernel.org>; Mon, 9 Oct 2017 09:38:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A23B28755; Mon, 9 Oct 2017 09:38:36 +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 D34EC285E2 for <patchwork-linux-rdma@patchwork.kernel.org>; Mon, 9 Oct 2017 09:38:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754021AbdJIJie (ORCPT <rfc822;patchwork-linux-rdma@patchwork.kernel.org>); Mon, 9 Oct 2017 05:38:34 -0400 Received: from mail-sn1nam01on0046.outbound.protection.outlook.com ([104.47.32.46]:9088 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753728AbdJIJic (ORCPT <rfc822;linux-rdma@vger.kernel.org>); Mon, 9 Oct 2017 05:38:32 -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=Zv1NA10zNubcvGlvSNbt7jEY6XeFRdh6yjQNpoYp/27oBGThjiLnvDZl9flgT6uQfQjLJZKA/LkQlwLz3Z1zC8m/SOSjvL0kVgQhB66qzI3sIqxW1LJCGIXnxDhjm4eiMniD3iyIZyaYs7Pi1RMyXcI3P5K7z8bT8vWv9P7YTgQ= Received: from CO2PR07CA0059.namprd07.prod.outlook.com (10.174.192.27) by BLUPR0701MB1940.namprd07.prod.outlook.com (10.163.121.158) 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:30 +0000 Received: from BL2FFO11OLC008.protection.gbl (2a01:111:f400:7c09::184) by CO2PR07CA0059.outlook.office365.com (2603:10b6:100::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7 via Frontend Transport; Mon, 9 Oct 2017 09:38:30 +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 BL2FFO11OLC008.mail.protection.outlook.com (10.173.160.143) 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:29 +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:26 -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 v3 net-next 03/12] qed: Add ll2 option for dropping a tx packet Date: Mon, 9 Oct 2017 12:37:45 +0300 Message-ID: <1507541874-18344-4-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 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)(376002)(346002)(2980300002)(428002)(189002)(199003)(105586002)(4326008)(2351001)(106466001)(69596002)(5003940100001)(104016004)(107886003)(50226002)(86362001)(189998001)(8676002)(36756003)(8936002)(81166006)(47776003)(356003)(5660300001)(2906002)(16586007)(72206003)(48376002)(81156014)(316002)(478600001)(101416001)(2950100002)(77096006)(6666003)(6916009)(305945005)(50466002)(50986999)(54906003)(76176999); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1940; 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; BL2FFO11OLC008; 1:4tfmBxEmAA7IyZP3iEsZZTp4HXrT51gXh7Y8D7ng7fz8IuWdMvpDLVtJAT2q3SMZK7Vk9kInNeSKCGegu4mzDRIuboFj8Z8k47Qk402OSPttfaFGNMpRnvBb+AS+ufTE X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 94249d10-a648-4b0f-03ba-08d50ef9802c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:BLUPR0701MB1940; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1940; 3:XEENS57Um+xc0DJRwkA9u8/QWad6LKDnQoNvzWOzkK9K+b6X9FvylkAaA3s/TCCWM0LOV2SEVwis8OyIDY6rq2yAt6TGDHFIY/FVC6WX3QGTjTuGSN3RBoJbi8TsPNUoavX8d4wcRI841LsdGXFtBXHD6Dbf+0XWWwx2wzg8D4KmZQR3mFj4cLOyXr/QLfPEQmQuSMrjWC7rOONXg4UV6ljdDC8CacIJ1B+haun/pBm1ZoGi83wBPhPgGxUUj9KKqj0xlF2TpKd4wwX6Z0BaWQ0+zWXlBguyy9ile07nvK5+N5aRSar5jZqRR173vkLGNd9m+PEJVR4k6Z30uiV0Vg==; 25:VhQ+pvTFmlA3pW1rkIaWK0sFZ/rHgfqt7oUlhmQj3N0V2X0HBIrFKhib9aQXSAJjHNyCryCK2ouHo1dsYFT6DaRQkKN5tTDZCpCckfrYKuAT1AVKX3f3nuNMqi4q2kJPZyrWsPmqnRss3lYcEjAT38Pj0M7eLFJLWSCZOj8bgcxaHlTcrnBd6BiP9s2ARgszlgns2EyMcq31T1HPyWS4njDujRXEyXjsHg/HVBY2wjZ/fCTNNh5CBaCxdlyuLHBpTLIrQaPobjhP01ybMR7lxeexDpF0zrDDdRS7K5f03IxZk5EwCZ3Iw+31fbFzLqcBzyXJdO9LgedIYgdyBsKgPg==; 31:rZ3+B9lPelccUXGcbdVMJsgeus0z3kSWzR8hh+IAN+SzAI9d6kwQAw+v5FDIAScuNo6V+Mqt7O4bkMdauCQMgRYdmc9WvsKTcJtSfKcLxAW2vVLU0sXPT/4z8auo1HGSE5WaGT78QnUtGwksV9/q2s68LoX1P1VmDKQIq9Bn2oRhylvqlE1kwvI1zWHZuFpx/4T4YGVnCTpS6mJ3W9d3a8DnosazpUSYc/5/qTb2peQ= X-MS-TrafficTypeDiagnostic: BLUPR0701MB1940: X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1940; 20:mYb2RxXfpN41zHRXlFuO/rNfxNOhfGUCPUSymc9rxQGTaBmM5X06JYrlj0tykYU20BKc3ZyATJ4AgPW5mMC6HCh2tb0FxVdrez4fhle3TEeuXLKzYtBToC9Ubp3byjZLwhkaiU8FGpONPGDJsKo0EQ9MNuadwC6oQDqogySgYc+4IcZ0fVcni83wo3j71639ZF8l0oS5XGFnCZUZqqODZAQmpUPKTIkqp7fMvUY8ZkY8XziQagSgjWRuGkTVY6okqbvWccLNy/fCZHP90axxlj6BTGs1oDi4c/bM7gSnIlnz3jcI8bf2PZQzAK5HCMipusluUInkzOsO1g0WgerBZ++PW4SRYzxtU5uMvgOUpnzkdmP1JR9ZvwiMnAyiEzSe4K51Yj7+n2B2mb4YtOMHTdz+mqCPUSc/tKTErRIRVBcC2Mp8RIBoDajncQNHJridHBW4+PatcIg7xExZK40xeocsTHfRLbtsGOyYEC5JYvURTgevshokA5RzehpuoNUP; 4:Y37GEw5fr+bfUpiba60MTjPJcQ+PASUK5AjqTrOmNL064IS8wTPaGblshVdbcsON++Yanf3csBBAf0dQuVVSLmsWLennwsFI7VkAYHzBWC+nk/utnnVhjjw/XIKU8pWuTNBF92MgVKDSSvmMmEnsff8nuz5ROZf/OY8CScmbupLXaC6tOeaVCobdVqu3fgSyvaXGJIbIJxKzpDWs2vzvgGKnpkZpKmzMAQnCYABXNuu9FSiEKbPZE2AxSh6gGTuO X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: <BLUPR0701MB194095CC2D174671A130263B88740@BLUPR0701MB1940.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)(3002001)(93006095)(93001095)(10201501046)(6041248)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR0701MB1940; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR0701MB1940; X-Forefront-PRVS: 045584D28C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1940; 23:jBrBBsljSY/L0ZN6XHPuQbzjKSfbwJz9Qyz33ek?= =?us-ascii?Q?VOUEs4ezzNl1bNJcFNhPjYKvA7mYnMdrU1jnc/vhwRWFixcj7t3yksFEwWuu?= =?us-ascii?Q?lSlj0dzEPr8hBTVvhMYQ3LIV/TMeFOAtqRGFvXkmpBW4z+D1TZxPKptItacb?= =?us-ascii?Q?m1/xjgGQsdQlMisAOi1yC4kCsxbj15HfNim9u2HNRB0jnL6dxonjHzVrBZ75?= =?us-ascii?Q?19UpKDLQd6BZJiPHPtrxUyuhVvagVgo/woq0fq6rYuHQR1B55t+ME+v7/KgX?= =?us-ascii?Q?oWLHqINN8YrnEVPLfRnfLzVHLWeAFwvDgDmBBQpN6AzYM5kcRnnz8MQjyTAD?= =?us-ascii?Q?ucWDFa6gUf9hYKMR+Ioyt7MRIJSUF3wpTeu+/VCh5KHCnp+BXTNKGkxHYlpG?= =?us-ascii?Q?BsOfB7D/BLnCwh66URzpjoh1xAXRFrd/DsPVxmFuG9a1Z0iS/9IbWz/IF981?= =?us-ascii?Q?GP8iFDUHkqOMI0D5RKrMUZIZBhp8xTMKdrlcBaQWvw5YZss1SA4EmpYYOcBa?= =?us-ascii?Q?JlkpQXB250udzlNSXDeNjPsDvDV3Ck2aijaeQSdEnZX2TWj/w54RfnlpGsr9?= =?us-ascii?Q?A8m8LnTIkMsDUjWSTsr7REgZr8R3BWy7TXKFyP8ucdPLLsmYi7/T+SLP3KVO?= =?us-ascii?Q?wDff99TjYUT9CjXGb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77oIogqffhDP02AuihrYHDvKc=; 7:RtOrhs+mWaZWWIUKL/QJKMC7Pv+XTMk1Agv99g+GHfG4p+9m4fYs6TYP2E9YxuSU2jxl8g1jEpY7BV0PPMlhOsWkkkhDoQzAbT8FQMxAl0SrJe5BFTPPG7Xdp7tQ+lYSfJbVYEJNDU2WHDgNQXdMVnm9JEHWOp3dGZIoUFtM15objYMpC0LCbhy18Wq+Hi5WnutEzDAxNOpkuSb7xm19RwsaHuDuwOrI1qiHfjQdizI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2017 09:38:29.9219 (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: BLUPR0701MB1940 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 };