From patchwork Wed Mar 22 23:38:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 73695 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2629416wrt; Wed, 22 Mar 2023 16:41:32 -0700 (PDT) X-Google-Smtp-Source: AK7set8F0Nh+PLOngUcMwCgBPnIt2zLj63NZjVKTykr2+4rEz317WvPAD8vXQ/pONjBeXz2mLfoh X-Received: by 2002:a17:907:b9d0:b0:92f:495b:bc7c with SMTP id xa16-20020a170907b9d000b0092f495bbc7cmr4626770ejc.23.1679528492791; Wed, 22 Mar 2023 16:41:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679528492; cv=pass; d=google.com; s=arc-20160816; b=szxzpumdkopmYN4LV0oibWLsFrpuoOwBVMrw8ywat8rEuoxqdIuCCm5VKUvVtqkyjg nhx0Q5dvLuAfqiiYYT7gaMlnhzfBt0WrJ7vTZ7xwretUar0yHTaT+2wWG5oVgM4ZsNMh 71yMU9iiBiTrCkp4ijvN64A4UMqLXBeYUlkbTw8/WpTEkAC08laSgq1G3P/wlUpevZIg /sI8x4RvTqojeK1golKlV12r00AsOjXJW+p1WYLzKLGrscIgaTuic/y3hzgb1bqafL0j 7+5UBVduvxj6RL6ckzQKG12Gh7rEYleskGEGr96/JItIn3c9AoKZ03Vf/lt74qC0YyI5 D2Aw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LQC9E1mKKbfbWTDhyi3o27SFOVt3LJpkRfuGkf7z2b4=; b=Lnh3L6o5fnEGX7PuyQ9vggyaERcy4E9gmiLZ926axK+PhBJJNIj9IxJ1s7hntljeN2 C83fVmUlg1fc106LYYDhzsynacSMz7TcoXsjF4gwfQHYjZ7aVMvhp8OPT24M4SZrqXbp V/D2wp8UXP30XnQ9Qb9qVfVXVAuPtoapzScdmQRoOevoIgON10isbjd9qm/FcWppLbz8 3huqi8+Ex2Du4iy0errMfPb31fYlnH1ieKNKzDTttAnLoMlxBwhIHXrsAqKzSqM4axJZ aTd4vn6I7ZfM8+kK0QyMAt/hFRQl62j7iyqbtgPtt/Q5HS2PA99wXWhSqNTUPQ9LoDUF KSrQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=ms14ngxn; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020a17090670c200b008cf961a7bdesi12940377ejk.598.2023.03.22.16.41.09; Wed, 22 Mar 2023 16:41:32 -0700 (PDT) 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=pass header.i=@nxp.com header.s=selector2 header.b=ms14ngxn; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230282AbjCVXjK (ORCPT + 99 others); Wed, 22 Mar 2023 19:39:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbjCVXiw (ORCPT ); Wed, 22 Mar 2023 19:38:52 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2054.outbound.protection.outlook.com [40.107.7.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70F4828EB1; Wed, 22 Mar 2023 16:38:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NO7ST1lKfcHN7fq+fRGa3MM0UL3GkdLVVD8jfRZaPnWIdzT+0qJBxAkbLYkhKs/zU+yoAI5cSO5g2q/MMzq5RJqWiz+DHb6U93ce5J/oKmaP0rjeqDGFEDJQL6IUsFV1VqI5/Ub/HcmVfu1rXyMPHPUG1Lo0XFr+DyL/XlB+Sr2pb/y5boPXeBCwvJ9slVdVKq2uYwpwCyI4roIyI/ftJy/QfzALOrz5YRkBLLDq3zoCB3mwPrpimNlNlMq5D8SZ39+OKdMOw/wtKxPpKGSFOHI96uy8CYGd6drPi7zCefoU5qfi0ttNC8ateTRCqoGiaKxNBvwCmLvF7NTDK4ZC7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LQC9E1mKKbfbWTDhyi3o27SFOVt3LJpkRfuGkf7z2b4=; b=PscF8wONmE4VhsdWkZK5/tSDlEZZk0I7tZrgYOmIm0U3qq5Auo3hLQdRau/fpfzTPuIrYIF0RL7DpvILs1ZLW3Scvv4hiZTUH3fay8kMRo8geUF+B4ovvNVGrwmHb19DGsNOrkUwoTlJycUyDqlh6br7rQDR5fM2aKwRxswaYVdHD1I33cxAr3EKMLycKOmqpe4A+HpGjEjqWYz9cDZDj8WuLAdcl0dHcK+OzadbU3QbLsQpjgVDeHqxcanMJDNBLDetdtF1oX/1ZALe/F4s+NmmGh8XCRXW4T1HgVUhrpfzA2Ib5tDtlGzoTTaEKpFzaSwbcoLsFPiZ30w5hybn5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LQC9E1mKKbfbWTDhyi3o27SFOVt3LJpkRfuGkf7z2b4=; b=ms14ngxnwWQctn0yNdgFI1HILUcEpxAya6OO4Mvz4Qoty9bIzQkckbCAWZp0JxG8eIAHzeR18HGo4nRmQPOks9hTJa8JAs79V6PPrkUzPKU1Ar7BIcyLNDqdzR0NCjjCZJUMsgMfrTQEKt+AnaW82CtNQTpNZLQJ1AFoB4vSW5A= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by VE1PR04MB7263.eurprd04.prod.outlook.com (2603:10a6:800:1af::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Wed, 22 Mar 2023 23:38:39 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::29a3:120c:7d42:3ca8]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::29a3:120c:7d42:3ca8%7]) with mapi id 15.20.6178.038; Wed, 22 Mar 2023 23:38:39 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Florian Fainelli , linux-kernel@vger.kernel.org Subject: [PATCH net-next 4/9] net: dsa: tag_ocelot: do not rely on skb_mac_header() for VLAN xmit Date: Thu, 23 Mar 2023 01:38:18 +0200 Message-Id: <20230322233823.1806736-5-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230322233823.1806736-1-vladimir.oltean@nxp.com> References: <20230322233823.1806736-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: FR2P281CA0081.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:9a::8) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|VE1PR04MB7263:EE_ X-MS-Office365-Filtering-Correlation-Id: e4ea8d63-45ff-4571-1735-08db2b2e9024 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2hoNJSISGJO4SDc6puM3sQezirHFF5V5D104GAe4/n61CwErYLX6LKrUHPzdzqMaynukYKU3eovtAqe6K6AUY0Qbd5ippKDj6Rfm9MoyB8pwCsnQ4iAnjiEis34jvnm3qBk5rZfcnCavttjQrBa7Jfgdj8UArK7SB4hI9A3zy/sF4qb+i5HqUBSUzNBo3f72sm/QuwYIkmHx1mV1vUkS0+Akv3QAnMeSt07UrGRAL3kdxYQ4j8U2dY/svSyBEocKhNlcU27PHIwTFIwqOhJ5UoIVXeZxFHgRx3dKzdTDNAl+5teWypmOd2RZdqFT7igtU6gNoDKHs+3P2pO/5b3CemBXEK6MVV7njZMu4UDPLaPXij+XH6/FhQKKyaldzPeMeFpBv9P1QSuqmWbyE7zry+Zt8CbR1kHPoDbHs3iTWUIe+EzjJTxJOe5CuNWAcjGBtfnAXDnu8PjT5sqkVDIxdK83CRphqzIRX6J+SA0/shrgw4VVvTqMt0uLHgbyiIppywGi8amC6TiK7zFy61gFgI/bK/5K+i2pEGWhTDA6YAf7K9j/QHFXcbNIQRwt9jte+fvEh0059ZYT02sHI8w32yp3Si1t61ZpImfdWZ9ucfQHTOzFYm57kEv9W3CHpMiql5pym+pWUFCIWdS7TCxT5kKh54tRedDghyoOTtiU9Vl8shz1ues2VuSjo8Kf7Vm0sHZp2QLe+xHdJLHz2c3H6bH4l7/Pej77+RvLOTAsbircg4/Gpg9El3UsinPZlYCP X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(346002)(376002)(39860400002)(136003)(366004)(396003)(451199018)(54906003)(66556008)(6486002)(6916009)(316002)(66476007)(8676002)(66946007)(478600001)(6666004)(4326008)(52116002)(41300700001)(6506007)(1076003)(6512007)(26005)(8936002)(186003)(4744005)(44832011)(5660300002)(2906002)(2616005)(36756003)(83380400001)(38100700002)(38350700002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ui1QyEv+Ene/tmOgOlofC2syhIIG2d3QJFLPrqYRqMbayDf7pQUcqDKXzI0GtTTqQe05q3wqrg+fH5WeLkIIlYYdmH34yiw0pFsJh6SninBS/MkFSNxetKPyHRmFwnELP3aQ8rcCPucH3U2BlXzEN4Zsu4z0xvZbJfF5r9VIKuxz1/J1ZVrpEVwK994opFrCRDKCJaeuJ4HN6kDEjxCKpHQkID2a9W+9Xs5i7T2Ph3HNuXTKKEhaLvR0dFtcC/JRvSi2vfTWaZ7qklil+NQiMnADyjQAe4dNScTjp2+YIGbxfaPD461Q5llt+H4CIyx+58NjhPUifiKemgOXMA05Ft/Xb062SeIorJKXuRUW+94yTToqOKR2HIGdltV0G1tZuQhi3+hb89AgU7Nw8AlfDNrdmVb887FFj2kgJJdP+2uoqWRJIHRSlEF4DSJgtF6CTH1BrAIBNqN8xZkclqRUb/ohdDwCFrrJqtEL1qERb/xqIJ+BVRrH0B0ssTtKBgWE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kXRzQKgstrHn0jytG2A== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4ea8d63-45ff-4571-1735-08db2b2e9024 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Mar 2023 23:38:39.1393 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: niNLUr0SKpQTQe1dAQbWe/FtGaEmWuPAuzKK8km9esvbao4u0C7xB4QDZDsULbHgLHfI2+CAEGhF6/IaqguyXQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7263 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761113268693127541?= X-GMAIL-MSGID: =?utf-8?q?1761113268693127541?= skb_mac_header() will no longer be available in the TX path when reverting commit 6d1ccff62780 ("net: reset mac header in dev_start_xmit()"). As preparation for that, let's use skb_vlan_eth_hdr() to get to the VLAN header instead, which assumes it's located at skb->data (assumption which holds true here). Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli --- net/dsa/tag_ocelot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/tag_ocelot.c b/net/dsa/tag_ocelot.c index 28ebecafdd24..73ee09de1a3a 100644 --- a/net/dsa/tag_ocelot.c +++ b/net/dsa/tag_ocelot.c @@ -26,7 +26,7 @@ static void ocelot_xmit_get_vlan_info(struct sk_buff *skb, struct dsa_port *dp, return; } - hdr = (struct vlan_ethhdr *)skb_mac_header(skb); + hdr = skb_vlan_eth_hdr(skb); br_vlan_get_proto(br, &proto); if (ntohs(hdr->h_vlan_proto) == proto) {