Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp375896lqg; Fri, 1 Mar 2024 07:50:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWrJ+FtTzxQ/BtQuzS5SoDQJjJv08yeZ5LAgG8d5rGcXjdiQSDDLZBLpuEiWo8X0/F53na39mv/eUZR3fhD59RfTIcF0gwZGELPa6sl1w== X-Google-Smtp-Source: AGHT+IH5oHIep1x6rbwKPlvX+98ZYSypZCdyAiX/igTvWpRbKM7gz3JT7oNcURRkzjB5euSqZif8 X-Received: by 2002:a05:6402:901:b0:566:6a1f:c548 with SMTP id g1-20020a056402090100b005666a1fc548mr1768508edz.3.1709308224337; Fri, 01 Mar 2024 07:50:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709308224; cv=pass; d=google.com; s=arc-20160816; b=KkY12P+DQtHteTbGjTVqlpGtEyGz49nZHUwkS0n2m+mf2tP3+BEHHmNiDgOmJn7D/N ldH4iv/q11K5nrdUn0o5QRwpKNPlGISGOvcPNZv1sH8xh7oh/YGXNHUeQbi1TanNvC7z q5f6PtLfHuVuTSdJJO2U+OPFcMcP8eAnfGbY0erN13sGi+nuk88q1Z7x8ambzTgcleyS T+OuVPv8baPRZrkXxLMHy+1n/dyH6eFZBhrc0c3tjvSj1R9ME3qxmQKSdt/ed00xmJlG TUWspTEWm0KEXb10wZMlV3SHvRnfztCpgJRHP6pDR5Lt0pT9hju2yhRgXvXrmJ+MImyJ VFzw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KjS+ikwQmfyolO6cKdEt9cJp/PblUq1A5JzypvMz5Ok=; fh=xgOJ/v629ssrIFOqKfmEVy/eiVyd/lFaMrTIwa+8OIU=; b=WfON0Qs7B3m560fEAffJq3DUCYm4UxL3R58TvIX8dpL04JMsNJMra7I1n4JX9QT7Lq XDGGHRmFWgt3tNdKXV4fMw9Qysd7xbB37MG2PJDXHOlZr65pnk0OpKJOAh0fB1L0W0xt YlOJ28ovhotOKzA8ZqLa/RBw7f/ppmQDHBLB+KmY+NuUPvoJHRRQRnC64CBuemXPkT5C hK7raiameChdp1DMz3lkgmiaZ/SufcsE4LvKHg0H7HmhAb22KmJ9UndtYoStAdnxPNSH qH+6+hZKdDJMZY1AnPgPCZwoyPenpltMj05LL41aVNg0lK3eDxCjmmbgoJ++GTirxn41 rf7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DYYzBIUr; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-88640-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88640-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q6-20020aa7d446000000b005668de27aaasi1528447edr.227.2024.03.01.07.50.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 07:50:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88640-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DYYzBIUr; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-88640-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88640-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 36E7F1F24DA3 for ; Fri, 1 Mar 2024 15:50:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 79FCC70CBF; Fri, 1 Mar 2024 15:50:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DYYzBIUr" Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E15070CAE; Fri, 1 Mar 2024 15:50:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709308203; cv=none; b=lWbBd+maU8eV6EncGB8FVpkpM7eJVsU9tIhm1nw89KN6zkWuiB32Ifa8hXmgllUSpe0lex1IRIOs+sQO+O8DAeS5YeO1W3K06WqqSvixJrl9WkImWTSfvkboAPPqAeiJuUYydK+26walsnE+djbnuyca3XKWC/c5p2b0/C90Ie0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709308203; c=relaxed/simple; bh=XItwrjtV3hvnmFR69chzCPc6dcE/80sccqPKn/LdoS0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DQaOOqPJNYEcmAtIYyR5ucQ9ff8+reTZlqckEZvbS+GydHk4x0O5BsE7tz5fOfQeuCGIyv6uZNiThBJDzML4VvekgC21KTdU8tkfA66Zs+f0Y+ZYfIurq5hWRaBosePOcNDiH4uQ0AiPInzuncEVZqRHLyl5Jdh8/b0fk8TqhE4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DYYzBIUr; arc=none smtp.client-ip=209.85.218.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a3e552eff09so313340966b.3; Fri, 01 Mar 2024 07:50:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709308200; x=1709913000; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=KjS+ikwQmfyolO6cKdEt9cJp/PblUq1A5JzypvMz5Ok=; b=DYYzBIUrJ1BTZxFy8LNV2tf0g8k6Ey0do0lmSv+Us9bkbG5QdrOrBm5r+qQ3sw1ACL kmk6ZGsiqjNil0Sk0vy6g6VZg0SSY6+S3YMzo4zFHJ4mxk7oBHtIpaXxpd6XFXvcga4d 8USvGHf+1QO7YYxEG6E4IN1/Pq2rKzGLZxxTcw0WYHqu+oWKhEVkCyuHr4V+qVQV/Lcy 5iQuhOQ+JTTr4uvB6gJVAXLRtERs/lcBpW7B6ZxKdKnfTZKYoEGqkadfkDso9HWyb/g3 NCOnxc5vimpoCA3J57CVtP+9UhHVmmXqOzM14tx4WLa3R7/NOqrLMvpbYJXACj7nN423 1D6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709308200; x=1709913000; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KjS+ikwQmfyolO6cKdEt9cJp/PblUq1A5JzypvMz5Ok=; b=PHZLGXGdiUhHSgr9xv+iOG9UyuUb2SiyzxpQBtlZhLC3ewJQOJhC9YBUpphjT+10V0 0UTGprBFd4Q2sMFfK2WZ4MZSllPu+IcNXyRgKSlcAJypBtRSPaQhr9Q98TmfZ+SYJu8S mAjSxh0iYHl0VQ7ZZGI67ep5Fq9Cw/3FNUAZYOhJ85xvq2tfveOLdrYRenUl8ImnY2MM le8LTaslLtZfjHn1BTa6XHRRzDtWHwF1uFWxvdv7Q0MXUPQ7uxZr6SkyBNyTXWsYXfl0 aLr34ShNBY5RNn5osmM+ujeV5YSktaselscuHoXTxaVdwubVexdAOmvCyLcSp/aeLiz7 HZpQ== X-Forwarded-Encrypted: i=1; AJvYcCVihyljcfJa8ubj6RTxJTcJfnNXrk0UFpZsIO9zMtt6LoBWqbORy5O05h6BYWeq4TAaHKc3yPVVpJpeHkNCmZUGnj3PNS/F1eUD0JncwAwko1Xw0mOjUCZ82Hq1+nwI3pjdCHNE X-Gm-Message-State: AOJu0YztZEjpkOjiBzvRT7X4tu+XfBU+ClteD4ik7BEvFSUH4Vgc4yLJ vOvqtJUhMk87BMj5n43RK0Vx/jLvU421ZAiqWS3q71gbToLTNUJA X-Received: by 2002:a17:906:e08d:b0:a44:731c:bace with SMTP id gh13-20020a170906e08d00b00a44731cbacemr1824851ejb.35.1709308199989; Fri, 01 Mar 2024 07:49:59 -0800 (PST) Received: from skbuf ([2a02:2f04:d207:f600::b2c]) by smtp.gmail.com with ESMTPSA id ty24-20020a170907c71800b00a42eb84c7c2sm1821478ejc.142.2024.03.01.07.49.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 07:49:59 -0800 (PST) Date: Fri, 1 Mar 2024 17:49:57 +0200 From: Vladimir Oltean To: Ravi Gunasekaran Cc: Jakub Kicinski , =?utf-8?B?U2FuanXDoW4gR2FyY8OtYSw=?= Jorge , "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "s-vadapalli@ti.com" , "rogerq@kernel.org" , "andrew@lunn.ch" , "f.fainelli@gmail.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net RESEND] net: ethernet: ti: am65-cpsw: Add IFF_UNICAST_FLT flag to port device Message-ID: <20240301154957.xex75zuijptswcf3@skbuf> References: <20240228111300.2516590-1-jorge.sanjuangarcia@duagon.com> <20240228200516.1166a097@kernel.org> <03bf515c-9f90-487c-ecfa-90d407dc5d86@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <03bf515c-9f90-487c-ecfa-90d407dc5d86@ti.com> On Fri, Mar 01, 2024 at 04:39:50PM +0530, Ravi Gunasekaran wrote: > On 2/29/24 9:35 AM, Jakub Kicinski wrote: > > On Wed, 28 Feb 2024 11:13:23 +0000 Sanju?n Garc?a, Jorge wrote: > >> Since commit 8940e6b669ca ("net: dsa: avoid call to __dev_set_promiscuity() > >> while rtnl_mutex isn't held") when conecting one of this switch's port > >> to a DSA switch as the conduit interface, the network interface is set to > >> promiscuous mode by default and cannot be set to not promiscuous mode again > >> from userspace. The reason for this is that the cpsw ports net devices > >> do not have the flag IFF_UNICAST_FLT set in their private flags. > >> > >> The cpsw switch should be able to set not promiscuous mode as otherwise > >> a '1' is written to bit ALE_PORT_MACONLY_CAF which makes ethernet frames > >> get an additional VLAN tag when entering the port connected to the DSA > >> switch. Setting the IFF_UNICAST_FLT flag to all ports allows us to have > >> the conduit interface on the DSA subsystem set as not promiscuous. > > > > It doesn't look like am65-cpsw-nuss supports unicast filtering, > > tho, does it? So we're lying about support to work around some > > CPSW weirdness (additional VLAN tag thing)? > > CPSW driver does not support unicast filtering. Then the driver can't declare IFF_UNICAST_FLT. Why does enabling promiscuous mode cause Ethernet frames to get an additional VLAN tag? 802.3 clause 4.2.4.1.1 Address recognition only says "The MAC sublayer may also provide the capability of operating in the promiscuous receive mode. In this mode of operation, the MAC sublayer recognizes and accepts all valid frames, regardless of their Destination Address field values.". Absolutely nothing about VLAN.