From patchwork Thu Aug 15 19:36:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13765102 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0ED09C3DA7F for ; Thu, 15 Aug 2024 19:37:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=JoT+PgcUjqGva36HBaNEdB+NyyP5wVwsRBkZBx54lXA=; b=nV4tG550ep3Yi99GnPCCl/5LPi OLRbH02bow+lOs1iuYuYkL/+HMU+W3Qt+XyfpFHTLybw4E9zXswTc51JpEJXd91JH3NpmkPKLfr35 aTyY33CYJNeqWvPUN+QTvl7k4xfLOE693hitaQe/4JvA03kc698ZEVE/w7zRqR7A4YaWp9nEMc98a ZibOXaz+gcPVYfHByaAX+ef5OQY6Q3V+yVegOZ0ukRaJV5phKT7uMT1cb21GIt3rO0DcQdDiSZHmM Hy2T528CdvAnUIXDKP+mlBFR7sJBc2TRWOXtGEcQCjjkKicH3sKvnw/GfTj47Csnr6RcstxXgydBE bEnI2ewQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1segHU-0000000AuEr-1VCc; Thu, 15 Aug 2024 19:37:08 +0000 Received: from out-172.mta0.migadu.com ([2001:41d0:1004:224b::ac]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1segGq-0000000Au50-0l38 for linux-arm-kernel@lists.infradead.org; Thu, 15 Aug 2024 19:36:29 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1723750584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=JoT+PgcUjqGva36HBaNEdB+NyyP5wVwsRBkZBx54lXA=; b=UOmGk4nLeXkCSC0+YXNVSfGMqlup6GLGnG7ToTNOBToTVd6mU11HJz4SM6Uio9OFmECAq6 wqoj7XP9iz9nKvQkcXlTGMkjRilsqm75jVcDuPu5s51P5ivCI9tD5Lx2i1xrMxklVPMIWB Kynlch9DHc+obH2SC2CQt4yHyqyXedk= From: Sean Anderson To: Radhey Shyam Pandey , netdev@vger.kernel.org Cc: "David S . Miller" , Andrew Lunn , linux-arm-kernel@lists.infradead.org, Michal Simek , Daniel Borkmann , linux-kernel@vger.kernel.org, Paolo Abeni , Jakub Kicinski , Eric Dumazet , Sean Anderson Subject: [PATCH net-next v2 0/5] net: xilinx: axienet: Multicast fixes and improvements Date: Thu, 15 Aug 2024 15:36:09 -0400 Message-Id: <20240815193614.4120810-1-sean.anderson@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240815_123628_379249_B191F365 X-CRM114-Status: GOOD ( 10.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series has a few small patches improving the handling of multicast addresses. In particular, it makes the driver a whole lot less spammy, and adjusts things so we aren't in promiscuous mode when we have more than four multicast addresses (a common occurance on modern systems). As the hardware has a 4-entry CAM, the ideal method would be to "pack" multiple addresses into one CAM entry. Something like: entry.address = address[0] | address[1]; entry.mask = ~(address[0] ^ address[1]); Which would make the entry match both addresses (along with some others that would need to be filtered in software). Mapping addresses to entries in an efficient way is a bit tricky. If anyone knows of an in-tree example of something like this, I'd be glad to hear about it. Changes in v2: - Split off IFF_PROMISC change from printing changes Sean Anderson (5): net: xilinx: axienet: Always disable promiscuous mode net: xilinx: axienet: Fix dangling multicast addresses net: xilinx: axienet: Don't print if we go into promiscuous mode net: xilinx: axienet: Don't set IFF_PROMISC in ndev->flags net: xilinx: axienet: Support IFF_ALLMULTI drivers/net/ethernet/xilinx/xilinx_axienet.h | 3 ++ .../net/ethernet/xilinx/xilinx_axienet_main.c | 52 +++++++++---------- 2 files changed, 29 insertions(+), 26 deletions(-)