Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp6622881rwb; Tue, 9 Aug 2022 20:23:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR4GcmO29FMpvvUzmqP7c7rIGPdi91tN0BZ5OXDI0QgJfUxW2J/pP6ed0Anj//Eh5KGFKYOk X-Received: by 2002:a17:902:db06:b0:16f:16b7:69d0 with SMTP id m6-20020a170902db0600b0016f16b769d0mr25652631plx.145.1660101784639; Tue, 09 Aug 2022 20:23:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660101784; cv=none; d=google.com; s=arc-20160816; b=wEXy8tKuuB+CQq9v4c6rd8132/Y5jvRbItTrD9knRplA78b4p/aoSndLnGCmAzhj9X dAqCN/6+VGfn38wiWkBifxczI+jEl0C87sKa6UMOLaCWT+fmRRNbHkNUTGSvwx5ckDuT 7qb3h+Lfj/uKhpLFOrNHoyM2dX9FrwrD+rPaeIHGQlrqa+wjLEBNr614at9nrSr4uR7D u+fp5h47FN6l/db/r8NqEtrVpaQJOKhA13NxRiuWkOjlLMQGbFZ2pzGvp2F6l0b2Xtpv +1Gdbc6j+TZ83bcFBBC7cQsklwAc4qYwLRiOPe8498DJ9wAiis1L3Qf/7YYzBo3bcTBC 5p8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jHImZVkI//te5SMl1xxH/2vTsjBJiQGrltsOXeaVLiI=; b=lhHBxjK7Z9eqtteHXh8oksuWRAaMj9ARCEKSJfiaxBEiJOxWCU+GEtR+HGTZsYE1io gc7UKZF8RSR0xB5zzBfpFtFiYxk1wA0PGf6kzdOx5t8nCO6TnlkwmKPLKQ8k0LPVTM2x GzJvjYDRDp7TDsHyuE4574X73okpOgAAfQVOoWgi3Ps+amDVAR2bcJ/Hrbk5V+8Ks47X m/CfPfnRsePeflaR4ToWPGHzYn62cgDMzC1r6y34HkSYbqCzpIpQK9oH7xXq5Q3cehSg FQSBveY7HwzI3bSzblYsEVaUrIrw3VUu8Ek6PsvQVJo3LthTGlyPWt4irF7cSec8+6Uf NfZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qyr6zLW6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k66-20020a628445000000b0052ee88f59c4si1358070pfd.372.2022.08.09.20.22.47; Tue, 09 Aug 2022 20:23:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qyr6zLW6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230184AbiHJDLy (ORCPT + 99 others); Tue, 9 Aug 2022 23:11:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229917AbiHJDLq (ORCPT ); Tue, 9 Aug 2022 23:11:46 -0400 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9207B81B03; Tue, 9 Aug 2022 20:11:45 -0700 (PDT) Received: by mail-qt1-x831.google.com with SMTP id c20so429023qtw.8; Tue, 09 Aug 2022 20:11:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=jHImZVkI//te5SMl1xxH/2vTsjBJiQGrltsOXeaVLiI=; b=qyr6zLW6SssRFEFqPcOIUy5mytX++/xNFFW8KTB/D8XOB26CCWcxROaVbSBwKd7SJY yNt4b3rzSSJ/6qpZgkMOy8AcvPRP/vHFIvVm9k7nLkfbkCqnkt/Y1rHeeDF3ePZUIpNK +D0rXnBDU94s7DlKNGF1AuejkuGRaCd1WNG10KY5gYmybHVgazQ08i3IwkBXrCa7QRwf 81ASdXIRNRYWQ/leISfXEf9wlqf29Z/9pQrLipXgMhesfhyLrNjHRIwLV/RJ0d0jOwwW kwi+UiSG3e/7gspP+UYg2v8H+IzEYjKHcJwrsyQliM1MO0JsHMgTh4FunrhPsJkTFwgS 7DBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=jHImZVkI//te5SMl1xxH/2vTsjBJiQGrltsOXeaVLiI=; b=V+lJzizyEx5Ks1Yoae6fJKBVgcPUHQVK4xhAGu+m1fkETPsHehoCZSbwvTscVVt2He dUsDMKf3fug4TjfR7cgePCp9I0HC7yv4bLeLhdUM5V02e0hMlOF+nvfL7UCYapzPTsri 03HR6pw4/zEPpPzMuVdyXESr/onosG/upckA5Sdi6bb7Q95Pelsy22g860BMXNCa5T+V Y3fa7iZ//pZsnlwrYHRIFykuQ7ppRzYKyKvkTZvLBtYyIfPTCf0ezFhJlSBCtKQStUnu hxWLxP+kkqtVoPf/4EgQT3GdgspiM/tzd/gugdw2vbFvy1qNt47eLDY65QPGPf/Hlgay 0XvA== X-Gm-Message-State: ACgBeo2/+7eDA9xapHFZDemiDKnIEf2SFTLgYbAFpHBkXachg2LGjFnQ JSKa9aWVTn51k0WSOF1c8Zs= X-Received: by 2002:a05:622a:1b01:b0:343:582f:3e07 with SMTP id bb1-20020a05622a1b0100b00343582f3e07mr1200591qtb.578.1660101104647; Tue, 09 Aug 2022 20:11:44 -0700 (PDT) Received: from euclid ([71.58.109.160]) by smtp.gmail.com with ESMTPSA id i4-20020a05622a08c400b00342b7e4241fsm9743926qte.77.2022.08.09.20.11.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Aug 2022 20:11:44 -0700 (PDT) From: Sevinj Aghayeva To: netdev@vger.kernel.org Cc: aroulin@nvidia.com, sbrivio@redhat.com, roopa@nvidia.com, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Nikolay Aleksandrov , linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org, Sevinj Aghayeva Subject: [PATCH RFC net-next 1/3] net: core: export call_netdevice_notifiers_info Date: Tue, 9 Aug 2022 23:11:19 -0400 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When a bridge binding flag is changed for a vlan interface, the vlan_dev_change_flags function in the 8021q module is called. Currently, this function only sets the flag for the vlan interface and returns, which results in a buggy behavior; it also needs to let the bridge module module know that upper device for the bridge has changed by propagating NETDEV_CHANGEUPPER event. This event can be triggered using call_netdevice_notifiers_info function, so export this function. Signed-off-by: Sevinj Aghayeva --- include/linux/netdevice.h | 2 ++ net/core/dev.c | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 2563d30736e9..d17ef56c8a06 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -2898,6 +2898,8 @@ netdev_notifier_info_to_extack(const struct netdev_notifier_info *info) } int call_netdevice_notifiers(unsigned long val, struct net_device *dev); +int call_netdevice_notifiers_info(unsigned long val, + struct netdev_notifier_info *info); extern rwlock_t dev_base_lock; /* Device list lock */ diff --git a/net/core/dev.c b/net/core/dev.c index 30a1603a7225..50e7483946e0 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -160,8 +160,6 @@ struct list_head ptype_base[PTYPE_HASH_SIZE] __read_mostly; struct list_head ptype_all __read_mostly; /* Taps */ static int netif_rx_internal(struct sk_buff *skb); -static int call_netdevice_notifiers_info(unsigned long val, - struct netdev_notifier_info *info); static int call_netdevice_notifiers_extack(unsigned long val, struct net_device *dev, struct netlink_ext_ack *extack); @@ -1927,8 +1925,8 @@ static void move_netdevice_notifiers_dev_net(struct net_device *dev, * are as for raw_notifier_call_chain(). */ -static int call_netdevice_notifiers_info(unsigned long val, - struct netdev_notifier_info *info) +int call_netdevice_notifiers_info(unsigned long val, + struct netdev_notifier_info *info) { struct net *net = dev_net(info->dev); int ret; @@ -1944,6 +1942,7 @@ static int call_netdevice_notifiers_info(unsigned long val, return ret; return raw_notifier_call_chain(&netdev_chain, val, info); } +EXPORT_SYMBOL(call_netdevice_notifiers_info); /** * call_netdevice_notifiers_info_robust - call per-netns notifier blocks -- 2.25.1