Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp158007lqo; Thu, 16 May 2024 02:19:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUUlWgMYFNBYC3Kvr0YfykVs8x//rSPcHST9h1Rjsp4yMzBeRtex18P+rbfF36xLFvluD/JzMXWqPlHJ5Q8KQZdsdE8qK8Dqesqe56VVg== X-Google-Smtp-Source: AGHT+IF0jN89yRUUoestJkpqK7iLAc5oe1SKiZtwWM4JfT86+DCtzdtkS4b3YasXhNqIu6hAiTkX X-Received: by 2002:a05:6870:9d13:b0:23e:7432:6f1c with SMTP id 586e51a60fabf-24172a4e5a0mr20171850fac.18.1715851150169; Thu, 16 May 2024 02:19:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715851150; cv=pass; d=google.com; s=arc-20160816; b=mspespOMHRF8wt440u2ENQ/SPk3yHthFRpvrxkpjbWTcmxDHuDCQwAi1YoWe19lDwz Xe6GDDg6Hd/9u3Vn/ZgaB1P38SOKd/LItJVWnhqE6f0nyYEGTGhb4ZL/4jGSKeYVzJ3r B8llqVtAllpdrJ+WG8eC4m/7fVgdgxfr9DFzj372v26UVw8dj0L73DkBh8BuodInm6HM t+kAAruao7+NjtTOg9vP5jvrL+9t1eokkBx+ta17xVacGBOQ+kPF41uIB424NLO8eZRU CfoaWfY2u354kQY2l+N/K6Hsbs6MTV5HHBFad64cxtyiJyCpzVn0/0ePL1+zqD+5s0rn Fgig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=KvNnbS9FRbuAHdlS0fq7GDILSQs+EwKSdndASTjueQM=; fh=MXXNzaqHjTjNVq4+rxImTL0aVKZEE8XClN4Txkr4nug=; b=hfz5vVPGVaFgBPV3HDW9rD5FZa2Xa+EoQmGMstBYa5aS/kFuZKyfyI8XUwDN711GPG x5/OhHPH/Kdna07F3jf1kZQIv0sP4wHVKj6IY+DXvjGUtRys20W4dNm13FAHsZRfS3TV xEo7dSaLhS+oeeKZC6Q6CPc1jHsZ2T/JXkILaegjSm3AK1o1uGKtvjrY8AI+XTXsmFcT jcRbd/NLBlgWt0LVkFM+4k78Ud5dXaA7LBmnO0DZ6GFdtwvDJhu5Kkk2g7YNGZSFmeyk 5SfQEK133hw1//q8OWElSmlCEd2VJKuexeIs7fCPBTN8tjU/sKKZ9IKcuZqvnJFfkZt2 WjmA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kkZSSwwt; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-180826-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180826-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-656d8f0b029si2253791a12.824.2024.05.16.02.19.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 02:19:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180826-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kkZSSwwt; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-180826-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180826-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C1890284104 for ; Thu, 16 May 2024 09:19:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E59514389B; Thu, 16 May 2024 09:18:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="kkZSSwwt" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CAEE0143883; Thu, 16 May 2024 09:18:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715851115; cv=none; b=jIMMpKx8+wd9Iz6+lDFgdO7mSWzzId5rxuHdepfjHo4G7qJnuejG+9W2lhD3woNRer8YRhgoyhkk8C2ZMr+BebhGXyBdYbBfCevs/LA9j99Qg713l6V04GfTZSJTnsH7V+L8LEy1YspQqHp01U2jRAFA9rxHYnHYVRft1h8ExrA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715851115; c=relaxed/simple; bh=+xmkqYSCYHnosn2TGgTyqw4XPyycmmx3R2w24+K14dk=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=t+rO3WwJzYmQxbCdb8kw0TMuvXvunHpd2ejAaMCtHdQGl7eiEFJ8osqKs56jYhVVRuSVPrD4BMufLBMCeTJsu5pPx2CRp+axrpZrx+vEdXXLm/Orac2V5ViA0ioMDOqlpAnQ9bR//oCKQ73DIoY+KS3niIKtxKP4u/QoLr+eaHA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=kkZSSwwt; arc=none smtp.client-ip=198.47.23.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44G9HtNP127035; Thu, 16 May 2024 04:17:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1715851075; bh=KvNnbS9FRbuAHdlS0fq7GDILSQs+EwKSdndASTjueQM=; h=From:To:CC:Subject:Date; b=kkZSSwwtywvvbc689n9Qj+qgt7x/uds36UIbSKK02826imNuELS6FCwrwQUUXymL9 IZsF0OO5j68KQT6TBm6PBqQSZcI3r4+BIN5mzyiH6E1m962z8AwW4lFjfAnmZyJg6M 9S2xRhYUlTR0U/uolyc9p+rbOGtMfedtmmWlPnEw= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44G9HtW9009651 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 16 May 2024 04:17:55 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 16 May 2024 04:17:54 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 16 May 2024 04:17:54 -0500 Received: from lelv0854.itg.ti.com (lelv0854.itg.ti.com [10.181.64.140]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44G9HsBY030491; Thu, 16 May 2024 04:17:54 -0500 Received: from localhost (danish-tpc.dhcp.ti.com [10.24.69.25]) by lelv0854.itg.ti.com (8.14.7/8.14.7) with ESMTP id 44G9Hrk3027556; Thu, 16 May 2024 04:17:54 -0500 From: MD Danish Anwar To: Dan Carpenter , Diogo Ivo , Jan Kiszka , Andrew Lunn , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" CC: , , , , Vignesh Raghavendra , , Roger Quadros , MD Danish Anwar Subject: [RFC PATCH net-next 0/2] Add multicast filtering support for ICSSG driver Date: Thu, 16 May 2024 14:47:50 +0530 Message-ID: <20240516091752.2969092-1-danishanwar@ti.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 This series add multicast filtering support for ICSSG driver. The patch 1/2 of the series introduces helper APIs needed to configure FDB tables maintained by firmware. Patch 2/2 introduces the support for multicast filtering. The driver will keep a copy of multicast addresses in emac->mcast_list. This list will be kept in sync with the netdev list and to add / del multicast address icssg_prueth_mac_add_mcast / icssg_prueth_mac_del_mcast APIs will be called. To add a mac_address for a port, driver need to call icssg_fdb_add_del() and pass the mac_address and BIT(port_id) to the API. The ICSSG firmware will then configure the rules and allow filtering. If a mac_address is added to port0 and the same mac_address needs to be added for port1, driver needs to pass BIT(port0) | BIT(port1) to the icssg_fdb_add_del() API. If driver just pass BIT(port1) then the entry for port0 will be overwritten / lost. This is a design constraint on the firmware side. To overcome this in the driver, to add any mac_address for let's say portX driver first checks if the same mac_address is already added for any other port. If yes driver calls icssg_fdb_add_del() with BIT(portX) | BIT(other_existing_port). If not, driver calls icssg_fdb_add_del() with BIT(portX). The same thing is applicable for deleting mac_addresses as well. This logic is in icssg_prueth_mac_add_mcast / icssg_prueth_mac_del_mcast APIs. MD Danish Anwar (2): net: ti: icssg-prueth: Add helper functions to configure FDB net: ti: icssg-prueth: Add multicast filtering support drivers/net/ethernet/ti/icssg/icssg_config.c | 186 ++++++++++++++++++- drivers/net/ethernet/ti/icssg/icssg_config.h | 19 ++ drivers/net/ethernet/ti/icssg/icssg_prueth.c | 50 ++++- drivers/net/ethernet/ti/icssg/icssg_prueth.h | 15 ++ 4 files changed, 263 insertions(+), 7 deletions(-) base-commit: 654de42f3fc6edc29d743c1dbcd1424f7793f63d -- 2.34.1