Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3390683rwb; Tue, 8 Nov 2022 04:09:00 -0800 (PST) X-Google-Smtp-Source: AMsMyM7Ss6FYkQ2X8XmHguYCvnKSO3Qx59s0rsemIv0vj/43a4QlaadfdVNrRwX88LDtOtYSuyPT X-Received: by 2002:a17:902:8205:b0:185:33e:2a0e with SMTP id x5-20020a170902820500b00185033e2a0emr54985110pln.92.1667909340388; Tue, 08 Nov 2022 04:09:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667909340; cv=none; d=google.com; s=arc-20160816; b=G4zc2QMCxQLPDcEcJ1v/n+gV8sP4gMfuo6Wjov5kYxKrxL28BK0b556/pYbFUTHEaF c9L+MoghODlEdxyUeoPYDY8rSslFoNm0flw33wk3ScVYvyyGQWYUKyHn0PV1Nu8eOJZV r2IvH2z6gSNlKYCByqg1YnTfj8R5lRv5kBYQeLIPda6KYDNnachTaOfkLFWRMkDBslw1 Rh9ZCcMMaKlyVtjx9Qohqu6+4Nt/BzFkaGRKv4rwd8DrRsntqm94pASCVdyDuSDRRPGi gXkWGQFGUwgfAd/PL03WTIeW+lE/8krjH+r87q3PLWjB7bP+6/nFXJIdqZOyYf2+Nv6O nFlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=obs9vf68EcbHcOmjLYXoaWq/po3n5rf409qiOBIph6A=; b=o9YtKcaexSMAq6oBnkWrL63zT4p3TotFDJTCylODFwGSI991fw6MbKVQNBX17P3K2z WRgeoG0dFde0K/Bi1H8eXT2+DkMGkzPXDfsoGA/X8vtSzBLyAwB3o9o0izKJU//hFv9V NB4bBzqikiSfYJpby6sKkIcno0QFex4LVJPx5vQMKPtfW2GxU2Pzbu2aExk9KUd4V6eg RfrZ/9y/ty57Vf/qqjfEn2G4toEvPJn0v+H+oxwgv5W7Q+caz6KF+h+5YDii03gAxXzh HrcUuOmDlxGGj7Dxq0IOsujOuG35bzCBYzbX/Q2xFUdqOGSq/Tl2Jynwl5gAHjMAIWjE IKdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=HjjKxBOY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g8-20020a631108000000b0044a0b2e174asi14177892pgl.83.2022.11.08.04.08.48; Tue, 08 Nov 2022 04:09:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=HjjKxBOY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233618AbiKHKmW (ORCPT + 89 others); Tue, 8 Nov 2022 05:42:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233938AbiKHKmU (ORCPT ); Tue, 8 Nov 2022 05:42:20 -0500 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD65EBC99; Tue, 8 Nov 2022 02:42:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:Subject:From :References:Cc:To:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=obs9vf68EcbHcOmjLYXoaWq/po3n5rf409qiOBIph6A=; b=HjjKxBOYTtLiSyAMgQxaQkJa27 F0PHoT7og2Cd2AfnEnFJdeim+QEpGOkkc5xNU97iN+1Pzj/50pZIky06nziodDzbIq4ReC648IJ8N K7qqOSFsfKXg7P+eOJzJrwald+aLdO67hhuODRk60ouIHl6438y9ha8Fl5Dovr/Z7Ufw=; Received: from p200300daa72ee1006d973cebf3767a25.dip0.t-ipconnect.de ([2003:da:a72e:e100:6d97:3ceb:f376:7a25] helo=nf.local) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1osM3V-000UZL-Kg; Tue, 08 Nov 2022 11:42:09 +0100 Message-ID: <1be4d21b-c0a4-e136-ed68-c96470135f14@nbd.name> Date: Tue, 8 Nov 2022 11:42:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Content-Language: en-US To: Vladimir Oltean Cc: netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org References: <20221107185452.90711-1-nbd@nbd.name> <20221107185452.90711-8-nbd@nbd.name> <20221107215745.ascdvnxqrbw4meuv@skbuf> <3b275dda-39ac-282d-8a46-d3a95fdfc766@nbd.name> <20221108090039.imamht5iyh2bbbnl@skbuf> <0948d841-b0eb-8281-455a-92f44586e0c0@nbd.name> <20221108094018.6cspe3mkh3hakxpd@skbuf> <20221108100851.tl5aqhmbc5altdwv@skbuf> <5dbfa404-ec02-ac41-8c9b-55f8dfb7800a@nbd.name> <20221108103330.xt6wi3x3ugp7bbih@skbuf> From: Felix Fietkau Subject: Re: [PATCH 08/14] net: vlan: remove invalid VLAN protocol warning In-Reply-To: <20221108103330.xt6wi3x3ugp7bbih@skbuf> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08.11.22 11:33, Vladimir Oltean wrote: > On Tue, Nov 08, 2022 at 11:24:51AM +0100, Felix Fietkau wrote: >> On 08.11.22 11:08, Vladimir Oltean wrote: >> > On Tue, Nov 08, 2022 at 10:46:54AM +0100, Felix Fietkau wrote: >> > > I think it depends on the hardware. If you can rely on the hardware always >> > > reporting the port out-of-band, a generic "oob" tagger would be fine. >> > > In my case, it depends on whether a second non-DSA ethernet MAC is active on >> > > the same device, so I do need to continue using the "mtk" tag driver. >> > >> > It's not only about the time dimension (always OOB, vs sometimes OOB), >> > but also about what is conveyed through the OOB tag. I can see 2 vendors >> > agreeing today on a common "oob" tagger only to diverge in the future >> > when they'll need to convey more information than just port id. What do >> > you do with the tagging protocol string names then. Gotta make them >> > unique from the get go, can't export "oob" to user space IMO. >> > >> > > The flow dissector part is already solved: I simply used the existing >> > > .flow_dissect() tag op. >> > >> > Yes, well this seems like a generic enough case (DSA offload tag present >> > => don't shift network header because it's where it should be) to treat >> > it in the generic flow dissector and not have to invoke any tagger-specific >> > fixup method. >> >> In that case I think we shouldn't use METADATA_HW_PORT_MUX, since it is >> already used for other purposes. I will add a new metadata type METADATA_DSA >> instead. > > Which case, flow dissector figuring out that DSA offload tag is present? > Well, the skb can only carry one dst pointer ATM, so if it's METADATA_HW_PORT_MUX > but it belongs to SR-IOV on the DSA master, we have bigger problems anyway. > So, proto == ETH_P_XDSA && have METADATA_HW_PORT_MUX should be pretty > good indication that DSA offload tag is present. > > Anyway I raised this concern as well to Jakub as well. Seems to be > theoretical at the moment. Using METADATA_HW_PORT_MUX seems to be fine > right now. Can be changed later if needed; it's not ABI. Okay, I will stick with METADATA_HW_PORT_MUX for now. If we use it in the flow dissector to avoid the tagger specific fixup, we might as well use it in DSA to skip the tag proto receive call. What do you think? - Felix