Received: by 10.213.65.68 with SMTP id h4csp749854imn; Fri, 6 Apr 2018 08:16:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx49dMQ/p/KgMZIgMJMWIyjAxOi0UJU/acMaKUnIOmPZ5nEM8IPZ46awA8aUC17bM7KxwQ/13 X-Received: by 10.98.103.199 with SMTP id t68mr20662465pfj.24.1523027760987; Fri, 06 Apr 2018 08:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523027760; cv=none; d=google.com; s=arc-20160816; b=A7pJrcFhdmbJ+iKSonV+ZVZ3XNRQ5dtPGwkSWTBZ1OtjzALbGR5Wdu0XujjB0mauHF kUbNOVz+ct9a0joFuTg9Uaz/0JD6yZMuuGkuoZaqqZM49oxdp4ibaPBXaw3bTnCVfhBf nrBxEpbnxQ2dZ/Rl9cDqquULXWKYZQXzWSejWq6qpoprLUHq1fdNtFdv/gg/UDr2g+Fr /4ddqRkCPBiSK2UTMvyx+7Cc9/ScOmCey0k26xYEsqBDk94Ft68ttTReZ8Vt+5+uru2M hcq0dPPH8m24j71mYgnB7XnBCcyWn/HIMoZmTO8/a0NRp1mG3/dGNGKd2bz84wDZ2Z/y Pgag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=qbzo6D6VD6pL4tbere9dVCKVidfgxUOIioTD6aywJd0=; b=n9S142e3ojd8Gw3hsfJWEwzGrx6Y40TF1zTpt/+hhoNjwepfkGhL2eNjm3qGDvVXCl rYa6gPVvKr1hHOWdpBi+yVkUNQLJQlOdEiVsWK1/25z8cgyYsc4eYpjn8vgRe7SUYOIm t2KM0hLN0KELCcQtC3FdUufPX1VAdeTCV1wuNTcmXtfDdRbPK/TQ0Tkm6YvmVJZi4gWB Hobb+jV2ocTTk9BmGa8ssBZSQVVpLSF4UxhA+KTGfeRO2TYYm0Tg+hcI6AemZ487o6qe NCL0WeTRfiYOL5wiBPKdUnsJ1tsjQHykensNi3g1evXPFp2z/THmMsehy//J2fToKTD/ s8og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=HzYiDSGM; 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 q12-v6si8595791plk.559.2018.04.06.08.15.46; Fri, 06 Apr 2018 08:16:00 -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=HzYiDSGM; 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 S1752301AbeDFPOi (ORCPT + 99 others); Fri, 6 Apr 2018 11:14:38 -0400 Received: from mail-dm3nam03on0078.outbound.protection.outlook.com ([104.47.41.78]:43563 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751435AbeDFPOe (ORCPT ); Fri, 6 Apr 2018 11:14:34 -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=qbzo6D6VD6pL4tbere9dVCKVidfgxUOIioTD6aywJd0=; b=HzYiDSGM6c83wuLRaV97/wdMTe+2oqN3Do4SuSH6Azxs54M31hQf1f7iy+epkQ4XOlqhs6nCKDZ9s0HpizdpYxxYcyjtD7Oz+U8BTJnkVSWcN0sbAg2E5YzZypfXzUzF2k3cLobcwqa3XO4dg8PHrK94ohPGAdyoTUyigQCjuA4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Vadim.Lomovtsev@cavium.com; Received: from localhost.localdomain (50.233.148.156) by BN6PR07MB2993.namprd07.prod.outlook.com (2603:10b6:404:a7::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Fri, 6 Apr 2018 15:14:31 +0000 Date: Fri, 6 Apr 2018 08:14:25 -0700 From: Vadim Lomovtsev To: David Miller Cc: 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, dnelson@redhat.com, gustavo@embeddedor.com, Vadim.Lomovtsev@cavium.com Subject: Re: [PATCH v2] net: thunderx: rework mac addresses list to u64 array Message-ID: <20180406151425.GA15317@localhost.localdomain> References: <20180405145756.12633-1-Vadim.Lomovtsev@caviumnetworks.com> <20180406111425.14636-1-Vadim.Lomovtsev@caviumnetworks.com> <20180406.110603.978796669734920248.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180406.110603.978796669734920248.davem@davemloft.net> User-Agent: Mutt/1.9.2 (2017-12-15) X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: MWHPR15CA0051.namprd15.prod.outlook.com (2603:10b6:301:4c::13) To BN6PR07MB2993.namprd07.prod.outlook.com (2603:10b6:404:a7::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 884f6c47-ac61-4524-4d1e-08d59bd119c9 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:BN6PR07MB2993; X-Microsoft-Exchange-Diagnostics: 1;BN6PR07MB2993;3:x3JO7KD9FvaZY4XWM6P47CBCAxaHiWNURgE16oGNK52QHUYX1lZcEAPMwjoHoLY0pB4u3bcHKlwTEA7zGjVm54f14oqOkWR9qt/9SPq3BKVhV3GGZ7xRtMD6xp2yIvdZz1++EUs+b8LHxZIL8aZvorvOecXLvmTpsZfHp/rOiUe2VCjV3Fri2HIG7uRKubbEOu7zDXsSeX2lDetUpN5spe2m419+utPiKjgdxLLY3q8KD+wH9IigB78RTixcNu+U;25:qLLGqZ+kRx/BikE/ugAjDrQVn9asUobRuTkNrM6UTa50qDrNhnyPtIoYLXQwnlgoq9uHgIqL7ZZ/J5xopZUMHRG0+ZLNE7VkCngUv6rER//XDSc4Ru1IN3qfpRVvffT47E1jjRJAfCqdiXd5rbHoqxpAgg03Wn3HqFvhMB2KxOAb9hr2awL5TKtrEpHVna/o4nUy/Jl69jxbSj9Hph6TUN0sSudzSPQ/UgYBtv/3XiSFKO6PBN7ApP3bAiIvgQ85KYBYOzQSXKoSb1Hi43hZ3SwT/eSmCSwKW3mAImaDO805zF4zNQe5Hz+so3xDohs09Y6ieePHgJY1ayOOrBSsFQ==;31:wOSc0wv95mBmeWt+tQHojEUb8CDpBobFc/USoMRg0YZ3vejuYJkmiA6Dp0vW0AIUmJXX6BJP0n91mpfPGJhf/WzuiVaajtpQTSv2oIKmFGk6W/if4GH7eIuxsG4IHbceTZk7xFumaNYd/gsWdIBVZQg1wPohgxOzf91NuJt3pp7GXSw67jl69ask1Aq80+Bt+1LfXmuTnXMNu0mXhjeJIgk8mantNYNO9yVAbafDk1k= X-MS-TrafficTypeDiagnostic: BN6PR07MB2993: X-Microsoft-Exchange-Diagnostics: 1;BN6PR07MB2993;20:rxPx42UxJsQEEOBEWgKizaB+Vyc+ggr1UO6FqNlk5Mt3RnegIRmHSvB3o1Pqn/Dd4HIHhUqUw6WrxvjagY29i2rUvVIq99NIgo9nJtfzyBqh3slNHeQ0gTcgyCF3a3jETkU87pkz0xBwA9TKTWddSIu1LD9Or10KsbyRdo7mZU4KICnhAwlOozUmI1s608okGTKU6u1S/mmOyFELBI68Nb6yxN+GpxytirX/2Rf6xB3xUR/hc15RRpqYfO5e0vToAJ77ZkLhm2M6iGvRlHjH0LIdrfF43hzvLz558G4qFaPiCtL7dMjJSoVj/IEQfLgh7870/spuYTlBDFxEBfm3Vzh5uokCFw0G4OF1XzZDGmtfdtABHaOOj7xneB3j4zVdetal1PdFf06RQUj9My9oqy42/xt0oPPETVeDRehk6bMIqY+wN+8F9HJx5jlMwg+3n0BpBrXDBdWL/h5NtqcmiOJcjMrmyrViVBVW1hvb2ALzrCV/IE2FQH0wuHSyhfAZyKQWYOYGd3PKgMxq7LpEVOvi7G+gosg1aOJQc6ct5V0cD3S7e7cGbVBq8+Nhof5RRumqX3eG1RVJGpYagbtRJSkUl9hCzUaa52d9T6TNYBA=;4:LCNRGS0+SmkMzSMClGcyDVjt7xz13RXNV0WDW5ljTXpaIWFVX1lXO3nJiKoiJ599miRlPIcRaXkrrM+jSFLZaO9eKfHoFz5W5qi1C7LRl3AbDwiJ8YDuoykoMX6XqYf1S0+Q9vTpUhLQy1spOfMBgAAMvAL0bPMMrx9O5yZmwcBs4WMobMyI03jn72NDmkr7EeEzeEbsjGzccs4BwVhSBBkfD/Zi7cuyISU3TLGIRQc4GVrTcKMhdz203hQeJ04pauvRfJ23y9hn1Ivo5ELPjhrHa7ho6fGsjLVEiX77bJdiM3ywQgkltcL1s7wB5LeV X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(277106579953875); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501327)(52105095)(10201501046)(93006095)(3002001)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:BN6PR07MB2993;BCL:0;PCL:0;RULEID:;SRVR:BN6PR07MB2993; X-Forefront-PRVS: 0634F37BFF X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(39860400002)(39380400002)(376002)(396003)(366004)(346002)(189003)(199004)(25786009)(68736007)(8676002)(42882007)(47776003)(72206003)(81156014)(5660300001)(106356001)(7696005)(9686003)(61506002)(4326008)(107886003)(305945005)(7736002)(53936002)(105586002)(52116002)(6666003)(81166006)(3846002)(6916009)(186003)(16526019)(33896004)(8936002)(58126008)(66066001)(26005)(2906002)(23726003)(6246003)(97736004)(39060400002)(55016002)(50466002)(1076002)(6116002)(446003)(33656002)(956004)(478600001)(476003)(6506007)(486006)(229853002)(386003)(16586007)(316002)(11346002)(76176011)(18370500001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR07MB2993;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN6PR07MB2993;23:TU0z0lsy4UI4NY/hwOij2mB1aiKRxuYfV3cNlC6Tj?= =?us-ascii?Q?7eSeeSzmTdfGtKWlN3MAV5BouyrLMRkyNOl9B2pWdc3y1R2SU10N8ql9AGHq?= =?us-ascii?Q?Yw7c3KJrOn3107DD63ISsaBiV27dsPYSKgT01DXVSRUNJpO4FLHf0DEJdzsB?= =?us-ascii?Q?2ksrrhL8BJGIjnISkAv1KHeo7u5C6tDa/EdYH/65Q7vbZXlokTRmcRrAaxjC?= =?us-ascii?Q?BmNavgPsM2MPLGTDpFpuCK9A6LpIwLaYJeiSc/AAZMIJXdLIh2TlDGPSN3FT?= =?us-ascii?Q?y7RuPfhtjbSo5WM3aCEIcThKu6X2rUhPJ5wAmAoKVKUMeHTVushh4CCMMBJ+?= =?us-ascii?Q?HUaXOtDTDv1qEdDoSHPWuKR6VwWmnCqHigiIug1e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24:SqLDb2WF/Un20tq9jDAYsWciqSF7J4t12Pcw3I1bAuL6nYL0/fOJ4nJYWA4RweMQqGo0AuhuKD7l8a1CwEwavJGlbxgPZI0PJIoxgKOyP8M= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN6PR07MB2993;7:zX7mfQ/ju7L0XOKdwmqlU72BvasDUTFZQ1mGTljHfj6tkP7uyR3iJieom4vKkObLOUJJ36Z6zlmGcjkQn70SwK6TeeklYpU9nu1RYTDtibSP0oQEKHM8kbi41foUxS4IQ9cn5Rnf5ysSI7nUFzqSjbRXcUMw0I8uNzEZ62IlYRNQNLGg32OhkH+nVKCV2IfworZdaF2UJlKaVcQ47buKU/KXZmzdqORYpDF4d7bJrVK79wZZZZns5E61ZGb3OdWb X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2018 15:14:31.1023 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 884f6c47-ac61-4524-4d1e-08d59bd119c9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB2993 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 06, 2018 at 11:06:03AM -0400, David Miller wrote: > From: Vadim Lomovtsev > Date: Fri, 6 Apr 2018 04:14:25 -0700 > > > diff --git a/drivers/net/ethernet/cavium/thunder/nic.h b/drivers/net/ethernet/cavium/thunder/nic.h > > index 5fc46c5a4f36..448d1fafc827 100644 > > --- a/drivers/net/ethernet/cavium/thunder/nic.h > > +++ b/drivers/net/ethernet/cavium/thunder/nic.h > > @@ -265,14 +265,9 @@ struct nicvf_drv_stats { > > > > struct cavium_ptp; > > > > -struct xcast_addr { > > - struct list_head list; > > - u64 addr; > > -}; > > - > > struct xcast_addr_list { > > - struct list_head list; > > int count; > > + u64 mc[]; > > }; > > > > struct nicvf_work { > > diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c > > index 1e9a31fef729..a26d8bc92e01 100644 > > --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c > > +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c > > @@ -1929,7 +1929,7 @@ static void nicvf_set_rx_mode_task(struct work_struct *work_arg) > > work.work); > > struct nicvf *nic = container_of(vf_work, struct nicvf, rx_mode_work); > > union nic_mbx mbx = {}; > > - struct xcast_addr *xaddr, *next; > > + u8 idx = 0; > ^^^^^^^^^^^ > > > > > if (!vf_work) > > return; > > @@ -1956,16 +1956,10 @@ static void nicvf_set_rx_mode_task(struct work_struct *work_arg) > > /* check if we have any specific MACs to be added to PF DMAC filter */ > > if (vf_work->mc) { > > /* now go through kernel list of MACs and add them one by one */ > > - list_for_each_entry_safe(xaddr, next, > > - &vf_work->mc->list, list) { > > + for (idx = 0; idx < vf_work->mc->count; idx++) { > > vf_work->mx->count is an 'int' therefore 'idx' should be declared 'int' as well, > not a 'u8'. My bad, sorry. Will post v4 shortly then. WBR, Vadim