[v2,net-next,8/9] net: dsa: update TX path comments to not mention skb_mac_header()
Message ID | 20230420225601.2358327-9-vladimir.oltean@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp675062vqo; Thu, 20 Apr 2023 16:06:54 -0700 (PDT) X-Google-Smtp-Source: AKy350bnISvnOUTFaxFElVF9+HKCc5cRNEK7L2m655eL52HTN3tjRATWLEudlBLA9RWH0kwWldYI X-Received: by 2002:a05:6a00:cc3:b0:627:ea7a:ff46 with SMTP id b3-20020a056a000cc300b00627ea7aff46mr3807265pfv.16.1682032014036; Thu, 20 Apr 2023 16:06:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682032014; cv=pass; d=google.com; s=arc-20160816; b=N/bs4oL3qxO1qTmgboWpHv3hQsnYNzeU9wBNNTH1BCLZEqxLfXh9hxN8MIUWmY0XYo nAPaUjae7ubxeBpzyHDo+VwtyLBEeCW6lrH60iGULk3t4bSgQ3AwvXAY0RjcpNKH8x9n RVYI5S8Ox+m1C8q5v6ZjOupEMx6tqflvXZLVnpS7tIN62g/JCNp5jnmxWL6XpoD0lRyi JhqBgRWAQRpkSF7/LsbbnM8TEyo8D+QWEvUFrrAslUOrtTV47qB26PNR2HtCACEyKZK9 2lMyX6MR+eiEPn1PV5r79HNrii02KPRqCsY53720/57175xGSCPu3vRCVuvTiA4gaZwI JGIw== 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=XTdiTvuz0snlaQP1usAosQoB9AJsPhW1MxetII5AmaE=; b=BEVlciMtDBWuW1FaKaeWvSeEqOKH/tGk1os1EJHCnORC5h6js2YIWZJEuvbXeoJSl3 uD31tsLMB5Fr9PHYMMfJ6cENEuam/Y+uQbVlm+ITZ7WFUtGs8lgkXnuKcYsA/jUfsRF4 V2In18pJNyN1zeC60HKAkJjHuyKeG9DqGHs5QOoYV1pCLHM9qu6FP+KxFYFjlBxsUnxj eDJGaM5alSRbzT4KQepDihZ+z4PTEWclCXVin3Okrt2OqH4Zb0wPJuEhr4QQz7zPPskF YyUVHfo64LVUsBOalw89SfqbZTvimLRz6jgrZ5zGp26h36uazX2qUko6h70n8EF4is4W hstQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=cfZPoWOK; 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 x29-20020aa78f1d000000b0063b8f3a4d42si2780156pfr.163.2023.04.20.16.06.41; Thu, 20 Apr 2023 16:06:54 -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=cfZPoWOK; 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 S233236AbjDTW4w (ORCPT <rfc822;cjcooper78@gmail.com> + 99 others); Thu, 20 Apr 2023 18:56:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232351AbjDTW4Y (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 20 Apr 2023 18:56:24 -0400 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2070.outbound.protection.outlook.com [40.107.14.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AA0565B4; Thu, 20 Apr 2023 15:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CFffYDlBdZ3W6Mqig6FnVv+xkQq6erOa8YioNZ0ZQRbD/aOxmSAWHUQWqkobow15gOynQFjYf3lsJGsOmPlbnGxesqvT/SfW+gfG5NPiM1f/V/Qu4R3P0ZRki0mJvzUbhuqTw5pzIeRb/5ig++ej9H+S+nmv+vobxmmzOAcU+/vj8uylCfBJmYyFXbl65SL/yFuUc5y1TAM2jrjDytShI0ShofpKwtfICgPs6gqTbjE5a/t2HxtzABtqTKC14F1bqYEkdwtpwRWK87oLl7Ct4lG6OwpdjWN/kcai3SuTX5elZQomLE27PI9x4i4pKp24FnGkcT9sZuvRqXIkQQaYIA== 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=XTdiTvuz0snlaQP1usAosQoB9AJsPhW1MxetII5AmaE=; b=Q6aBkjAjYav3uDS9cxRGtZI0iNpZTo5L1BZdQK4/c0dNjKl9hzvvdVOHt5HGzCnU/iE98t/mpV1H6US7DCZEujjqQHrt96Tf784OU/ByuoexDmnYZavNOb20Y+/TXpuoEjh1zxfY0lLccMzwBs7mtUNL3nIJQrzkfLF2YXPCW+KePafdfNeKOsV6raLPsqUn06JZj1Ek7GXhMxFGHH3MO5QR4RqkpZ8tGeMvanLiCcbiyJrpXVIv4tcPizi9OhlDP0wRkP/2rCysvBfRwJkaUgsYggjnKuNMUF6QGav0qi5hYDpSclCPJhDI4xUhz6+mttC+MBTWattfCQaxvQz7lQ== 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=XTdiTvuz0snlaQP1usAosQoB9AJsPhW1MxetII5AmaE=; b=cfZPoWOKIJQ+Ze3zS0to24N5q3bhXIUILyQveFwyF/kUiruFd2F8YgLdhdnxVqnyF6Fu+7gr74JVUVqJBXRxDjsMoRxvMBrHSRnK8Vb+XODZ7YN8qMAirQIpBOdcZOS1NKnmldKX3ltoktX2BEfVTMiT4LBsHjajgYjWJoj7NhI= 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 GV1PR04MB9213.eurprd04.prod.outlook.com (2603:10a6:150:28::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.22; Thu, 20 Apr 2023 22:56:18 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::245a:9272:b30a:a21c]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::245a:9272:b30a:a21c%3]) with mapi id 15.20.6319.022; Thu, 20 Apr 2023 22:56:18 +0000 From: Vladimir Oltean <vladimir.oltean@nxp.com> To: netdev@vger.kernel.org Cc: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Andrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>, linux-kernel@vger.kernel.org, Simon Horman <simon.horman@corigine.com> Subject: [PATCH v2 net-next 8/9] net: dsa: update TX path comments to not mention skb_mac_header() Date: Fri, 21 Apr 2023 01:56:00 +0300 Message-Id: <20230420225601.2358327-9-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230420225601.2358327-1-vladimir.oltean@nxp.com> References: <20230420225601.2358327-1-vladimir.oltean@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AM0PR03CA0088.eurprd03.prod.outlook.com (2603:10a6:208:69::29) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|GV1PR04MB9213:EE_ X-MS-Office365-Filtering-Correlation-Id: 5d84bc5a-434e-40ec-64ef-08db41f27394 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FpvKihcL2MamMB15mQxJIOMt45rv4rpliKQgoSChuDA+YXvsBitL9azt3hboQbTAOeyuyRv4z2gcqspNKseTw39VIIN4W0451kNdNiLvtoZ0nPgSPkQ3FqbJQt45MihDL6cSiiahej6Egk01biqvl5l69ZsjVU/cPsyiPw9szXyYNNkQx04tgncxHsD7eIkhNCHISYKwRWSvRbgYJA9tSnyGOI/ZNCuj/8XWxy2eSCBzdWDq2XDmyEV0t0jAwXXLvCRU+d8XrMQQWO9IZXKob3wZzna4Z/ZeDZiQ/avaKDnft08xS+2PK1CfBMAhIIPavtx2NtwBlXEinsXxsbuDdLt9P5hAQtz8oeETag7QilliMGF1iit9LtSgmOJUBn44Ywnb8VWxImrF/1pBEw4ZMT6+zmqljgPsszReo4FcyDYPskAYHyaKrwGSH6EVY11GGcIlmQQIM9WtC1k3kzAkE4L4u2g3GJPS2IJ5vk1hfb3Dz4KApix7hEBtGKqNlSN0IaqztktaF88W6exx3DyXuyULALsypV3VV59D6EHXfvAfAUV0eJyF1MCUVig+2Dz0PMnKcxViO7rYqOW/z1K1fSxt59C3BWjIqLgmlMX1xiJQHqfpTX6tV5Fjm0sPW9/I 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:(13230028)(4636009)(376002)(346002)(396003)(366004)(136003)(39860400002)(451199021)(2906002)(38350700002)(38100700002)(86362001)(478600001)(54906003)(316002)(41300700001)(66476007)(66946007)(66556008)(6916009)(4326008)(26005)(1076003)(6506007)(6512007)(6666004)(6486002)(52116002)(186003)(36756003)(8936002)(8676002)(83380400001)(5660300002)(2616005)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SZTZSWwyDdAkjVCi9/xU31IjVLRLChxWyzehlkAu+GKBlIL/7FnVhNxlnsjcIRCKi13naCbvyeLpv5YLCn7LVnwfRuK4YtdYXTBMyw+sY+xuOzXuAeqS//rJOVyILsyGjCcmftLuFZH94Q8qWqIQ9xwH2ceXWoQ6RZ8d0UIumw/sxtVmD48MdVpX1xU4kPpex5uPGz1sTvNrDZDDKESJQb/daN2+FG2TaNM3kjBehBkdPur5MojuvY8U4Dvagx1mhJIxSKpAh2dOHOAVxqqLObltuqOPHQ4hDVL6fgvMgP47hYpHSAJgbldRPBKdY65yE8RF4EOu2YALBHYfZtKOk+1OkTgdCTJ3WaLhNzG2ZViyxbZ9bvNNvC0x40XU3isjyhduFQR6SyCD07yJJ5BuleIqtTepLIp3wGW1sCynww4JbfUDerAocvwvGVtnIha84zpGTTXB3FzGuZCqM7yQ5oOT5LCxsH5aLx205kOBh8Zc+BHotJJ9L9EEuCYayJCKMpXdsiayS+GF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0UxzOAD6VMMgHQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d84bc5a-434e-40ec-64ef-08db41f27394 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2023 22:56:18.1496 (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: nDD3ILeRjeJydKjQLfnLTTyf2yKXlYzIo4L+pCDjzRbvPD08JM7WEm3GQYAZ3zbuTW0oC1gmwgCHM+o08Bcrmg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9213 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763738401093491360?= X-GMAIL-MSGID: =?utf-8?q?1763738401093491360?= |
Series |
Remove skb_mac_header() dependency in DSA xmit path
|
|
Commit Message
Vladimir Oltean
April 20, 2023, 10:56 p.m. UTC
Once commit 6d1ccff62780 ("net: reset mac header in dev_start_xmit()") will be reverted, it will no longer be true that skb->data points at skb_mac_header(skb) - since the skb->mac_header will not be set - so stop saying that, and just say that it points to the MAC header. I've reviewed vlan_insert_tag() and it does not *actually* depend on skb_mac_header(), so reword that to avoid the confusion. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> --- net/dsa/tag.h | 2 +- net/dsa/tag_8021q.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/dsa/tag.h b/net/dsa/tag.h index 7cfbca824f1c..32d12f4a9d73 100644 --- a/net/dsa/tag.h +++ b/net/dsa/tag.h @@ -229,7 +229,7 @@ static inline void *dsa_etype_header_pos_rx(struct sk_buff *skb) return skb->data - 2; } -/* On TX, skb->data points to skb_mac_header(skb), which means that EtherType +/* On TX, skb->data points to the MAC header, which means that EtherType * header taggers start exactly where the EtherType is (the EtherType is * treated as part of the DSA header). */ diff --git a/net/dsa/tag_8021q.c b/net/dsa/tag_8021q.c index 5ee9ef00954e..cbdfc392f7e0 100644 --- a/net/dsa/tag_8021q.c +++ b/net/dsa/tag_8021q.c @@ -461,8 +461,8 @@ EXPORT_SYMBOL_GPL(dsa_tag_8021q_unregister); struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev, u16 tpid, u16 tci) { - /* skb->data points at skb_mac_header, which - * is fine for vlan_insert_tag. + /* skb->data points at the MAC header, which is fine + * for vlan_insert_tag(). */ return vlan_insert_tag(skb, htons(tpid), tci); }