From patchwork Wed Mar 18 23:00:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Guedes X-Patchwork-Id: 1257842 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48jQXl4Nhkz9sPk for ; Thu, 19 Mar 2020 10:02:14 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7942D87CB9; Wed, 18 Mar 2020 23:02:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N-o9tdurFD4y; Wed, 18 Mar 2020 23:02:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 22C8E87CAE; Wed, 18 Mar 2020 23:02:10 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 709AB1BF335 for ; Wed, 18 Mar 2020 23:02:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6ACD986610 for ; Wed, 18 Mar 2020 23:02:08 +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 paOIH2jwKcSX for ; Wed, 18 Mar 2020 23:02:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 72ECF86640 for ; Wed, 18 Mar 2020 23:02:07 +0000 (UTC) IronPort-SDR: WDfBrXOlM8+ePPzFJFy/6B6BCm7+dS3OE7Ale73TjYbmBa6JPhGRI626rYiVXGElArFbxku4o6 /ZD+lQt+GdAA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2020 16:02:06 -0700 IronPort-SDR: rcnlUq385RfG5s4zthsWztoVB8nHBBfh39sX8+h5JUGoLDJQHwRdIAx7RwluA8RJZOx21U8nAU qpBHlfDXcUEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,569,1574150400"; d="scan'208";a="248341769" Received: from ymtomada-mobl.amr.corp.intel.com ([10.251.21.179]) by orsmga006.jf.intel.com with ESMTP; 18 Mar 2020 16:02:06 -0700 From: Andre Guedes To: intel-wired-lan@lists.osuosl.org Date: Wed, 18 Mar 2020 16:00:52 -0700 Message-Id: <20200318230102.36952-3-andre.guedes@intel.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200318230102.36952-1-andre.guedes@intel.com> References: <20200318230102.36952-1-andre.guedes@intel.com> MIME-Version: 1.0 Subject: [Intel-wired-lan] [PATCH 02/12] igc: Check unsupported flag in igc_add_mac_filter() X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" The IGC_MAC_STATE_SRC_ADDR flags is not supported by igc_add_mac_ filter() so this patch adds a check for it and returns -ENOTSUPP in case it is set. Signed-off-by: Andre Guedes Tested-by: Aaron Brown --- drivers/net/ethernet/intel/igc/igc_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index 107e9f86bd0a..5360d73d9c63 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -2201,6 +2201,8 @@ static int igc_add_mac_filter(struct igc_adapter *adapter, const u8 *addr, if (is_zero_ether_addr(addr)) return -EINVAL; + if (flags & IGC_MAC_STATE_SRC_ADDR) + return -ENOTSUPP; /* Search for the first empty entry in the MAC table. * Do not touch entries at the end of the table reserved for the VF MAC