Thread (8 messages) read the whole thread 8 messages, 3 authors, 2018-07-02

Re: [PATCH net] ipvlan: call dev_change_flags when reset ipvlan mode

From: Cong Wang <hidden>
Date: 2018-06-19 21:10:39

On Mon, Jun 18, 2018 at 7:04 AM, Hangbin Liu [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -94,10 +95,13 @@ static int ipvlan_set_port_mode(struct ipvl_port *port, u16 nval)
                        mdev->l3mdev_ops = NULL;
                }
                list_for_each_entry(ipvlan, &port->ipvlans, pnode) {
+                       flags = ipvlan->dev->flags;
                        if (nval == IPVLAN_MODE_L3 || nval == IPVLAN_MODE_L3S)
-                               ipvlan->dev->flags |= IFF_NOARP;
+                               dev_change_flags(ipvlan->dev,
+                                                flags | IFF_NOARP);
                        else
-                               ipvlan->dev->flags &= ~IFF_NOARP;
+                               dev_change_flags(ipvlan->dev,
+                                                flags & ~IFF_NOARP);
You need to check the return value of dev_change_flags().
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help