lkml.org 
[lkml]   [2021]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 net-next 10/10] net: dsa: microchip: add support for vlan operations
From
Date
On Sat, 2021-07-31 at 18:08 +0300, Vladimir Oltean wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
>
> On Fri, Jul 23, 2021 at 11:01:08PM +0530, Prasanna Vengateshan wrote:
> > +static int lan937x_port_vlan_add(struct dsa_switch *ds, int port,
> > +                              const struct switchdev_obj_port_vlan *vlan,
> > +                              struct netlink_ext_ack *extack)
> > +{
> > +     bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
> > +     struct ksz_device *dev = ds->priv;
> > +     struct lan937x_vlan vlan_entry;
> > +     int ret;
> > +
> > +     ret = lan937x_get_vlan_table(dev, vlan->vid, &vlan_entry);
> > +     if (ret < 0) {
> > +             NL_SET_ERR_MSG_MOD(extack, "Failed to get vlan table\n");
>
> The NL_SET_ERR_MSG_MOD function already adds the \n at the end.

i will remove \n from other places as well for NL_SET_ERR_MSG_MOD.

>
> > +             return ret;
> >
> > +
> > +     /* change PVID */
> > +     if (vlan->flags & BRIDGE_VLAN_INFO_PVID) {
> > +             ret = lan937x_pwrite16(dev, port, REG_PORT_DEFAULT_VID,
> > +                                    vlan->vid);
> > +             if (ret < 0) {
> > +                     NL_SET_ERR_MSG_MOD(extack, "Failed to set pvid\n");
> > +                     return ret;
> > +             }
> > +     }
> > +
> > +     return 0;
> > +}
>
> Side question: do you think the ds->configure_vlan_while_not_filtering = false
> from ksz9477.c and ksz8795.c serve any purpose, considering that you did
> not need this setting for lan937x? If not, could you please send a patch
> to remove that setting from those 2 other KSZ drivers? Thanks.

Sure, I will add this patch in my next submission.


\
 
 \ /
  Last update: 2021-08-02 12:48    [W:0.066 / U:4.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site