Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3F05C4332F for ; Thu, 25 Nov 2021 15:01:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355892AbhKYPE3 (ORCPT ); Thu, 25 Nov 2021 10:04:29 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:52130 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245692AbhKYPC2 (ORCPT ); Thu, 25 Nov 2021 10:02:28 -0500 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=gqwm+WwSBdhNa5k1gRBsMXc4iKnVFzc7Y348LHychwQ=; b=l6DFNbzi1OgF0eyyCHA2Jl+BT+ Dj7hzZY7cIQOmtRjSAzCRNCrAo/MVLjkP25Gd9/mArpepnceU8KbAHpbB/Y9BUM1qlgUeb9wbexPv jdnn5BgA+4Cil8bCyFQ4917ejNf+yvsbX6iP1gBd+zN7zj/F7vc5hANWlwY+Z3KxrbEE=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mqGDO-00EcOp-PF; Thu, 25 Nov 2021 15:59:10 +0100 Date: Thu, 25 Nov 2021 15:59:10 +0100 From: Andrew Lunn To: Horatiu Vultur Cc: davem@davemloft.net, kuba@kernel.org, robh+dt@kernel.org, UNGLinuxDriver@microchip.com, p.zabel@pengutronix.de, linux@armlinux.org.uk, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2 3/6] net: lan966x: add port module support Message-ID: References: <20211123135517.4037557-1-horatiu.vultur@microchip.com> <20211123135517.4037557-4-horatiu.vultur@microchip.com> <20211125092638.7b2u75zdv2ulekmo@soft-dev3-1.localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211125092638.7b2u75zdv2ulekmo@soft-dev3-1.localhost> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > If I undestood you correctly I have tried to do the following: > > struct lan966x_ifh { > __be32 timestamp; > __be32 bypass : 1; > __be32 port : 3; > ... > }; > > But then I start to get errors from sparse: > > error: invalid bitfield specifier for type restricted __be32. Maybe look at struct iphdr. It has bitfields for the header length and the IP version. Andrew