Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3696814rwi; Wed, 12 Oct 2022 05:46:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4uEzkxIXQ8eE1ghqluJs45chMolXyo/gg7Ork6v/p3mzfF6UGDIVIA4EA7E1U1UOa7F6oJ X-Received: by 2002:a17:902:ef89:b0:17f:8097:83bb with SMTP id iz9-20020a170902ef8900b0017f809783bbmr28192861plb.20.1665578808638; Wed, 12 Oct 2022 05:46:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665578808; cv=none; d=google.com; s=arc-20160816; b=go757o/FZN/2jey8hyN5VZzc8A4M889bVTd4saJecxYcvajqbALPEaHCiW1UgUTIXw WSGwnak9LTFj5UJWj9RYBBV0Ac3oYqJ5K6wO0wpWYwNP8PJflsTlcao3qWAlkUNYeRyp DeRIerRmT8Htvm+2pDaWSn3o7ByOj6029PQ7moeDx1oPr6HwGtiJyRAEt107Ykg98a9A 3zP5NMSHXeaqeayT62kdHq6b7bX/MebUkqUrHGyenylfaWdP/yuBSmHFWyQ1sIeGks5U 4xlY7lwhOjK6p/6bMmvPzqsZxIcM/BcqJcs2MZDR/e1wlwCdI6FltvkNf7Z2uS5Yma29 1XTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8M3Z6wLe6eoY/cEb4VbrsvOWCsbcc8c1UTHEJYNe/mc=; b=NKDi9XX1XznYhNgVFSkEhv6xn1+wzL9Ix7hNn2MFAlbNvqUH8IWRY2a7TQp1V4l4Rj m8rgqAFrtVl5dW33qsVvuwfhx97H6Nnuhi7CEvlHIKqGqkE6E9TkGfmdR6q8i+JGfGh3 ZG15aZY2B5R4kggbYYZtqyp68arez9sFE4wHoU9w5cNNHp0jIHTwKCgMVCiM5zM6F+YQ 6iFMS5VMGotuVMGG8CfAi5fuGf7++yXZYFAo8QVqeIRhhoo8O82SThpsYo5WV8tKlI6m OAVrapxbDJJK/Aa673YtF5/HpagSLv+OjtOdQOwTrKQCxCu5imgh9W+Ikp0m9+Tp+nE4 JuXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=fCZp5XI+; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 134-20020a62178c000000b00565ba4c501asi879914pfx.276.2022.10.12.05.46.35; Wed, 12 Oct 2022 05:46:48 -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=@lunn.ch header.s=20171124 header.b=fCZp5XI+; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229470AbiJLMb3 (ORCPT + 99 others); Wed, 12 Oct 2022 08:31:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229715AbiJLMb2 (ORCPT ); Wed, 12 Oct 2022 08:31:28 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADD01BE2F5; Wed, 12 Oct 2022 05:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=8M3Z6wLe6eoY/cEb4VbrsvOWCsbcc8c1UTHEJYNe/mc=; b=fCZp5XI+bjl88Wf0DbWiNuXufH nG7QWIGkitwwJIvsirFikWHxcxyDczxFz5iIhdCrCZl+bWCl72DDVprG5mZ6bcJkTKSYp2a9k9mya yiLPWBCvaz8VjTD0NGxag7Djnkqvnu+3V17WH/wA6HelckqoEGJAUABxnbVolejo9TJw=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oiatL-001ngz-PF; Wed, 12 Oct 2022 14:31:19 +0200 Date: Wed, 12 Oct 2022 14:31:19 +0200 From: Andrew Lunn To: Christian Marangi Cc: Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Russell King (Oracle)" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Pawel Dembicki , Lech Perczak Subject: Re: [net PATCH 1/2] net: dsa: qca8k: fix inband mgmt for big-endian systems Message-ID: References: <20221010111459.18958-1-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221010111459.18958-1-ansuelsmth@gmail.com> 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_PASS,SPF_PASS 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 Mon, Oct 10, 2022 at 01:14:58PM +0200, Christian Marangi wrote: > The header and the data of the skb for the inband mgmt requires > to be in little-endian. This is problematic for big-endian system > as the mgmt header is written in the cpu byte order. > > Fix this by converting each value for the mgmt header and data to > little-endian, and convert to cpu byte order the mgmt header and > data sent by the switch. > > Fixes: 5950c7c0a68c ("net: dsa: qca8k: add support for mgmt read/write in Ethernet packet") > Tested-by: Pawel Dembicki > Tested-by: Lech Perczak > Signed-off-by: Christian Marangi > Reviewed-by: Lech Perczak Reviewed-by: Andrew Lunn Andrew