Received: by 10.213.65.68 with SMTP id h4csp255636imn; Fri, 30 Mar 2018 05:03:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx49+MU6gQP/0v+VmOuIbQWl/4X/gkCQN8cZPWIwZsGGLix1PXd7RLMiOZB6SpDJ5U8HYmYPF X-Received: by 10.99.174.6 with SMTP id q6mr8341968pgf.179.1522411422047; Fri, 30 Mar 2018 05:03:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522411422; cv=none; d=google.com; s=arc-20160816; b=CDFRWCCns2vBJcW1ujHWnAebmF3NKCCK2NZcctI9XhrkeuypKUIycDb6yGZyJcs/Fx 4ov14ZzrFMM5qlf7PgDMBYtRriDxj+g5l6e5+IS1iA4N4QAiViQKsxHjmUYmeIZobK+S 32+LSxdBX9uZFoEa/mLk3bCRjnrSoW72VYVMRedQ8RKi+CjxJjjJuNcsoSORVkvTrACw SRWx1C8C6k2eLgtBCOX2LFT6TUeE/X6Qbq0tz2pe0/ofDwEdN87S9rWNq0HRPgZ6z1Bf wPTHrio9zpV0SHhKBFo8Uf2SusxmdtLFmIRYx3UW/IpRXlwInvY2NJN4ngwxDYa48GPQ 2Gbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=9aqnP25m6wf305EbxzI/J+YGb45ANP1kBZf29yajHmU=; b=WSZQysz8zsl+VVsJevCq7KIGAh6x2IyHlOi4SH0dTMJeip24sn3tXHIzDfiCS6J78g LYyBTOFBC13UDJ5wGCTea/XvTPQvG7cE4Iwi0SKpt8t3XxIo8jLn3mjAruYR4La89u4P G1feK25bUUle6rTIt0XbmptHgOKomYqbk+xVUHOaIsDkxN9gkXdyEqni+ruB2SyNcEE7 rllb0sjEV0nKi3xNjtWNgKrFp/j62rPnL52ULxBnlYA3TrCP9isre0OL9EwhipskHohI EeBAltA0c5xbiWar2uGNedfo2y5xym7BTcuhJ6v4WYAOWMkgYiPbZqdzeNAFyo2/ZlN+ keRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=fIfUDr+F; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1-v6si8204913pld.280.2018.03.30.05.03.27; Fri, 30 Mar 2018 05:03:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=fIfUDr+F; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752731AbeC3MBb (ORCPT + 99 others); Fri, 30 Mar 2018 08:01:31 -0400 Received: from mail-by2nam01on0053.outbound.protection.outlook.com ([104.47.34.53]:44448 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752275AbeC3MAa (ORCPT ); Fri, 30 Mar 2018 08:00:30 -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=9aqnP25m6wf305EbxzI/J+YGb45ANP1kBZf29yajHmU=; b=fIfUDr+FVjoMQ9ppXkynpI48EKdR6D/VUnVYVL6/r5Fbe73A1CKaanofqwHXWdeOjjSgoxUMyIY4Ao/tcnbDc//19033grMl6rzzDKoqRFZXNTNKMsIZ1nIhGz3AHauHLxSj5tzfRYS346yXaEK2r0XSptxngCrXkQWwVR/TySo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Vadim.Lomovtsev@cavium.com; Received: from localhost.localdomain.com (50.233.148.156) by CY4PR07MB2997.namprd07.prod.outlook.com (2603:10b6:903:d0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.609.10; Fri, 30 Mar 2018 12:00:28 +0000 From: Vadim Lomovtsev To: sgoutham@cavium.com, sunil.kovvuri@gmail.com, rric@kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net Cc: dnelson@redhat.com, ynorov@caviumnetworks.com, Vadim Lomovtsev Subject: [PATCH v2 4/7] net: thunderx: add new messages for handle ndo_set_rx_mode callback Date: Fri, 30 Mar 2018 04:59:50 -0700 Message-Id: <20180330115953.17154-5-Vadim.Lomovtsev@caviumnetworks.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180330115953.17154-1-Vadim.Lomovtsev@caviumnetworks.com> References: <20180327150736.10718-1-Vadim.Lomovtsev@caviumnetworks.com> <20180330115953.17154-1-Vadim.Lomovtsev@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: CO2PR04CA0006.namprd04.prod.outlook.com (2603:10b6:102:1::16) To CY4PR07MB2997.namprd07.prod.outlook.com (2603:10b6:903:d0::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d3bbef28-86c5-4c31-369a-08d59635d490 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603328)(7153060)(7193020);SRVR:CY4PR07MB2997; X-Microsoft-Exchange-Diagnostics: 1;CY4PR07MB2997;3:bin9r6jcTnZa42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Dp8Z+hHYW3z2RxVr2/+08z7dXUvoYCPFVhkd9A+wHW0kQj4BTou5oiUqshFJlOn8RkoGOMnhsqZVSmPB4Dhk4tUJhwlu/eDW24dIUGIIrvBMvxW5A2Eu4eqtgY86/7x/Gk+ixc0LM/Hk+podBUugVLAZQdpHjRManOlnR+r60ZykJpQ/Nizt17eZFZqcUiAKV8jXShr06pYQ2N1uYgPmst1CdhkDVWT5jAtpU3jswUBS1xkYby0x09wm+il3jJL6kIkE1eem7S5tizScwM5Xt3WVv3PaWv9EDVfYqzrDyxrnVWf3CAoLGNT+2d0cUX3VAoMHv3Lkq2rV38JInM2cyMjshR56GV76B2OQdlQOfrXlwzbf/XkjZifIdzKD6EIfx+vbQAJo+YGFeNsrH20j7PrwZ3M2DplZPFNcXPYXJhSCTSdVf9mZVC33EH5HcA=;4:UiWwZ54aL0jwuDuB17pQ42PwInPuONC/YDwpzMEzBtygP1MO1ijwyfXZ/mtFRMZWO1Y0D9P6PLJl3SOO9oePxhz3DPaC0K/Rm7XUp5zVWGXBrJBk+n3BQOtTIKeBkkq+OBc4Jg4yKWmwes6NBQHfk/slCAB/UTL5VEq0XzGkdeDwPgAUTjlhGsfool/Ua1vGnhIySK8nF+ut6ecsJTlEjx1RrIxpjuPJrDM5Qag+k+KvLHNsXyyHu9IU7RBdXJWg/R5iACqlNWhPxmyWjl3EUQ== 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)(10201501046)(3002001)(3231221)(944501327)(52105095)(6041310)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011);SRVR:CY4PR07MB2997;BCL:0;PCL:0;RULEID:;SRVR:CY4PR07MB2997; X-Forefront-PRVS: 06274D1C43 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(396003)(376002)(39380400002)(346002)(366004)(39850400004)(189003)(199004)(3846002)(6116002)(1076002)(105586002)(81156014)(81166006)(8676002)(48376002)(50466002)(53416004)(5660300001)(52116002)(97736004)(51416003)(6506007)(8936002)(76176011)(386003)(69596002)(2906002)(6486002)(6512007)(72206003)(39060400002)(6666003)(47776003)(316002)(7736002)(16586007)(106356001)(486005)(486005)(476003)(107886003)(446003)(305945005)(53936002)(11346002)(2616005)(66066001)(16526019)(15650500001)(956004)(478600001)(68736007)(36756003)(50226002)(26005)(4326008)(42882007)(25786009)(227083002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR07MB2997;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;CY4PR07MB2997;23:5xofPDRQob2NKAt1BcV3jHctUV7IZtY85CDwrSgmI?= =?us-ascii?Q?i0MC1eX3PgBzuIPokkYxu3pMzgHzYx/vlP1kiX1xVjtkk0pH/mrM+zL10Flf?= =?us-ascii?Q?jAGBf3pFgGd7XsFpsQmzzBrUIMxCJ6Dgn7ANHz8TETtXJOKUdfJuu28KVgJQ?= =?us-ascii?Q?pmBtDda5qZAZlLjxUdo9C2p5B1JodjFJeR0VHEt//zqcYgPsZE8UI2ZuHmKn?= =?us-ascii?Q?bUbBhPh7POsGq9fTVD6F4Uzt5U3dr0LunKhGKecsGsZ0CLVNjLi+exVkSIJ+?= =?us-ascii?Q?cjKU1vb9aRpAdr+7iPF4hTNe5ErlcGTmBmYfwU2C8HX249FbaWjjf6uHXI2l?= =?us-ascii?Q?X7H3OClPHUVTJRxLZ/MSoWiycU6uoms2ktY9yLOb+4y1IcfEOhv1oHNunBxG?= =?us-ascii?Q?ia3XqiR0TMWsbUfORWJ6j5bXw7kkMmRWP8rI5zVcJDQEK6Lfs7UE0LnX6Edl?= =?us-ascii?Q?1N2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bAunUt7LD89Fdl/x?= =?us-ascii?Q?in2QA=3D=3D?= X-Microsoft-Antispam-Message-Info: ixIr9v7qeZOhir9dwqSV4eHcKUwyAJzxNeHaF0gyejs67SanvzbfOFugy6YvFW7K7r4EI4hDZcGfnnt/9kMr2n7dyZqfYy65zwEPF9E/G48fj5dtpPPiV1ciOgaIo+hAg41sEov8u/ym3GirzvDEjIDiJgPOlys4SSBw+owjB6IxPnDETbPzBkO/niN50zSb X-Microsoft-Exchange-Diagnostics: 1;CY4PR07MB2997;6:+4Mh1fOQ1hBvabOJEm5WUvgQXKNxmGxOF51HsH/e5J7901FpppPUCYupQxAlmN1SowhfeTaUA38wdvoZ0iXCi2zzE5OV3vj2huTJShJBNXmeMMRJjQzh48+czDMGYxQqgsNcaTewv1mJx3k+/nzs3DN12uV8TzBWnsy88wt/BsFNsElfVw/OtnradKcfIX+YJs5Hw9Lx7ZjP9Ud+IsMzciH/gOpHcURfomNGcs9yzw+YYKgNHMji4irZtBW+27JK5XynR7JxCd3uNFn2cKX/vPlzPssgdR33x1OyLR0HV4aAkW3mPdPK1tqbDZJFzuCtZy7Jb9cYiV6y8upi6WeF+V8OW3zeTqLK5VGH8PHodevFbZjZpLERCKFMeXDeYVTIjE4vAVkJ4Ukbvw4LPB6NDaN1oghguqdjgcX6qZXRtyzjfX3TBX8U00MD4+zVWDaIRd84rSAiqQURxuXyZ3MPSw==;5:bo1JbHp+jwdUxf73oLCnc97+VEx+RIdzZj5SY802jXbCkYOj+3hL7dGxnM4bLzziMfq1B9LPC5dQ1JN06FY5chWcZz/OAsLlAw1xtpc7SLLUanHyVgpl0okVerRG963URDj1vmblYjDnfnDsvSc3eHkY6/Hxpi4H1wKQAFzUjtM=;24:n4IhUVq1nmeucWIm0Mz5QFUjQRN5d2kTdw7I1iBndkofg+B7krWzuc9Nd9DaZ1Jgvpc/AFMU66QFuT5iCziKV1iEAqKCASdOx1n91f3AvR4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR07MB2997;7:Y/3yNJtWpsIirCqm88lSbXEpt5KRr92JklvlHZr3B4bC2rnBckcVvioHuOST2WD/P0mkQPXQw8FLqNnivTJacrxHb5vSLAO9Vzk8gCmVy/Q3kCv6s+qdvO0gBP4H/uFF1YvduulsEC690mAqtnSwA/63D2dSK0swSNwjMZJSzvovaZGW+VsocZwGVOYvSNvxhtfi6RwCmU+LZoIoTgOpCUaC7uPHeB6z58+S371k43gj6IXrgdJS/J6T2lL63NLG X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2018 12:00:28.0822 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d3bbef28-86c5-4c31-369a-08d59635d490 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB2997 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vadim Lomovtsev The kernel calls ndo_set_rx_mode() callback supplying it will all necessary info, such as device state flags, multicast mac addresses list and so on. Since we have only 128 bits to communicate with PF we need to initiate several requests to PF with small/short operation each based on input data. So this commit implements following PF messages codes along with new data structures for them: NIC_MBOX_MSG_RESET_XCAST to flush all filters configured for this particular network interface (VF) NIC_MBOX_MSG_ADD_MCAST to add new MAC address to DMAC filter registers for this particular network interface (VF) NIC_MBOX_MSG_SET_XCAST to apply filtering configuration to filter control register Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/ethernet/cavium/thunder/nic.h b/drivers/net/ethernet/cavium/thunder/nic.h index 4cacce5d2b16..069289b4f968 100644 --- a/drivers/net/ethernet/cavium/thunder/nic.h +++ b/drivers/net/ethernet/cavium/thunder/nic.h @@ -403,6 +403,9 @@ struct nicvf { #define NIC_MBOX_MSG_PTP_CFG 0x19 /* HW packet timestamp */ #define NIC_MBOX_MSG_CFG_DONE 0xF0 /* VF configuration done */ #define NIC_MBOX_MSG_SHUTDOWN 0xF1 /* VF is being shutdown */ +#define NIC_MBOX_MSG_RESET_XCAST 0xF2 /* Reset DCAM filtering mode */ +#define NIC_MBOX_MSG_ADD_MCAST 0xF3 /* Add MAC to DCAM filters */ +#define NIC_MBOX_MSG_SET_XCAST 0xF4 /* Set MCAST/BCAST RX mode */ struct nic_cfg_msg { u8 msg; @@ -556,6 +559,14 @@ struct set_ptp { bool enable; }; +struct xcast { + u8 msg; + union { + u8 mode; + u64 mac; + } data; +}; + /* 128 bit shared memory between PF and each VF */ union nic_mbx { struct { u8 msg; } msg; @@ -576,6 +587,7 @@ union nic_mbx { struct reset_stat_cfg reset_stat; struct pfc pfc; struct set_ptp ptp; + struct xcast xcast; }; #define NIC_NODE_ID_MASK 0x03 -- 2.14.3