From patchwork Thu Jan 14 00:51:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joshua Hay X-Patchwork-Id: 567214 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 75E61140662 for ; Thu, 14 Jan 2016 11:52:03 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C66E8A5952; Thu, 14 Jan 2016 00:52:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XHEgCNlhsWne; Thu, 14 Jan 2016 00:52:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id E6A26A593F; Thu, 14 Jan 2016 00:52:00 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id D0C5D1C0F4A for ; Thu, 14 Jan 2016 00:51:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CCD468A7BC for ; Thu, 14 Jan 2016 00:51:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I93jRlwDu-cE for ; Thu, 14 Jan 2016 00:51:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by hemlock.osuosl.org (Postfix) with ESMTP id 096128AEBE for ; Thu, 14 Jan 2016 00:51:53 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 13 Jan 2016 16:51:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,291,1449561600"; d="scan'208";a="890056918" Received: from jahay1-mobl2.amr.corp.intel.com (HELO localhost.localdomain.localdomain) ([134.134.176.160]) by orsmga002.jf.intel.com with ESMTP; 13 Jan 2016 16:51:52 -0800 From: Joshua Hay To: intel-wired-lan@lists.osuosl.org Date: Wed, 13 Jan 2016 16:51:40 -0800 Message-Id: <1452732712-12248-4-git-send-email-joshua.a.hay@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1452732712-12248-1-git-send-email-joshua.a.hay@intel.com> References: <1452732712-12248-1-git-send-email-joshua.a.hay@intel.com> Subject: [Intel-wired-lan] [v2 next PATCH S27 03/15] i40e: set shared bit for multicast filters X-BeenThere: intel-wired-lan@lists.osuosl.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@lists.osuosl.org Sender: "Intel-wired-lan" From: Shannon Nelson Add the use of the new Shared MAC filter bit for multicast and broadcast filters in order to make better use of the filters available from the device. The FW folks have assured me that setting this bit on older FW will have no affect, so we don't need a version check. Also fixed a stray indent problem nearby. Also update copyright year. Signed-off-by: Shannon Nelson Change-ID: I4c5826a32594382a7937a592a24d228588cee7aa Tested-by: Andrew Bowers --- Testing Hints (required if no HSD): Disable link polling: ethtool --set-priv-flags p261p1 LinkPolling off Eanble AQ debug: ethtool -s p261p1 msglvl 0xff00000f Add a new vlan: ip link add link p261p1 name p261p1.v10 type vlan id 10 This will generate an add macvlan request and dump the trace in dmesg. Make sure that the value in byte 8 for multicast and broadcast addresses is '11' as shown here: 14594.033921] i40e 00.0 0x0010 FF FF FF FF FF FF 0A 00 11 00 00 00 00 00 00 00 and should be '01' for unicast address. If running on older firmware, e.g. FVL4, this byte will always be '01'. drivers/net/ethernet/intel/i40e/i40e_common.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c index dd9997b..e41c8af 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_common.c +++ b/drivers/net/ethernet/intel/i40e/i40e_common.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Intel Ethernet Controller XL710 Family Linux Driver - * Copyright(c) 2013 - 2015 Intel Corporation. + * Copyright(c) 2013 - 2016 Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -2435,6 +2435,7 @@ i40e_status i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, (struct i40e_aqc_macvlan *)&desc.params.raw; i40e_status status; u16 buf_size; + int i; if (count == 0 || !mv_list || !hw) return I40E_ERR_PARAM; @@ -2448,12 +2449,17 @@ i40e_status i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, cmd->seid[1] = 0; cmd->seid[2] = 0; + for (i = 0; i < count; i++) + if (is_multicast_ether_addr(mv_list[i].mac_addr)) + mv_list[i].flags |= + cpu_to_le16(I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC); + desc.flags |= cpu_to_le16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD)); if (buf_size > I40E_AQ_LARGE_BUF) desc.flags |= cpu_to_le16((u16)I40E_AQ_FLAG_LB); status = i40e_asq_send_command(hw, &desc, mv_list, buf_size, - cmd_details); + cmd_details); return status; }