From patchwork Tue Mar 27 15:07:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadim Lomovtsev X-Patchwork-Id: 10310443 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 1FD7660212 for ; Tue, 27 Mar 2018 15:11:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0207C29D9D for ; Tue, 27 Mar 2018 15:11:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2D7829DDB; Tue, 27 Mar 2018 15:11:45 +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=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8499B29B83 for ; Tue, 27 Mar 2018 15:10:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Xx/UcnEzH4oAVamCvQkiyEmjGdLEy8tDoXyHeBB2VU0=; b=VHwgfVsTQp7b2x HTHWYbroyNWG3D8KkbvqJR0ppMXi//Oc+1rzl45e81J7+cYeb7Ch0anNcKK5hFoStwvNvOcwD8Quu MO6KO8OcGLWBaiYFxbcK2owaaX43Vtje+UXs1zDFQy+BsvAqQ00Q9yHKLmA5oh7TOLEeWiCmXDo2M a0WImgNHIju1P5ghDMVJUSJuJaHH0H3b9RUkPW8RCsqqT4Tdp1A/TEpv9qeO/fyi5/Q2V+b71Q4h9 gMeEy+7N58P/8zTDqdEkYSCGxq13yaPLf+MS/82LGUexIX+FJPOvKHFggWjGph1NjKAKYdb9Dljs3 ZGArTRNeJVevvUwX7RYQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0qFJ-00055J-2c; Tue, 27 Mar 2018 15:10:45 +0000 Received: from mail-dm3nam03on0069.outbound.protection.outlook.com ([104.47.41.69] helo=NAM03-DM3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0qCs-0001h2-5V for linux-arm-kernel@lists.infradead.org; Tue, 27 Mar 2018 15:08:17 +0000 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=rT+swLlKlJVJ5gRwOsYwnJP3loNtdNU9b6miRYaJJiM=; b=aG1xXJmfricF4T4+++0IM1c8Cl1cnsGEqg2Z4SdF5TCblwIgo7lgg2P8bOUF4Q2EyIM5GRrVwBxIjNrGLsBSvbwsgXLQ4q+R4ILsqe2iZEG1MK1w7jhLQt9efVwMqVWV+lk1cDiMPCCqn9auLE2c9DHhawhKVPdRZ5TdniwbvEw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Vadim.Lomovtsev@cavium.com; Received: from localhost.localdomain.com (50.233.148.156) by CY4PR07MB2998.namprd07.prod.outlook.com (2603:10b6:903:d0::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.609.10; Tue, 27 Mar 2018 15:07:51 +0000 From: Vadim Lomovtsev To: sgoutham@cavium.com, sunil.kovvuri@gmail.com, robert.richter@kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] net: thunderx: add XCAST messages handlers for PF Date: Tue, 27 Mar 2018 08:07:34 -0700 Message-Id: <20180327150736.10718-6-Vadim.Lomovtsev@caviumnetworks.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180327150736.10718-1-Vadim.Lomovtsev@caviumnetworks.com> References: <20180327150736.10718-1-Vadim.Lomovtsev@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: DM5PR20CA0003.namprd20.prod.outlook.com (2603:10b6:3:93::13) To CY4PR07MB2998.namprd07.prod.outlook.com (2603:10b6:903:d0::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d9b5cf0d-138b-43f1-ced1-08d593f482fc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603328)(7153060)(7193020); SRVR:CY4PR07MB2998; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB2998; 3:5ulKAhPHw0KhE1c1EMfLQpv6S7PcQ4Vmf4+upbRM8kv+bYSl1Hcif6roU23pqN0BAoej+BDh0BocLn8W82PW4aLIxZzNYDd8PLMaET1THqW0CixQ2XMwi/QBmBrgKJw6QE64XIDbmh0NQyN36cuVqH5zGaYNKkIo2TOsdWGfXFlOf1BUtm815rLXYELZ+3ggNtrfGkDBlo+Htp8J9hS/rsnpIw/7yr/TXv4FFXw+RhXqKQ7JOcF3PR4UNXJKcXwh; 25:uSAxazuAdAE3ygMW/xNIiTi8Dd7mkfRV6QzW2iQPUZC59q0EPfeDDIOmcvlIT2m56OVvFvB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gHpNwjV2WglGyNBs+H+PvFef/daCDkZzZOAUIEXaSRaBdGx0PAb3LA4JE6Lrc0czWJgVshc1wWGqvTnMOqcZnDJDYDhjZL5HcClJFC8nHHe9v9sEt+PORa56OU=; 4:QfuI9mHL+EVQQ9jvFZnPDf06FAFdoe4sUFqo5zPK+LstnuOA9RioF3a6pPMjGzsupGFl5T5mfehf378yvzsg1Imj3RBlQ/LzO5h5UKY8IL1Oy7BHbmnv+YdaGDEfWdfYnKV7dPL6X/ECYUEsF4wT0C/r9GBvZwpwQgJCY4GJZw5mEDU5tYmELZHrSXnumql4nOYWBxbxZg33sOIv9FP9wflDWNiJkbfHZz4rOigp2rH6j9Ni2Vus24z2UbGCf4ZPN4IGVvDoIE1QZid+ZHSpWw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3002001)(10201501046)(3231221)(944501327)(52105095)(6041310)(20161123560045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:CY4PR07MB2998; BCL:0; PCL:0; RULEID:; SRVR:CY4PR07MB2998; X-Forefront-PRVS: 0624A2429E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(346002)(366004)(39860400002)(396003)(39380400002)(376002)(189003)(199004)(446003)(2616005)(6116002)(478600001)(1076002)(107886003)(3846002)(6666003)(956004)(97736004)(39060400002)(50466002)(7736002)(53936002)(16526019)(66066001)(47776003)(26005)(48376002)(486005)(486005)(6486002)(15650500001)(6512007)(316002)(305945005)(11346002)(16586007)(105586002)(42882007)(6506007)(386003)(68736007)(69596002)(106356001)(72206003)(25786009)(2906002)(52116002)(53416004)(76176011)(81166006)(51416003)(8676002)(36756003)(476003)(50226002)(4326008)(5660300001)(81156014)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB2998; H:localhost.localdomain.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR07MB2998; 23:AZmh2SCQxaL1/St6DYs8wGYvsq8UKqq79PBjfD1Q9?= =?us-ascii?Q?2ooMIsry46h2ykQMuIrmLMVctg+FbHvkEcAGQnO/EbuzowUdfHTm5M7FA3iq?= =?us-ascii?Q?2Ncu+S6+d3oX5mPoio6TkEfareFEY868h1J2SvbtakxFVHBu8zKEspKlUALX?= =?us-ascii?Q?GvIxKiHm280y1emOk45kJJR42zBDNtsLk4lndRIHwn12uUyewTEtS8+H4X93?= =?us-ascii?Q?SI+qujCTWHyhnj7USDDHJ0MGZ3acHcvUFKAevhrxSwzqKrAbxpRGOHT1Msza?= =?us-ascii?Q?b3CAyXeo6k2zPeo2aX2sqM5PIrN0U56oQIcP2wI+73EaFEzrftdz4rJyBHgZ?= =?us-ascii?Q?5d9ZjeipqBPuZpXamIXpkWgoN3oI8aKpHfArS81QU154bWsIrr3K8GpMZgsF?= =?us-ascii?Q?dw5PMXjPMq9JAVfP9Iw8rYwJckrpJj+Da0zRC1EXK5rpAcSlEBjl31mlGUIL?= =?us-ascii?Q?SaEkXHpylWr3BfCYT0iZCte7C6ZM2avrSuZ0Tu7jc/Pys/uHA4fKPyH3D53q?= =?us-ascii?Q?hylfEdlx9TVSmk/clR93+UcelKE0A6SlSTQfo06EW/V2E8rDzC3Jhf9lPMas?= =?us-ascii?Q?GPF6fXtcR6PVCanJDGd/BRX5hyIELvI1IkD35zOn1rREUlLktDRMCuViYwjs?= =?us-ascii?Q?VAdlrR1DvzbpmoEMHxJU3iqZE/aHMgd9OeD5PZFPNE/lro7bN9v/4r23vpjB?= =?us-ascii?Q?vTCsiMH26KNSgaL/W+pmByxF0fTASxGD0KaWC2gPzx3oUYB0NhC5DmAbQeX7?= =?us-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OTG/ewttb/lleJOlVW0i6CZ7a8MwlxgdkfM1J7IWxW+Eu64xOjk5wFeCZwc4sFyosowBjKJQ9armk0piUyk4TuvvyYaBJPejXebvTFIwmh9p2PFjudQsmuiro/mNQ46VNpaMoAUbZBCDQJ6ISYCiIadkkvlGw8uPjZngzuc/KOgCfG/oKiDWJ3Oaw3oiUsNmxcjR+aAnemIIZkfYULbjNFqxRdF65fRrhCZMOCuockkefNAlCtzH/OOOE0pMxUIJQ0AkpwX2Xe5TXpKsvzfgn3h3B2Tp3fz/7GRhNqsbr3fJx5jLOyPooVtZHv65IQFa+4eCf5HvbAKwdcO78DDu/cepe2/10tSwxeKnek1rpandrdQ==; 5:dQ6KWw4Kl228wf/Z8YxmFYZfWDIFboa6bBHLNP4+z0pi/Ek/8ivJw3alIIPzMgLgW04eZfZmgs4JtKfNSTt+muBZKbWW3HwCglIcfY2VfBteAeg3QjPFDrmu5yUnzMr/+9UZelzzvOwFSLRdORdpfkW4fThV4wkOeDsFRhkUNkA=; 24:FNVg0I18dbOz6esG29lczfRMqv7Ks3RS9KMUO6tiBDCWDI9jjwKfw/U9/8sLMQb7iH3xmQUMcG9Ude9c6iYeU1J6ciUbrOWaM00ym42nD0A= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB2998; 7:St7NKbb8dOj6O2dOCxVwHLXKcW/2wshDr6jx+j5QHTwQKDQDP23jg9XmALn3dSqQt+6ojzVxpYZa3Q6CSmcCg2MPTl7wHRpeIVSioIhr2QQQczFdj7RVF96ZqRNGLjXtf/Nrv5P2dXVfUz+CAfAJ4TUIchV389C5p9kkXLbgiUTJ6fD0LBRgujnevgz6q8SKrNPkHEZaVfuwW1M0Kr/e2EfK7kbyGFNhhWxHzeUrW37+mt4vmNQVjzPyosoncP/S X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2018 15:07:51.5452 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d9b5cf0d-138b-43f1-ced1-08d593f482fc X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB2998 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180327_080814_251267_41E2AD5C X-CRM114-Status: GOOD ( 10.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dnelson@redhat.com, Vadim Lomovtsev Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Vadim Lomovtsev This commit is to add message handling for ndo_set_rx_mode() callback at PF side. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic_main.c | 45 +++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/nic_main.c b/drivers/net/ethernet/cavium/thunder/nic_main.c index 7ff66a8194e2..55af04fa03a7 100644 --- a/drivers/net/ethernet/cavium/thunder/nic_main.c +++ b/drivers/net/ethernet/cavium/thunder/nic_main.c @@ -21,6 +21,8 @@ #define DRV_NAME "nicpf" #define DRV_VERSION "1.0" +#define NIC_VF_PER_MBX_REG 64 + struct hw_info { u8 bgx_cnt; u8 chans_per_lmac; @@ -1072,6 +1074,40 @@ static void nic_handle_mbx_intr(struct nicpf *nic, int vf) case NIC_MBOX_MSG_PTP_CFG: nic_config_timestamp(nic, vf, &mbx.ptp); break; + case NIC_MBOX_MSG_RESET_XCAST: + if (vf >= nic->num_vf_en) { + ret = -1; /* NACK */ + break; + } + bgx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); + lmac = NIC_GET_LMAC_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); + bgx_reset_xcast_mode(nic->node, bgx, lmac, + vf < NIC_VF_PER_MBX_REG ? vf : + vf - NIC_VF_PER_MBX_REG); + break; + + case NIC_MBOX_MSG_ADD_MCAST: + if (vf >= nic->num_vf_en) { + ret = -1; /* NACK */ + break; + } + bgx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); + lmac = NIC_GET_LMAC_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); + bgx_set_dmac_cam_filter(nic->node, bgx, lmac, + mbx.xcast.data.mac, + vf < NIC_VF_PER_MBX_REG ? vf : + vf - NIC_VF_PER_MBX_REG); + break; + + case NIC_MBOX_MSG_SET_XCAST: + if (vf >= nic->num_vf_en) { + ret = -1; /* NACK */ + break; + } + bgx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); + lmac = NIC_GET_LMAC_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); + bgx_set_xcast_mode(nic->node, bgx, lmac, mbx.xcast.data.mode); + break; default: dev_err(&nic->pdev->dev, "Invalid msg from VF%d, msg 0x%x\n", vf, mbx.msg.msg); @@ -1094,7 +1130,7 @@ static irqreturn_t nic_mbx_intr_handler(int irq, void *nic_irq) struct nicpf *nic = (struct nicpf *)nic_irq; int mbx; u64 intr; - u8 vf, vf_per_mbx_reg = 64; + u8 vf; if (irq == pci_irq_vector(nic->pdev, NIC_PF_INTR_ID_MBOX0)) mbx = 0; @@ -1103,12 +1139,13 @@ static irqreturn_t nic_mbx_intr_handler(int irq, void *nic_irq) intr = nic_reg_read(nic, NIC_PF_MAILBOX_INT + (mbx << 3)); dev_dbg(&nic->pdev->dev, "PF interrupt Mbox%d 0x%llx\n", mbx, intr); - for (vf = 0; vf < vf_per_mbx_reg; vf++) { + for (vf = 0; vf < NIC_VF_PER_MBX_REG; vf++) { if (intr & (1ULL << vf)) { dev_dbg(&nic->pdev->dev, "Intr from VF %d\n", - vf + (mbx * vf_per_mbx_reg)); + vf + (mbx * NIC_VF_PER_MBX_REG)); - nic_handle_mbx_intr(nic, vf + (mbx * vf_per_mbx_reg)); + nic_handle_mbx_intr(nic, vf + + (mbx * NIC_VF_PER_MBX_REG)); nic_clear_mbx_intr(nic, vf, mbx); } }