Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2256492rwb; Mon, 7 Nov 2022 11:02:21 -0800 (PST) X-Google-Smtp-Source: AMsMyM4vylNBxIrCe2/z9lvlywBRaHlFw6O5Z2T5MJ5ZGEUCUP7Hz+ms9yydl3aPLqj0QIM5jV3V X-Received: by 2002:a63:1748:0:b0:46f:18be:4880 with SMTP id 8-20020a631748000000b0046f18be4880mr44162234pgx.128.1667847741468; Mon, 07 Nov 2022 11:02:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667847741; cv=none; d=google.com; s=arc-20160816; b=rkvGEw+oOvhu8pocw94clAjiCS6YpN79HVTOl5qErXeabJTWF52v5gSZYJthX4p5fc PcIa/Cz6irwqH5uzZgZQs1yKMhoaTr2ObiYgo63nqHdZy46jgtQkkLuS8f0rC1EzH+No GUnsWXj6WwJGsVg1085zDq+3Zm49hPf7d0srFxZ8NLebeGkrikYOrR9ECXrwfdCdal4p 6Qwkj6nS7PdM+Dq5IduBQnhMh1o9v+CCcF/c0OTrwcgIF4d1IC39jnCs30ruFyDcT79r ClwTNc8dl1lMouB7U7f365t+A0dUY/d+Cl/1bg+Oi3RAjwzXzybq07V8+XNi34aIa5X2 Ka3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=itzNjPSgtI5YQ3ZzVEgPaMFuJJoHJB+VuPcGUc7XBPA=; b=Nun3holaGACJ9JzK9ct81gAtK2mpixXc1115yIG6RCjBWB3EcvLHUH5TVfj4bUD7vH vBrGBuT0DzgkGgcZNAP0kHWVlEASXelvmzXT0YBHUJcujHZ/ac4qqpOHcqdd6c0rpe2V LofnlGt3om2FX/sqwlWq8pQkZ6VX1wsU8n7F9ujsdR4TJyIR5ZxX9KUmy/V2U+ptw8Na GynACTuQHImqq6njVTs65EQmYWJ53a6tp3R5t0HukInJ+JzG21xXXO0Qs5zanrac8yOW MA8c3vbSy2w8XHFELvFV4ZXw/Xhul6JX0DbmRmPLOd1ibq85zlFqEk+mTu+cQKoQMUUt DHmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=TvI9XFrP; 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 1-20020a621701000000b005668645daebsi9887495pfx.111.2022.11.07.11.02.08; Mon, 07 Nov 2022 11:02:21 -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=TvI9XFrP; 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 S233016AbiKGSzg (ORCPT + 92 others); Mon, 7 Nov 2022 13:55:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232105AbiKGSza (ORCPT ); Mon, 7 Nov 2022 13:55:30 -0500 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA0F821E2B; Mon, 7 Nov 2022 10:55:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: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=itzNjPSgtI5YQ3ZzVEgPaMFuJJoHJB+VuPcGUc7XBPA=; b=TvI9XFrPBGbzQWNayCtd/QHfzC c+nStyV96uynxPWlvUEeHDMR8U/pZ1cMjcW1n8KF5LGoD5/zjioGbXaAPOXGpVL467XaV+/7yZY9W vmA5sPiVfmJvbuCirrUKlLOGeZ7yablPwQuT6B68IM2Ha+Nw+hgBL9Ta4puijo45e8Bs=; Received: from p200300daa72ee1007849d74f78949f6c.dip0.t-ipconnect.de ([2003:da:a72e:e100:7849:d74f:7894:9f6c] helo=Maecks.lan) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1os7HE-000LCc-Hs; Mon, 07 Nov 2022 19:55:20 +0100 From: Felix Fietkau To: netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-kernel@vger.kernel.org Subject: [PATCH 09/14] flow_dissector: detect DSA using skb->protocol even when VLAN tag is present Date: Mon, 7 Nov 2022 19:54:47 +0100 Message-Id: <20221107185452.90711-9-nbd@nbd.name> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221107185452.90711-1-nbd@nbd.name> References: <20221107185452.90711-1-nbd@nbd.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Fixes flow dissection with ethernet devices that can combine VLAN rx hwaccel with DSA, since skb->protocol is set to htons(ETH_P_XDSA) by the network stack. Signed-off-by: Felix Fietkau --- net/core/flow_dissector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index 25cd35f5922e..43f6bbca7447 100644 --- a/net/core/flow_dissector.c +++ b/net/core/flow_dissector.c @@ -970,7 +970,7 @@ bool __skb_flow_dissect(const struct net *net, hlen = skb_headlen(skb); #if IS_ENABLED(CONFIG_NET_DSA) if (unlikely(skb->dev && netdev_uses_dsa(skb->dev) && - proto == htons(ETH_P_XDSA))) { + skb->protocol == htons(ETH_P_XDSA))) { const struct dsa_device_ops *ops; int offset = 0; -- 2.38.1