Subject: Re: [PATCH net-next v2] bonding: Always assign be16 value to vlan_proto

From: Simon Horman <[email-masked]>
Date: Fri, 12 May 2023 11:30:12 +0200

On Fri, May 12, 2023 at 11:29:06AM +0200, Simon Horman wrote:
> On Thu, May 11, 2023 at 04:43:57PM -0700, Jay Vosburgh wrote:
> > Simon Horman <[email-masked]> wrote:
> > 
> > >The type of the vlan_proto field is __be16.
> > >And most users of the field use it as such.
> > >
> > >In the case of setting or testing the field for the special VLAN_N_VID
> > >value, host byte order is used. Which seems incorrect.
> > >
> > >It also seems somewhat odd to store a VLAN ID value in a field that is
> > >otherwise used to store Ether types.
> > >
> > >Address this issue by defining BOND_VLAN_PROTO_NONE, a big endian value.
> > >0xffff was chosen somewhat arbitrarily. What is important is that it
> > >doesn't overlap with any valid VLAN Ether types.
> > 
> > As I think you mentioned, 0xffff is marked as a reserved ethertype.
> 
> Yes, it seems that I did. It is reserved in RFC-1701.
> 
> I can work it into the patch description if you like - there is no
> particular reason I didn't for v2.
> 
> [1] https://lore.kernel.org/all/[email-masked]/
> [2] https://www.rfc-editor.org/rfc/rfc1701.html
> [3] https://www.iana.org/assignments/ieee-802-numbers/ieee-802-numbers.xhtml

I guess there will be no v2 as v2 was accepted :)

  - [net-next,v2] bonding: Always assign be16 value to vlan_proto
    https://git.kernel.org/netdev/net-next/c/c1bc7d73c964

In any case, this is now documented in the ML archives.