From patchwork Fri Aug 21 13:49:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 248121 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp368522ils; Fri, 21 Aug 2020 06:49:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3WshGxlsgKDac1yj9B6rvHHmpYBpkdQATnjk98h+7eYeZh1SHpEhvBh0a21VHTQk+f8Ns X-Received: by 2002:aa7:d48f:: with SMTP id b15mr2727358edr.21.1598017762961; Fri, 21 Aug 2020 06:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598017762; cv=none; d=google.com; s=arc-20160816; b=oQXyC65/jxSIjTVGNKXFB7VQV5eateppSlSQ5M2wmA/hQ9wdRrl/cXeCbDFfZw5AD0 IsgqPpaGMIfByAble1axSvhMqyP/gW70JYzlDbNLWWkJ6hRR8zhufT9XnemL/uYd0/VV d2/ToBIhM8qjpE2u2xqHpGX+z8bJB4p6VgQV7/pt3mIydlSlzUn1OJbjLNShYaHGgcxY PL478DdDgN+FXE9ux+J53AK7Xf6Zqy7jGYa7vjv8GANhijMsdLbVpn7u1pdAaorKYRYI y7181NhLR8VeQ4qLez9bflcwHKQb44gPYBVgUMlOxepRz4mmrXp0YvpmDwgZCu5WHo4J EmDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:to :from:dkim-signature; bh=ykGFwxHybdYeyIYRyYFOG7cBotylhW0+qN5JBcDCze8=; b=Mug/f2AHniO1qqFWoUluf3R4bqkrfhu8quOe65Du4wfzBMW9OjYw1mpH8VP9YTFwOJ I3NO2NzUSXPmpxTh84O54ukIMr+Ig+Q5W6h/UJILmR1FvHavCX3aoDBzc1jueXwiW/dW z1ltbz+CW9RRF/ysfpbXj/33WJFl+cPauw9uEV77Gb0PzTPXIf9+S9KG3LkkgHYqRGFN Ab7ZhlIM+YmOo7hyzpr99GnPLgtPmC7jksa6QVuEE8Wn7+d09qvMX/39+1TGKGIgtbSv L9LtVxwyrL6GE1WTTzjbIINs1IcS0Rrrg4Epomn8ekxYIhqylKwwfx6hFAFwQ1NasRWf aNWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=EKKVqkng; spf=pass (google.com: domain of linux-omap-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g12si1173721ejj.277.2020.08.21.06.49.22; Fri, 21 Aug 2020 06:49:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-omap-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=EKKVqkng; spf=pass (google.com: domain of linux-omap-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727925AbgHUNtV (ORCPT + 4 others); Fri, 21 Aug 2020 09:49:21 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:48026 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727929AbgHUNtT (ORCPT ); Fri, 21 Aug 2020 09:49:19 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 07LDnEiK126288; Fri, 21 Aug 2020 08:49:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1598017754; bh=ykGFwxHybdYeyIYRyYFOG7cBotylhW0+qN5JBcDCze8=; h=From:To:Subject:Date; b=EKKVqknglKKs4/WV0lh5k1NRNIfGqeSAcIzei+g++30LVFte17ssRwqbqZPyJHeuX zj19T0+23yPJPFDvRyVU+//cy/Zw63glNg3JwBM5olLFYKxAGUFMl9zgMV5TfxEKxi fwCl0u7T7KFyMgBVniDa79Ptd83VmW4u6cda0DXc= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 07LDnEFe098899; Fri, 21 Aug 2020 08:49:14 -0500 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 21 Aug 2020 08:49:14 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Fri, 21 Aug 2020 08:49:14 -0500 Received: from uda0868495.fios-router.home (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 07LDnC1C035260; Fri, 21 Aug 2020 08:49:13 -0500 From: Murali Karicheri To: , , , , , , Subject: [net v2 PATCH 1/2] net: ethernet: ti: cpsw: fix clean up of vlan mc entries for host port Date: Fri, 21 Aug 2020 09:49:11 -0400 Message-ID: <20200821134912.30008-1-m-karicheri2@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org To flush the vid + mc entries from ALE, which is required when a VLAN interface is removed, driver needs to call cpsw_ale_flush_multicast() with ALE_PORT_HOST for port mask as these entries are added only for host port. Without this, these entries remain in the ALE table even after removing the VLAN interface. cpsw_ale_flush_multicast() calls cpsw_ale_flush_mcast which expects a port mask to do the job. Signed-off-by: Murali Karicheri --- v2: Dropped 3/3 and re-sending as it need more work drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 9b17bbbe102f..4a65edc5a375 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -1116,7 +1116,7 @@ static int cpsw_ndo_vlan_rx_kill_vid(struct net_device *ndev, HOST_PORT_NUM, ALE_VLAN, vid); ret |= cpsw_ale_del_mcast(cpsw->ale, priv->ndev->broadcast, 0, ALE_VLAN, vid); - ret |= cpsw_ale_flush_multicast(cpsw->ale, 0, vid); + ret |= cpsw_ale_flush_multicast(cpsw->ale, ALE_PORT_HOST, vid); err: pm_runtime_put(cpsw->dev); return ret; From patchwork Fri Aug 21 13:49:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 248122 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp368529ils; Fri, 21 Aug 2020 06:49:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxika76ucxHesDxLaP0L//08hy0ECZh0sr+uSjxxLirGbjcs4fH4YhXYyQ7gbpP2Eau3V1 X-Received: by 2002:a17:906:a1d7:: with SMTP id bx23mr2914021ejb.273.1598017763606; Fri, 21 Aug 2020 06:49:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598017763; cv=none; d=google.com; s=arc-20160816; b=dzxlfOlrWbEZgupPPV+KRJonKo73KcA2RaMI+AMhjKxQdF9P5lv6LY9Bw+VlsOoIsG NxqWja55p/tYEO5RAjDeRtfZXzgbGIGPPYO7QXs8buAGG0eR3rOP9YzAzmZGRcX+rp4F /VQl/l/BPxgpvrgd4xNJOMwifJzKfe5MZ5btIp+uxN+PgcE5NjqUJHjcjS5gx1WNi7ob PAYI5EBZGXD6OHyEmkOceds/jbC3cKZlLAkaYL3laSlw+xahLhFGvJeqabu9RhaOskwa kNYLrbdv0sbM8bj7l6YAVRldUDtm/OFvq4tPQhDMatCsQSCK7BjoEJT/ZRjmRijGg8MN 1RDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=U1IbJLUcumtugOjZo1HlCDkgCIgGAvBcLRyw1XPkUAY=; b=jcLL13iYaM2QC4kASJAVXg9ZtYWM9IevbTWz54uA0dHCYGEHVATWPOOubywv3gjJYW 8jHqojgnePn3xjmjUGRWPLqpFbG1nasKs6HeJhxhzMcGqwxbgR2TexnganskZhCBZDPt VLusBnYRfbMh9CccjN+Gk7F12Xp0U8/S/0H4S2vogfTap3V+c1z6N+qXhf+GQKj+a+Z5 waTsphVY/cOJ1RBql9UQ7VBHpMPkAMsuI1IgCDm0Hp+pTEbAF4ajVuO4axZJuFjJdN88 lKhn0sudcwgAWMQcowvhu0KYDYgHhfpB1gWsC9lEO6DVzemZtYy2WMNBf+3k7txvuD61 YImA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=uCuf7Jss; spf=pass (google.com: domain of linux-omap-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g12si1173721ejj.277.2020.08.21.06.49.23; Fri, 21 Aug 2020 06:49:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-omap-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=uCuf7Jss; spf=pass (google.com: domain of linux-omap-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728780AbgHUNtW (ORCPT + 4 others); Fri, 21 Aug 2020 09:49:22 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:58258 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728633AbgHUNtU (ORCPT ); Fri, 21 Aug 2020 09:49:20 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 07LDnG0h044154; Fri, 21 Aug 2020 08:49:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1598017756; bh=U1IbJLUcumtugOjZo1HlCDkgCIgGAvBcLRyw1XPkUAY=; h=From:To:Subject:Date:In-Reply-To:References; b=uCuf7JsshVipcS1nGxll54DPKWIWcuaOnLJvb7aKXPd/nHfZtbSEuGYygrvbW79OS SAd+DSdNMMAoTETnECZY+vKjnl/gdv6CNRD3t06nX4d7o5MjNuddwKhccHwKHfpa20 rK7CcAELLcKJAvod5BJXh1ieGLAgc6HYMF8AUzRI= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 07LDnGMJ098946; Fri, 21 Aug 2020 08:49:16 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 21 Aug 2020 08:49:16 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Fri, 21 Aug 2020 08:49:15 -0500 Received: from uda0868495.fios-router.home (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 07LDnC1D035260; Fri, 21 Aug 2020 08:49:14 -0500 From: Murali Karicheri To: , , , , , , Subject: [net v2 PATCH 2/2] net: ethernet: ti: cpsw_new: fix clean up of vlan mc entries for host port Date: Fri, 21 Aug 2020 09:49:12 -0400 Message-ID: <20200821134912.30008-2-m-karicheri2@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200821134912.30008-1-m-karicheri2@ti.com> References: <20200821134912.30008-1-m-karicheri2@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org To flush the vid + mc entries from ALE, which is required when a VLAN interface is removed, driver needs to call cpsw_ale_flush_multicast() with ALE_PORT_HOST for port mask as these entries are added only for host port. Without this, these entries remain in the ALE table even after removing the VLAN interface. cpsw_ale_flush_multicast() calls cpsw_ale_flush_mcast which expects a port mask to do the job. Signed-off-by: Murali Karicheri --- v2: Dropped 3/3 and re-sending as it need more work drivers/net/ethernet/ti/cpsw_new.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/net/ethernet/ti/cpsw_new.c b/drivers/net/ethernet/ti/cpsw_new.c index 1247d35d42ef..8d0a2bc7128d 100644 --- a/drivers/net/ethernet/ti/cpsw_new.c +++ b/drivers/net/ethernet/ti/cpsw_new.c @@ -1044,7 +1044,7 @@ static int cpsw_ndo_vlan_rx_kill_vid(struct net_device *ndev, HOST_PORT_NUM, ALE_VLAN, vid); cpsw_ale_del_mcast(cpsw->ale, priv->ndev->broadcast, 0, ALE_VLAN, vid); - cpsw_ale_flush_multicast(cpsw->ale, 0, vid); + cpsw_ale_flush_multicast(cpsw->ale, ALE_PORT_HOST, vid); err: pm_runtime_put(cpsw->dev); return ret;