From mboxrd@z Thu Jan 1 00:00:00 1970 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 46EC8C531DF for ; Tue, 20 Aug 2024 16:00:47 +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: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6jwRObCNPR0+g8uFj57IS8iZXnm2htkGxsa+HSGdNt8=; b=vqohn5F67NEiVjlhhrPITAR6nT 7QgYdSYhiy1ORnQhtnVxTo6cayYr+MkrRcNpPy1luUwR561+0nJFOnn4OOEpsPErFg3JFaPpgb36z +k1ftkTXjBrcij2Fss5HF6U6Jy93Po4P1C9HY5Asx+drHtBEooB2+T8+nvnABQ44u8tiziV8j2uT0 BhYw47Wkq1DMKhYedvcYPaACUv30FwAkpmChqp410M4zzAiKt9C97jLf3qpbsy1+1G2Hk8Mhb6QQd SRn05Dt7Wy8YzThZQJnfFhcOHvN3RsYowdaYxjhsGtKoRM9qiBZtU7LuT8/kDgPrMqAG6GZxj0DMH 2z5O7ffw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgRHf-00000005usB-44gj; Tue, 20 Aug 2024 16:00:36 +0000 Received: from out-183.mta0.migadu.com ([91.218.175.183]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgQ4x-00000005c9c-3Ylt for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2024 14:43:26 +0000 Message-ID: <6342f461-1b9b-4740-b261-384be1843f5a@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1724164999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6jwRObCNPR0+g8uFj57IS8iZXnm2htkGxsa+HSGdNt8=; b=d8/wpa3K2lHgNbAsWUaBeT8Iau2NvKKV/WObRES9unfA/tCEyzHQE1gRNDxkP128sL5NGZ pyBZ5r/1EEMs+Xpro2gVsU5Pr636KIlHCFcZlf2pMYo3l6NaCb59FLsf//6q63p2PflZBS 9DLqv01IyOQaeXMuIbw0Qplf0RBxXTU= Date: Tue, 20 Aug 2024 10:43:10 -0400 MIME-Version: 1.0 Subject: Re: [PATCH net-next v2 2/5] net: xilinx: axienet: Fix dangling multicast addresses To: Jakub Kicinski Cc: Radhey Shyam Pandey , netdev@vger.kernel.org, "David S . Miller" , Andrew Lunn , linux-arm-kernel@lists.infradead.org, Michal Simek , Daniel Borkmann , linux-kernel@vger.kernel.org, Paolo Abeni , Eric Dumazet , Simon Horman References: <20240815193614.4120810-1-sean.anderson@linux.dev> <20240815193614.4120810-3-sean.anderson@linux.dev> <20240819183302.26b7a352@kernel.org> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sean Anderson In-Reply-To: <20240819183302.26b7a352@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240820_074324_218798_4C45579C X-CRM114-Status: GOOD ( 15.84 ) 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 On 8/19/24 21:33, Jakub Kicinski wrote: > On Thu, 15 Aug 2024 15:36:11 -0400 Sean Anderson wrote: >> If a multicast address is removed but there are still some multicast >> addresses, that address would remain programmed into the frame filter. >> Fix this by explicitly setting the enable bit for each filter. >> >> Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver") >> Signed-off-by: Sean Anderson >> Reviewed-by: Simon Horman > > Again, I'd go for net. > >> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet.h b/drivers/net/ethernet/xilinx/xilinx_axienet.h >> index 0d5b300107e0..03fef656478e 100644 >> --- a/drivers/net/ethernet/xilinx/xilinx_axienet.h >> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet.h >> @@ -170,6 +170,7 @@ >> #define XAE_UAW0_OFFSET 0x00000700 /* Unicast address word 0 */ >> #define XAE_UAW1_OFFSET 0x00000704 /* Unicast address word 1 */ >> #define XAE_FMI_OFFSET 0x00000708 /* Filter Mask Index */ >> +#define XAE_FFE_OFFSET 0x0000070C /* Frame Filter Enable */ >> #define XAE_AF0_OFFSET 0x00000710 /* Address Filter 0 */ >> #define XAE_AF1_OFFSET 0x00000714 /* Address Filter 1 */ > > There is a conflict with current net / net-next here, because of > 9ff2f816e2aa65ca9, you'll need to rebase / repost (which is why > I'm allowing myself the nit picks ;)) > >> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c >> index e664611c29cf..1bcabb016ca9 100644 >> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c >> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c >> @@ -433,7 +433,7 @@ static int netdev_set_mac_address(struct net_device *ndev, void *p) >> */ >> static void axienet_set_multicast_list(struct net_device *ndev) >> { >> - int i; >> + int i = 0; > > Consider renaming i to addr_cnt ? or addr_num ? Well, this doesn't really have anything to do with addresses. It selects the "Filter Index" (as named by the datasheet) so I'd rename it `filter` if anything. This hardware is actually really unusual since the CAM acts on the entire first 64 bytes of the packet. So you could theoretically filter for the source address too, but I don't know why you'd want to since all you can do is drop the packet. Seems like a big waste of resources to me. --Sean