lkml.org 
[lkml]   [2021]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v2 3/6] net: lan966x: add port module support
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

\
 
 \ /
  Last update: 2021-11-26 10:13    [W:0.411 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site