lkml.org 
[lkml]   [2015]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops
> +int mv88e6xxx_port_vlan_add(struct dsa_switch *ds, int port, u16 vid,
> + u16 bridge_flags)
> +{
> + struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
> + struct mv88e6xxx_vtu_entry entry = { 0 };
> + int prev_vid = vid ? vid - 1 : 4095;
> + int i, ret;
> +
> + /* Bringing an interface up adds it to the VLAN 0. Ignore this. */
> + if (!vid)
> + return 0;
> +
> + /* The DSA port-based VLAN setup reserves FID 0 to DSA_MAX_PORTS;
> + * we will use the next FIDs for 802.1q;
> + * thus, forbid the last DSA_MAX_PORTS VLANs.
> + */
> + if (vid > 4095 - DSA_MAX_PORTS)
> + return -EINVAL;

I'm not sure about this. I've setup systems where i've used VLANs from
the top down to differentiate them from other VLANs going from the
bottom up. We might want to dynamically assign FIDs to VLANs rather
than have a static mapping.

Andrew


\
 
 \ /
  Last update: 2015-06-02 15:41    [W:0.224 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site