lkml.org 
[lkml]   [2017]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH net-next 17/18] net: dsa: mv88e6xxx: support the VTU Page bit
Date
Hi Andrew,

Andrew Lunn <andrew@lunn.ch> writes:

>> + if (val & GLOBAL_VTU_VID_PAGE)
>> + entry->vid |= 0x1000;
>
> I'm undecided myself, so i will just bring it up for discussion.
>
> Maybe it would be more readable to say:
>
> entry->vid += 4096;
>
> ???

VID values are usually 12-bit. Marvell uses 13-bit VID values for the
88E6390 family. Because Marvell is Marvell, the 13th bit of the VID is
the 14th bit of the VID register.

It feels natural to me to stay bitwise here when handling VID values.

That's not a big deal though, one can make it clearer later if needed.

Thanks,

Vivien

\
 
 \ /
  Last update: 2017-04-28 16:27    [W:0.099 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site