Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2546634imm; Thu, 18 Oct 2018 17:05:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV60BqDcySwXfIbVj5tXlHKH6O2+PnYoZ4D4bJAJjwdchuyPaYRg0DtwtmE/IG7p0nvx06NiW X-Received: by 2002:a63:9858:: with SMTP id l24-v6mr3022400pgo.162.1539907521683; Thu, 18 Oct 2018 17:05:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539907521; cv=none; d=google.com; s=arc-20160816; b=Gv/Tl6Q1rBD4PEEGjhRgYcT5QS+EsDPVL0mmt+E21BCW2eQ/uQFNF325fLw+8gBmS7 fyUf6AIc35QzF6GeXsSDafUiLiIJd80kNDyNHD3v8rdHcw0jJdDVUfQanEnRN3s5UCmP RiMd5RsSJG1rko2SDnNa+BpnFYG3EZ1LMj+Xpr+HmU4Ga3Ntx7gA3Gsk4j8Qmf1brqX8 Xjem5hwbctb+AEDGSqm/dG5OmxqVk+q85YwQwPBRr1CyzOBUG6BJMMw4wIgn/9S9cRzY AI9RXZJ2FMGZdUfnvuVapYJT6sY8MkwiX6drfeO3fUR1ZwKslOR3CITJYdJHCm3SlUpf s06A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Ruqe+B1vAznCC0xwwYKAl+PIR+bzmI5hWbkrVzVav9o=; b=xw/BZMwyUVf4nQhrtnrcm6XiST3Zzj723kf0nwj2+5tv++AtQkMnTbSXRaVogKwoX+ rxaiQMdeAP2jYogRooU4tYvnkmwRqgwP9adBjDhq46zxsQ1G80pyPm9W6kCud4m/oQVj bLhxoywZzY78FVal9+Lb4cMHJKeZcXu11QiY2GBj1oNVwvL+lKCCUi4vNTeuIv7g19Gp YeUapilgrim+8aq75bpKgjM/gNJtUnGAvRGK1q22WQJ2l/QiZBdCdQqIGsLFb9tCTD8f WkEep3EkGwO1X3vMuogXnHqT3vAloQ/ptHIaDzgfbxrIuGUUxzHnQ+ufJXzvPWNFH+G9 lL2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=h4nXrawH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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. [209.132.180.67]) by mx.google.com with ESMTP id z6-v6si21836005pln.287.2018.10.18.17.05.05; Thu, 18 Oct 2018 17:05:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=h4nXrawH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727213AbeJSIGf (ORCPT + 99 others); Fri, 19 Oct 2018 04:06:35 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:39040 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbeJSIGe (ORCPT ); Fri, 19 Oct 2018 04:06:34 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id w9J036CI037228; Thu, 18 Oct 2018 19:03:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1539907386; bh=Ruqe+B1vAznCC0xwwYKAl+PIR+bzmI5hWbkrVzVav9o=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=h4nXrawHZm7iyR1AswOxC7rDZ82uc4a7KYlVOK84jnIhGAGpLHNphcPOs6MLiEaSl gLCnKIZGwfIEIVZQewXaQ491/8o8KNj4T1WRhTyomL8woEaRWiD2x2ZoQDJbxMQqYp 1W20csxITRDKuqEjeWNzsd862W11KYsnuNbYqT/U= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w9J036xT020225; Thu, 18 Oct 2018 19:03:06 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) 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.1466.3; Thu, 18 Oct 2018 19:03:06 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Thu, 18 Oct 2018 19:03:06 -0500 Received: from [128.247.59.147] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w9J036Y4021239; Thu, 18 Oct 2018 19:03:06 -0500 Subject: Re: [PATCH net-next] net: ethernet: ti: cpsw: don't flush mcast entries while switch promisc mode To: Ivan Khoronzhuk , CC: , , References: <20181018180006.7065-1-ivan.khoronzhuk@linaro.org> From: Grygorii Strashko Message-ID: <6c34a3ce-dbee-538e-bda7-8dd485315267@ti.com> Date: Thu, 18 Oct 2018 19:03:06 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181018180006.7065-1-ivan.khoronzhuk@linaro.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/18/18 1:00 PM, Ivan Khoronzhuk wrote: > No need now to flush mcast entries in switch mode while toggling to > promiscuous mode. It's not needed as vlan reg_mcast = ALL_PORTS > and mcast/vlan ports = ALL_PORTS, the same happening for vlan > unreg_mcast, it's set to ALL_PORT_MASK just after calling promisc > mode routine by calling set allmulti. I suppose main reason to flush > them is to use unreg_mcast to receive all to host port. Thus, now, all > mcast packets are received anyway and no reason to flush mcast entries > unsafely, as they were synced with __dev_mc_sync() previously and are > not restored. Another way is to _dev_mc_unsync() them, but no need. User have possibility to add additional mcast entries or edit existing in switch-mode, which is now done using custom tool. So, Host in promisc mode will not receive packets for mcast address X if port mask for this addr set to (ALL_PORTS - HOST_PORT). Am I missing smth? > > Signed-off-by: Ivan Khoronzhuk > --- > > Based on net-next/master > Tasted on am572x EVM and BBB > > drivers/net/ethernet/ti/cpsw.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c > index 226be2a56c1f..0e475020a674 100644 > --- a/drivers/net/ethernet/ti/cpsw.c > +++ b/drivers/net/ethernet/ti/cpsw.c > @@ -638,9 +638,6 @@ static void cpsw_set_promiscious(struct net_device *ndev, bool enable) > } while (time_after(timeout, jiffies)); > cpsw_ale_control_set(ale, 0, ALE_AGEOUT, 1); > > - /* Clear all mcast from ALE */ > - cpsw_ale_flush_multicast(ale, ALE_ALL_PORTS, -1); > - > /* Flood All Unicast Packets to Host port */ > cpsw_ale_control_set(ale, 0, ALE_P0_UNI_FLOOD, 1); > dev_dbg(&ndev->dev, "promiscuity enabled\n"); > -- regards, -grygorii