Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4750583imm; Mon, 15 Oct 2018 22:24:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV61Gdp2kwskqp4lpADdUwfGmb8b22a4pueY3oP9XhvfRtSQmY+vAm32BcVb9T39NrTfyU1Oo X-Received: by 2002:a17:902:5993:: with SMTP id p19-v6mr19943012pli.260.1539667488690; Mon, 15 Oct 2018 22:24:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539667488; cv=none; d=google.com; s=arc-20160816; b=mZ2uMggIa4tz9mnYFtLvljP8i0hoX3wV0xAIxCXj6daSZc35Jv4oTnfXUawuCOSKNm wHqPnwDFE4s7j/X5+F8b2ED+dMYDEeW8Hc4MRFlF2C2ViiRIYkc8PSdD1ZRXbRHyGKRb xaAOpok1JMBAXlnggS5hLVu5DmkmAeSHxirRiLjVrAnsi5QwILGt+VGdoRuBQA7J59HS TyBvZIOyNFTJ/mnFLPnHQKsj9WYQkFziNQ9FSIKg30TpL8xnamS2xdTzi4gD5kntsZR9 LLrs16R6GxSct/JPa1jdxj/ctPK0Mf4nAmCvNt0jzma/p/airXK5JkoXvzGzQyRoZqui hmng== 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:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=BGDdVATgVrryCfLtVTrTPKg4N0BYwSiHutIM3QCo0iw=; b=oeJSTn5vkg/oeFY6aO4PXPq1X3bfD3x80JHF20nnq9PvLLRy20dCuP2bWh6HTAxwhH 6NaVXhXCeIbcPdqlgzRegLQJ5TQHztfquQJRjsiQj0wRlJfzJHz+Zz4DFjrzTMezf6X6 0iLKz0w3cur+EMkgyMwvLbAwBhhEafYXqSd5Fap0w8UCHujJbMBgnPM3eZIpGopv1fnm f3kt8qTYe85zHi09hY3oLxbVauTDRIQliaDZuuhlhtAML3Huq2qpEtBgAPZ0/Vkn/LwE KcPHJJP6OflyZwrdsI6CQnNYSA04DRvMirQs7aS+IBm0NjJ4QlpuT7DhuCY9VGfRTVo9 ZUsw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a94-v6si13855899pla.123.2018.10.15.22.24.33; Mon, 15 Oct 2018 22:24:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727959AbeJPNL2 (ORCPT + 99 others); Tue, 16 Oct 2018 09:11:28 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:43720 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727008AbeJPNL2 (ORCPT ); Tue, 16 Oct 2018 09:11:28 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::cf9]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 1ACD71456E0B9; Mon, 15 Oct 2018 22:22:49 -0700 (PDT) Date: Mon, 15 Oct 2018 22:22:48 -0700 (PDT) Message-Id: <20181015.222248.2263887975438589835.davem@davemloft.net> To: ivan.khoronzhuk@linaro.org Cc: grygorii.strashko@ti.com, linux-omap@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net: ethernet: ti: cpsw: use for mcast entries only host port From: David Miller In-Reply-To: <20181012160629.7245-1-ivan.khoronzhuk@linaro.org> References: <20181012160629.7245-1-ivan.khoronzhuk@linaro.org> X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 15 Oct 2018 22:22:49 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ivan Khoronzhuk Date: Fri, 12 Oct 2018 19:06:29 +0300 > In dual-emac mode the cpsw driver sends directed packets, that means > that packets go to the directed port, but an ALE lookup is performed > to determine untagged egress only. It means that on tx side no need > to add port bit for ALE mcast entry mask, and basically ALE entry > for port identification is needed only on rx side. > > So, add only host port in dual_emac mode as used directed > transmission, and no need in one more port. For single port boards > and switch mode all ports used, as usual, so no changes for them. > Also it simplifies farther changes. > > In other words, mcast entries for dual-emac should behave exactly > like unicast. It also can help avoid leaking packets between ports > with same vlan on h/w level if ports could became members of same vid. > > So now, for instance, if mcast address 33:33:00:00:00:01 is added then > entries in ALE table: > > vid = 1, addr = 33:33:00:00:00:01, port_mask = 0x1 > vid = 2, addr = 33:33:00:00:00:01, port_mask = 0x1 > > Instead of: > vid = 1, addr = 33:33:00:00:00:01, port_mask = 0x3 > vid = 2, addr = 33:33:00:00:00:01, port_mask = 0x5 > > With the same considerations, set only host port for unregistered > mcast for dual-emac mode in case of IFF_ALLMULTI is set, exactly like > it's done in cpsw_ale_set_allmulti(). > > Signed-off-by: Ivan Khoronzhuk Applied.