Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3408836rwi; Wed, 12 Oct 2022 01:17:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Sy1HxRo8fzE1xn814TiE9oMdlaUQTltK2jgm5n2a4TAhtXCzV+QzTWmtcnh8Nkv3FBgZ5 X-Received: by 2002:a05:6402:1b08:b0:458:d229:bcac with SMTP id by8-20020a0564021b0800b00458d229bcacmr25937817edb.118.1665562634309; Wed, 12 Oct 2022 01:17:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665562634; cv=none; d=google.com; s=arc-20160816; b=G+4i3aFQW8d0sEqsgc5/gXRRljYHTMbbX1neNt2rTWo4jVAt0WdMX0U0JjMpQA06Z8 v9xFvZE0zHpMnF+6A0myeEgbyo1jpCYM9hmvTW6Ke6mRYJFQ0PrFVgfvdpMubhNn4rbk Up7Kk83dSSftfARjCh/W+Oo75FqBotNrL1rzA93+FuCG9CoRO9yHpgd3JRRr587OkeCy vQXPZS4fkyqyo1Bjg8Cgb3xSWP5V1OVBpsVwhauea2IzjR3YfCZtuWFBzuNMKfwms0sh a90RtmKCJasoiWoYZDtzXcwCudELetC/r2W9i05wHQfu6nNqGjDYHmcyi7SWv6KWsvdi 0Drw== 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=O12FuokJG81xIdymtEaWIVms4586lGlP0FbvJ/Ms9Us=; b=v7KzUMPOzZNGxqJOa1VtsSqf2bGE5fuVwDtsaIZj46c9lZ5xRouHjpX1Aff+oS7Ovl 4NBvJO4tFMFwQ0WmUiPDqGHyxamTqTbEVIsyUjubFVdUZIZjEyxUETYfOUMpkxyTzEAD ytsoITEPzyYZts/bKmuSOD/8E39nPfG5BrTtz0YLm+EJEdAektegNHYkxPQya4pk+jKx mhP5hdCFOEWv0MGEDuxL1Srd/3SuLi2N3F2WuwURVSNvgePBRHmYDieEzvBZgZX6xlD9 Dlk4LlHsDNdMM5Q49+0ZGh02BXiIdmLr0fUcnDS6SZRSlPn+KHyPHIEh/1GfhTkFAbnA QkRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EYIGBAyH; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa43-20020a17090786ab00b0078dbed58d26si5840061ejc.635.2022.10.12.01.16.48; Wed, 12 Oct 2022 01:17:14 -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=@gmail.com header.s=20210112 header.b=EYIGBAyH; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229792AbiJLH1Y (ORCPT + 99 others); Wed, 12 Oct 2022 03:27:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229768AbiJLH1X (ORCPT ); Wed, 12 Oct 2022 03:27:23 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DC39A98E4; Wed, 12 Oct 2022 00:27:22 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id qw20so35544954ejc.8; Wed, 12 Oct 2022 00:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=O12FuokJG81xIdymtEaWIVms4586lGlP0FbvJ/Ms9Us=; b=EYIGBAyHVf6K/ighbfQaUBCBRXJGccBsLUwdeHSxqrkerZpt2IrXgl6JvmFj1OMqKo Pk4UQe5ntYeXbgyj2MO7lc01swS7RTdhkTRpXUVyfNu7I0HcPCYZD2KmvgEOb6XdsvHx jG7cioT0xzxfeD9fArd0X9R9ylzufFQRJ7R1nc8YuxQtuWc6D6NadpMN3myYZXOCgoEX t9EtFJLWEW7CQ4Ri+2qblZWtwflWdWK4pOZxy3dR7vPeSmg+rGW/LaC+oxeocWQ/k42l V8SxXLqoGk+WNNpzfwobm0rYLCj7df6qmfwVGgHASJdOYrduyDlimPNvMQDTnigRIRii YiKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=O12FuokJG81xIdymtEaWIVms4586lGlP0FbvJ/Ms9Us=; b=kxDv+XtaqIzPoDrH4+lZzO9qDWBRQkDdqlX6nxyO23GkQNc79t5mVG25rngtTXq+PK YolWhWd3EeTnl3HpUtls5GKg8WwL3Ud54G0wrOEABn72s2vASAP9vMxel8A4xMDvFoor py4hufo5MrDNLaT9d0NGck4jW9f3g5lqDgpz0eaW6IRxAHScvfbqpNjPfFiklBFK1gU7 2aFqP8pIAN55nQu2CkgJU/mxdGMmrrht+Rj0aDK6ieDoXBO7rmb8lHQstzGnSmRJMBCW Ra8azB5DD7/VRW2RfNge83qfx59ec/bFnNtnzWinoT+lwQGMAD/jvQqaqnnyMbAWsY/Y UqWg== X-Gm-Message-State: ACrzQf0MzUh/4kAWyAzwEQgSi4njrNz3lYOv4D1RFom9BiMB5zL/sNJc x6IH5M0/qFInc6Ur2n4mBvA= X-Received: by 2002:a17:907:744:b0:741:36b9:d2cc with SMTP id xc4-20020a170907074400b0074136b9d2ccmr21462064ejb.613.1665559640755; Wed, 12 Oct 2022 00:27:20 -0700 (PDT) Received: from skbuf ([188.27.184.197]) by smtp.gmail.com with ESMTPSA id kf3-20020a17090776c300b0074182109623sm784344ejc.39.2022.10.12.00.27.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 00:27:20 -0700 (PDT) Date: Wed, 12 Oct 2022 10:27:17 +0300 From: Vladimir Oltean To: Christian Marangi Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , "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: <20221012072717.nuybkswd7zuwvqsp@skbuf> 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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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. By any chance, is the endianness of the data configurable?