From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [PATCH net] ipvlan: call dev_change_flags when reset ipvlan mode Date: Tue, 19 Jun 2018 14:10:18 -0700 Message-ID: References: <1529330677-15328-1-git-send-email-liuhangbin@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Linux Kernel Network Developers , Stefano Brivio , Paolo Abeni , David Miller , Mahesh Bandewar To: Hangbin Liu Return-path: Received: from mail-pg0-f66.google.com ([74.125.83.66]:43494 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757273AbeFSVKj (ORCPT ); Tue, 19 Jun 2018 17:10:39 -0400 Received: by mail-pg0-f66.google.com with SMTP id a14-v6so420751pgw.10 for ; Tue, 19 Jun 2018 14:10:38 -0700 (PDT) In-Reply-To: <1529330677-15328-1-git-send-email-liuhangbin@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Jun 18, 2018 at 7:04 AM, Hangbin Liu wrote: > @@ -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().