Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3681372rwi; Wed, 12 Oct 2022 05:34:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6rHu4R9XPz3CVOQXigSD4KkHkZCHNofGCsnKHP+JPzghj/mWzmMnoYDS60rg7kPxl1VDpZ X-Received: by 2002:a05:6402:2748:b0:459:15fe:a868 with SMTP id z8-20020a056402274800b0045915fea868mr26845414edd.157.1665578043355; Wed, 12 Oct 2022 05:34:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665578043; cv=none; d=google.com; s=arc-20160816; b=qP/IFueUJFNk67lt7C9pNHzjJZcjmYAfQkDk0LmPKTQ84+zaFwGN/J9fpxdJ7wvTQF V8ghdET4Z67er5A9c9IR9s1HLaUMuFrEMH6OyMt6vxoSstNrTMnZjE05TNlLa6QEQ6Wr yIEGd2Mj7MDHnjQNucG7zboOkckFiFgKDz7K8UfSGN2i1TRFONPBdGOJY63NzS3OypMk wfB0ZhrYe1Xm1omkmp/jOACqa6DbEX9T4al2ubRii0Rzbe6ZoJ088Zb0G0lg1vJxcUh3 Y3gDLRvPbRQeE6XDEf0dlp9e+HbvOpaoghqiuxdXUt40Aj4nz5du1iHvkvU5ulmLwc7w 75Hw== 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=/5AR52X0TNzu+9Tf1HoiiB5UfdgRASn9FQlf5bRurJs=; b=EOExPYZOa3qHNd/eHYmaSzoODZ0jWIdd+dujZ1BW+6AFnNuZmOtR4m/U4yUWtEaqEq SwPAhunu9/y42l2DhnA0QmUcUC7K+iNyxNKN7P4/9Ao7bWEzOtrdE2Bx5aGa2BkvgyV3 z5vR1aRcFmblIYfNDwbjN0tSMZpoGy2IC/XEUjv7ATbSFhimnvjrB7yERpZokLbM88Sx 3ktxAfJ8NufyDf5vV3hApixislyrsef6jI8dZ0O6olPmEGisf+IRpzv72mPYH0/4hj2u zVOzAuNr/yFCowZTMsBTx2LjplbY8ublmt6MdRDQdFb34RUpqcuV+X6257eiRPpCPKPN vNJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Zsv5btHg; 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 d22-20020a056402145600b00458985e9d19si12509187edx.632.2022.10.12.05.33.37; Wed, 12 Oct 2022 05:34:03 -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=Zsv5btHg; 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 S229640AbiJLMaA (ORCPT + 99 others); Wed, 12 Oct 2022 08:30:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229698AbiJLM3w (ORCPT ); Wed, 12 Oct 2022 08:29:52 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30ACB114F; Wed, 12 Oct 2022 05:29:40 -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=/5AR52X0TNzu+9Tf1HoiiB5UfdgRASn9FQlf5bRurJs=; b=Zsv5btHgK3RCJcX0cSLZh1FMQ6 ITDqrocYHVBhqUCY9AQ7y0CaL68dwWVfJLcjYc/aZnFy0/uM+7PDdgagUk12UxoBGZHHspWXQ2hGG 4v6sKcq5v8CZYIxbTYgutpvyz0f+IB1JkBiRWG6ratl7080axkwjA4NlFBf4DudfMfP8=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oiarW-001ng0-H5; Wed, 12 Oct 2022 14:29:26 +0200 Date: Wed, 12 Oct 2022 14:29:26 +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> <63446da5.050a0220.92e81.d3fb@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <63446da5.050a0220.92e81.d3fb@mx.google.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 02:44:46PM +0200, Christian Marangi wrote: > On Mon, Oct 10, 2022 at 08:53:01PM +0200, Andrew Lunn wrote: > > > /* Special struct emulating a Ethernet header */ > > > struct qca_mgmt_ethhdr { > > > - u32 command; /* command bit 31:0 */ > > > - u32 seq; /* seq 63:32 */ > > > - u32 mdio_data; /* first 4byte mdio */ > > > + __le32 command; /* command bit 31:0 */ > > > + __le32 seq; /* seq 63:32 */ > > > + __le32 mdio_data; /* first 4byte mdio */ > > > __be16 hdr; /* qca hdr */ > > > } __packed; > > > > It looks odd that hdr is BE while the rest are LE. Did you check this? > > > > Andrew > > Yes we did many test to analyze this and I just checked with some > tcpdump that the hdr is BE everytime. That might actual make sense. The comment says: > > > /* Special struct emulating a Ethernet header */ And hdr is where the Ether type would be, which is network endian, i.e. big endian. Andrew