Received: by 10.213.65.68 with SMTP id h4csp743490imn; Fri, 6 Apr 2018 08:10:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+oVijnKNnEaNhNJApKa2VjoUSPfZ+uA++ehHrcfCeXOtUwodvuM8HWzp8uMBwC9a8xNOim X-Received: by 2002:a17:902:8c83:: with SMTP id t3-v6mr27959929plo.391.1523027417880; Fri, 06 Apr 2018 08:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523027417; cv=none; d=google.com; s=arc-20160816; b=o27fk5ujR+z0NU4hU4D78zxzdG1kLgakVOL/Dk05I/5KaMfBzCCxNDPdCk9UErjllZ GD68riKuKJk77DSl4LGAEGO4VtjgP564L25ID1sJ4Ntgh4h9e7F7JHDpRAkSHkX1bAYy TJauYxvrdHtSjWbWF3IcDJBhxaFCWSVdYvii1paD4lIycENzCrwIOZUMMnbD5XnRVkl7 tyDOyCrSpK4Ut5kelthMCAvS4j6tczWF5FVhMUAGWdexQ0qJeGXzshHYDfzd3eJYayos oLrc6C02NU8I1HbcI5oZcK+Jd//O51DFt2bX7uUR+VcMoN1zPagwQT0NMuyuXujswJv5 L2+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=Lh5rDgZWpE0IyEaTlXDKUe/854/huPuQttRb2PymwX0=; b=bCx2wasEY/Z/M5/rlbo6pnnlpugBAaOdDCVGNcXJYG6N3WWaX4yTWaAeNFMXsgNW5P +OEGIvMYGbWqMw0qDIuUel1R4oZx1JZQ+TEgFVE9L+zyjKnH3ilytOfbBYD9AelBFbZz zS2GYtNOMf/0CCYfknAqlpfaAnZhdPsd5YFfnObyRFqVXRaQv1H8RQoFw+Zu+mA29l5u rHTm+9nsmNAxikYnu05rWnwNVx6i5eQ88rZ90S84mXT7MBRw7TOI7r2rVqElt3IRbhjt nxlwXKJ5R23uPChZ1rnwUbJg7kvkISA02mO4QQ6SygAK0KbhDWlz22jyunb/YAeu1KIL Dbaw== ARC-Authentication-Results: i=1; mx.google.com; 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 z131si7423517pgz.184.2018.04.06.08.09.33; Fri, 06 Apr 2018 08:10:17 -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; 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 S1754879AbeDFPGJ (ORCPT + 99 others); Fri, 6 Apr 2018 11:06:09 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:43304 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754754AbeDFPGH (ORCPT ); Fri, 6 Apr 2018 11:06:07 -0400 Received: from localhost (67.110.78.66.ptr.us.xo.net [67.110.78.66]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 2394E13D174B1; Fri, 6 Apr 2018 08:06:06 -0700 (PDT) Date: Fri, 06 Apr 2018 11:06:03 -0400 (EDT) Message-Id: <20180406.110603.978796669734920248.davem@davemloft.net> To: Vadim.Lomovtsev@caviumnetworks.com 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 From: David Miller In-Reply-To: <20180406111425.14636-1-Vadim.Lomovtsev@caviumnetworks.com> References: <20180405145756.12633-1-Vadim.Lomovtsev@caviumnetworks.com> <20180406111425.14636-1-Vadim.Lomovtsev@caviumnetworks.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 06 Apr 2018 08:06:06 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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'.