Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp22362606rwd; Fri, 30 Jun 2023 07:10:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlGnjpRn+Q1nxApzPRwhhWSp0JJ9dZswHf7Ku6dzQCP6bwuDyqtbRFAH4i2f1xbE3rrvkv4z X-Received: by 2002:a05:6870:64a9:b0:1b0:1388:b58a with SMTP id cz41-20020a05687064a900b001b01388b58amr3537540oab.52.1688134256573; Fri, 30 Jun 2023 07:10:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688134256; cv=pass; d=google.com; s=arc-20160816; b=vUGnrlXu3Y7UYJhDYR+v5hEnCnxxaDVVACaafzQ9QJKel83X58WEugLtAJPwVeiPST OpNoRzl2G9bGDMLpNWUgb5mpNpVJZAsf2WiMS3BDJNo5qn8e45f5ePa+rGhoU3SZHRet PBXiKgLXFQLIg1YWvDXXBJVCva/xGJ8HkwyPcDHuEi6gagSsiQ5cKto0jveJxIeJHRZw JsRuZfJGuidqsny2snvxnQVq+yg7vxTLdMb60wg1ZBisXL1Ru9C9ZFW0ser7VEpuFtho yNpdCiojUEovFyfo8YBGKp6jwUpyS+O36SuM2gyzguCO8p2xAEtj3bvO7iWPiL87N79P msOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=sAB7sIDgzQe7EhV78Alk29UXC8OSsbgPwvJ+50MCzYs=; fh=ybfAPN1F4cLOXBl1bJuYJ4w1RoFk7NWPGOI8tNZZCTw=; b=v6J45FujvSwvC7YFi4jkkgXhQdrw2NDkifT/N4aBk7gWgMMmqgfGFkdlrUNOGg4pJY n6vSRJPc+6351EP/btc/+F+EkLvu8BB0FOHgkGmpS/sKH5Fok39a+cRSpNGaujmbo1cP GHrUGicd97Bry/Vh6KHymPknB1FdXWfaUEYQuPHAYxOcnhGUgdiTacFmAfAKxkwJnKPx SGYf68QSa1OQEI6To5VZFk1ydXZuCkt/S8dMo/jNlEt4M7xIsiIBFErlmuym+Wspxmhv 4CSNrjM7c0HsJpkG/7l2nD7WF73EW8FoRp3VfBtSXwFNx9X2iQkH4Fy5zlkUdYu+RbU7 rqyA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b="WsmbZ/hG"; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.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=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hi24-20020a17090b30d800b002563db5c4b0si11451706pjb.184.2023.06.30.07.10.43; Fri, 30 Jun 2023 07:10:56 -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=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b="WsmbZ/hG"; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.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=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232504AbjF3N3i (ORCPT + 99 others); Fri, 30 Jun 2023 09:29:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229503AbjF3N3g (ORCPT ); Fri, 30 Jun 2023 09:29:36 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2138.outbound.protection.outlook.com [40.107.220.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6506B170E; Fri, 30 Jun 2023 06:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dntjOS3vo6AtsS62A0cIYhlCVR3BkGvUXvsgzs3gmz6KpwzWy5cfR7Ke8FaQfE3PymNqFaeFmteBJjcM4tsoqec7Ln+q86wzRGBug3gTsrVC0k+JK02EA6phx90sXV51GbdXd79993BTN3wrAuWpmOzjn0gHb/+O0wuW9su/BhP5uW7pvKxQtrdw9VrULV7iLrnMq1FgJKds+/l5tentJV1eVpRM12CZ4YeWuFVGJSh5G5P2Q7eZy46Rz6Y7Ps4YBHZLuf2CKe7AC+LTDMDYh0H7UoaEAtqRWVYpaivcGfto4tz/lsxaboK7Nq8NtDFKs9GRtLtQyokCDAyaAbwjeQ== 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=sAB7sIDgzQe7EhV78Alk29UXC8OSsbgPwvJ+50MCzYs=; b=jf4ZxJ4NGLbzC69EeNz96nrnz0pgtwu4TyUG6R4wJoIGl+5DTcUiRls6EGXoDunCmbZ3TnpGhqgGuevksrgAB3+lm4ycQsi06/awWAR3BXe5d7zNQQ83+SucCoI4ayZyY2yUrvpEUoaHi/zQcL3nCPAgq4Eq17TRwqOnCaS4Gw7KUzyVb4ojKo4a3jS4y1D7cC/KNOharZqfscYwGXIqq7bUlPKdcZNjOQLNNQAwNclgl23XCQGeBsvueQwFqhA9zMX03W9KqK2xHWRK3QRwfY4As75mss8kfcUceCzjqmPo+MDJ4dtZcPk9IloSRsipP8t10XIS7fFfnyhKy4FnIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sAB7sIDgzQe7EhV78Alk29UXC8OSsbgPwvJ+50MCzYs=; b=WsmbZ/hGzzJFVSUnb7oMfLbw+A58mVf5QiSW0DB/McNuASXZ7YZYERmKmSnEzTlDBrLCPsbi8jy8QOjZbZ3mCllRL/Zbc35RMLBuuGgPJ6nePcLuGfmU8KjhxUxPnIWKpRx5/gd7DqQPCev3BnXBpKA2pepFXtRgghItz9jsCrw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by CH2PR13MB3768.namprd13.prod.outlook.com (2603:10b6:610:95::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.19; Fri, 30 Jun 2023 13:29:31 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::eb8f:e482:76e0:fe6e]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::eb8f:e482:76e0:fe6e%5]) with mapi id 15.20.6544.019; Fri, 30 Jun 2023 13:29:31 +0000 Date: Fri, 30 Jun 2023 15:29:25 +0200 From: Simon Horman To: Vladimir Oltean Cc: netdev@vger.kernel.org, Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org Subject: Re: [PATCH net 1/2] net: dsa: tag_sja1105: fix MAC DA patching from meta frames Message-ID: References: <20230629141453.1112919-1-vladimir.oltean@nxp.com> <20230629141453.1112919-2-vladimir.oltean@nxp.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230629141453.1112919-2-vladimir.oltean@nxp.com> X-ClientProxiedBy: AM0PR03CA0074.eurprd03.prod.outlook.com (2603:10a6:208:69::15) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|CH2PR13MB3768:EE_ X-MS-Office365-Filtering-Correlation-Id: b1743f72-3ace-4b9d-d40b-08db796e097e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sP31QXd9ivrVpJTQ00wkEZhZBE+1UcYEtW2GIDXWseb79ORDtga/wcgSmalDBUx+Q7ZzY7mH1+RkpdiJ9HS1jm7lm49IlZxcG8WRuA/jhaS852wqPTMc+a33ze4W/CKWrRQa63mg4uJJJtTxG3iR3z9uXpY4pbr7O0idR9sKeI510qXkeMLwszwXaqrkkrMNkRo2iC0W8YLjfJSBj3vI8DI/duLfTjmkFPI7lvDi+9JiWL0+B9dWfwxOqUWtnPbx1WKZpbYGt7Vqh4zG0jdXVawE8URfwrYS2Zgml+hLDbBNS7K4vx/b++xCS9iy6cv86tWh2ugZNuXWSAsow1XJp1IUzRsLcarPZpkNgb3FYVWM4UGRFJVPF9RRc6YbF90bmvkfDI9/DKVBWAZOxDyaPESJx7E7Uv2wIG4v3hZK9oktbSxK6g9g5ZfA6+dE6TnSRIy6axf6QLpkzH9yL5/aEtuYgWYNwTPrG1MvlPyqKcQqiz9v4RXpa42j5u+EpojMXyrW0IUZ7ACtC8g0J088rwR0swd6hXVq+/xsE3rAK8WJUrXygF8zZ/sq3h2Xyv3BGeDuh6vr6POwFx+FXhnu/wgAOVrMyZ9zl6R9zIZfHIB3w4Q4OfnMH+Hwvo+DrE6ig+O/BvxBgjZext0kU8uiVA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39840400004)(346002)(136003)(376002)(366004)(396003)(451199021)(6486002)(6666004)(44832011)(8936002)(8676002)(478600001)(5660300002)(86362001)(41300700001)(316002)(6916009)(4326008)(54906003)(66556008)(66476007)(66946007)(2906002)(4744005)(186003)(6512007)(6506007)(2616005)(38100700002)(36756003)(67856001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?X3SH0cBneBYAwcxsuaCuPtHVLfc4OLQiuCWsr/ygGe3LCrah5OKDgpX4Edy6?= =?us-ascii?Q?RcDscR4Itm2+B4iS4FdDLZySzHW3iY70Xmm1RRvvIFEXDEjLIm8hQuDrg6BX?= =?us-ascii?Q?NsyVYanYYcuLBw2R+Arx3upUMrKtIFmshgOn/7yNs/6lHCQF+/sF2ofF5wWK?= =?us-ascii?Q?e39plKcmAs7izN/rlHGkv9OrR3eojLWwnRMiGhQaiCy0NU7jA1O3uWB3jn5A?= =?us-ascii?Q?xLQVWRem4gUZq3e3B81K8+rW1EtiZIEzb22jYglK00yN7Mg/YEnjhpCmOnTA?= =?us-ascii?Q?qyN6Luxvho3zM+zl22GDakC9XxzD19l/l49PfDd6gQ/Xw1hyt1Uc9tHL/nMt?= =?us-ascii?Q?vc/5i3knmII8lHP7dCd0509YD79Dz6DLPNBsSL86VzUaVFpHOy6xXrUwd1cY?= =?us-ascii?Q?kzU6WdNsD8rVKCvs6GozzGmxk5H//PWL3eFFSyioSaxumlGgpjo5ITduzR9P?= =?us-ascii?Q?BzrxfAl/28RXIOr1bMbpUYVh4iX1ZI8ABAd9nEpzE0VvjQ+Y7SZN7f+EoY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b95gC3hvHaRCn6KVMY7xY?= =?us-ascii?Q?aPs+kazzozRNLecWHVstWYsOHu7vvYV+7uMSBnl86ScKEnAD0xJ5EwSj2O6c?= =?us-ascii?Q?2x8dE8jj3L/VijjTZwpX8TBiD5cIPB5tP1QUoAVFNn7sieXmFOYWdrdKXF8Y?= =?us-ascii?Q?2sumNw9nbfvigjypj+JhiEV3q/alFihn9YYWm29QcaQv6jZr7HsnE5lWVbx1?= =?us-ascii?Q?iVfqp4LovSwR66gFp4S6grchx3q6QjZs0PRGI0/9QYfEfq5puDsfG5J7CItA?= =?us-ascii?Q?IM7Wcg=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: b1743f72-3ace-4b9d-d40b-08db796e097e X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2023 13:29:31.7240 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MrKtuHIw6ecb7x37DPoaOdzzctuEeDFhWIPmUNSVeI/15U8E8E7eXPePwPzFJxZyzfmfPga7bMGnvprUi5egb/61vxI9lsSjENNKkOlUYSs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR13MB3768 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 29, 2023 at 05:14:52PM +0300, Vladimir Oltean wrote: > The SJA1105 manual says that at offset 4 into the meta frame payload we > have "MAC destination byte 2" and at offset 5 we have "MAC destination > byte 1". These are counted from the LSB, so byte 1 is h_dest[ETH_HLEN-2] > aka h_dest[4] and byte 2 is h_dest[ETH_HLEN-3] aka h_dest[3]. > > The sja1105_meta_unpack() function decodes these the other way around, > so a frame with MAC DA 01:80:c2:11:22:33 is received by the network > stack as having 01:80:c2:22:11:33. > > Fixes: e53e18a6fe4d ("net: dsa: sja1105: Receive and decode meta frames") > Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman