From: Horatiu Vultur <horatiu.vultur@microchip.com>
To: Andrew Lunn <andrew@lunn.ch>
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
Date: Fri, 26 Nov 2021 10:12:21 +0100 [thread overview]
Message-ID: <20211126091221.tzrqsgawavlzitp5@soft-dev3-1.localhost> (raw)
In-Reply-To: <YZ+kvpCmWomKNr9l@lunn.ch>
The 11/25/2021 15:59, Andrew Lunn wrote:
Hi Andrew,
>
> > 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.
I think it would get pretty messy to add all these defines in the
lan966x_ifh struct. One reason is that the IFH contains 38 fields.
I have send another version(v4) where I think I have simplified it a little
bit more. If you think is still not clear enough, I will try again the
approach that you proposed.
>
> Andrew
--
/Horatiu
next prev parent reply other threads:[~2021-11-26 9:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-23 13:55 [PATCH net-next v2 0/6] net: lan966x: Add lan966x switch driver Horatiu Vultur
2021-11-23 13:55 ` [PATCH net-next v2 1/6] dt-bindings: net: lan966x: Add lan966x-switch bindings Horatiu Vultur
2021-11-23 13:55 ` [PATCH net-next v2 2/6] net: lan966x: add the basic lan966x driver Horatiu Vultur
2021-11-23 15:31 ` Denis Kirjanov
2021-11-24 8:13 ` Horatiu Vultur
2021-11-24 3:30 ` Jakub Kicinski
2021-11-24 8:14 ` Horatiu Vultur
2021-11-23 13:55 ` [PATCH net-next v2 3/6] net: lan966x: add port module support Horatiu Vultur
2021-11-24 17:59 ` Andrew Lunn
2021-11-25 9:26 ` Horatiu Vultur
2021-11-25 14:59 ` Andrew Lunn
2021-11-26 9:12 ` Horatiu Vultur [this message]
2021-11-23 13:55 ` [PATCH net-next v2 4/6] net: lan966x: add mactable support Horatiu Vultur
2021-11-23 13:55 ` [PATCH net-next v2 5/6] net: lan966x: add ethtool configuration and statistics Horatiu Vultur
2021-11-23 13:55 ` [PATCH net-next v2 6/6] net: lan966x: Update MAINTAINERS to include lan966x driver Horatiu Vultur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211126091221.tzrqsgawavlzitp5@soft-dev3-1.localhost \
--to=horatiu.vultur@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).