From patchwork Thu Aug 22 15:40:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13773891 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 5F38AC3DA4A for ; Thu, 22 Aug 2024 15:56:44 +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=XI4XnHT5RMcYeA48dmo9vsAxVDbAfZYCg3p2vNi9cpc=; b=G7KYUk+JkKovukAISer2eie3FR 01beRzuSqr3n8oEVORTw6QT9aHG9FqRjFnpMErRkqZuAprvIJYNKAQlU/dlbgfLQWVK1iRNvx7a+F KjFUARWaGlXDQDnRfIB9kFNXyOzTifxYI/UovjhTrbU0KQgP+KLjPVTu7UjIzhfHfZbUViSDubb5l aKchqvhTabgu8wvpg5YnAJ8xEcD1CRSsuTCP1P2G0YKcPiWEY9IbOiworRmBcY2mjPPiGeqRwJ0If S31Tgl0xIHQcHdjOxldsR90QHLievLMJIsKj550b7Y9I9Rbrx2PelP5lYug4OfgK8nQtFHK2BYC1h Iha6WMqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shAAr-0000000DT88-3Fap; Thu, 22 Aug 2024 15:56:33 +0000 Received: from out-180.mta0.migadu.com ([2001:41d0:1004:224b::b4]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9wD-0000000DNJU-3H3W for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:41:27 +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=1724341279; 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=XI4XnHT5RMcYeA48dmo9vsAxVDbAfZYCg3p2vNi9cpc=; b=ONInmjlyZsHrB/eQ9bGTisiwVlZSTsn2mFrvq/KoG/H86lHV0Yy+0NtFH+lPtCbneZ/Kur Tf6BHjmYJAnYiv2SjiYoalajvlXdHYJ/E103XxU/sA/CKV0FQ4tdzGmD4UOPRZZ8i11niu IHQzCiB3SWOvXJIIPcq1kgKMO1eRO3U= From: Sean Anderson To: Radhey Shyam Pandey , netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Eric Dumazet , Michal Simek , Andrew Lunn , Daniel Borkmann , "David S . Miller" , Jakub Kicinski , linux-kernel@vger.kernel.org, Paolo Abeni , Sean Anderson Subject: [PATCH net-next v3 0/5] net: xilinx: axienet: Multicast fixes and improvements Date: Thu, 22 Aug 2024 11:40:54 -0400 Message-Id: <20240822154059.1066595-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-20240822_084126_190085_A1A754A5 X-CRM114-Status: UNSURE ( 9.72 ) X-CRM114-Notice: Please train this message. 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 v3: - Rebase onto net-next/main 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(-)