From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EB26C433F5 for ; Fri, 30 Sep 2022 14:24:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231981AbiI3OYz (ORCPT ); Fri, 30 Sep 2022 10:24:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232030AbiI3OY1 (ORCPT ); Fri, 30 Sep 2022 10:24:27 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FFC31A88EF for ; Fri, 30 Sep 2022 07:23:16 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id fn7-20020a05600c688700b003b4fb113b86so2333610wmb.0 for ; Fri, 30 Sep 2022 07:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:reply-to:user-agent:mime-version :date:message-id:from:to:cc:subject:date; bh=Q+K17a8hUK/A4pihm1n7V5b6vqDIcOGg+PRWT6sP7tg=; b=V3j6+SlXlcxzrMmeRetgpiqxi/JZmLX30wy6bO+n4W3d5Cfi80wL3rb4Wmpx6sluta wpwOZnbmkEfQxeDEbx4bJOck22t/+IQoeEKU0NO8LUz9w3AVRjoBohMxTvFRGGFWnYDN rRQW3S/5/pALNk/dOSJmmGt64Q/O+HY+SjVO48NFxEwLKYklNEDkv9wTyZoy29t6YkAc wdhgw3MhfjA90EBTEruAmWXx0cscmql9tTfoNWcmVTEYkOyaskYvk5CME88wNUO7Rr80 GgapGuE+BnTh7v8zrms818HdjYcdUl2q0nLbGZarCGuqXjBjEx4OofXLfJM6Z/Xl9ZDy /x2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:reply-to:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date; bh=Q+K17a8hUK/A4pihm1n7V5b6vqDIcOGg+PRWT6sP7tg=; b=5ZvN2zXyawVN1wbl3hP3M4lLyKQheg5MmiZATQEpvS/Xyv4oyevuLu9T8XBR760QkQ WmKDo08n0KOSEDo08Gn3eSOMYgSjf2WS4EKiWBBSOcbCpvVvztTeJ638cJQG+JFzM18U A9IR2BUJtEA8lVg/NHRx40FaOhVVxDuUC1yH7DTK3VlNB4fcVroEskWH7jHTDEIjHzkI 6Y6SzXru4NpQ423QUsYoJpBl9mzwF+fD/vOwcGFaQTwPVWHtldV5ehI29bMEHZrdXY8Q 4ivEDb9VyRpvTkfonj8Wp2KsJp0cOJhdeyeAS1wqmrnP9GYsi6CvC+rh4QTOUHN4NqXu 7ocA== X-Gm-Message-State: ACrzQf3uAi0s0AJYGfKFvH8LgxQoQVMAPFrvY+8OWq2+ov8lRXSXJxcp c4e9QLYyJMP6GsXJUeTYS9ccsKWwhxE4EQ== X-Google-Smtp-Source: AMsMyM4vPT5aU3+PEJUTKL+dPzTJukSae3pGzytbCFPo9MS4uwoQD+KTdE33yEJ5kbhaG56jpCxPwQ== X-Received: by 2002:a05:600c:3d17:b0:3b4:adc7:976c with SMTP id bh23-20020a05600c3d1700b003b4adc7976cmr14099120wmb.108.1664547788645; Fri, 30 Sep 2022 07:23:08 -0700 (PDT) Received: from ?IPV6:2a01:e0a:b41:c160:eccf:bbfd:a57d:90d5? ([2a01:e0a:b41:c160:eccf:bbfd:a57d:90d5]) by smtp.gmail.com with ESMTPSA id bg33-20020a05600c3ca100b003a5f4fccd4asm7320300wmb.35.2022.09.30.07.23.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Sep 2022 07:23:08 -0700 (PDT) Message-ID: Date: Fri, 30 Sep 2022 16:23:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Reply-To: nicolas.dichtel@6wind.com Subject: Re: [PATCHv5 net-next 2/4] net: add new helper unregister_netdevice_many_notify Content-Language: en-US To: Hangbin Liu , netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Ido Schimmel , Petr Machata , Florent Fourcot , Nikolay Aleksandrov , Guillaume Nault , David Ahern References: <20220930094506.712538-1-liuhangbin@gmail.com> <20220930094506.712538-3-liuhangbin@gmail.com> From: Nicolas Dichtel Organization: 6WIND In-Reply-To: <20220930094506.712538-3-liuhangbin@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Le 30/09/2022 à 11:45, Hangbin Liu a écrit : > Add new helper unregister_netdevice_many_notify(), pass netlink message > header and port id, which could be used to notify userspace when flag > NLM_F_ECHO is set. > > Make the unregister_netdevice_many() as a wrapper of new function > unregister_netdevice_many_notify(). > > Suggested-by: Guillaume Nault > Signed-off-by: Hangbin Liu [snip] > @@ -10860,7 +10864,7 @@ void unregister_netdevice_many(struct list_head *head) > dev->netdev_ops->ndo_uninit(dev); > > if (skb) > - rtmsg_ifinfo_send(skb, dev, GFP_KERNEL, 0, NULL); > + rtmsg_ifinfo_send(skb, dev, GFP_KERNEL, pid, nlh); > > /* Notifier chain MUST detach us all upper devices. */ > WARN_ON(netdev_has_any_upper_dev(dev)); > @@ -10883,6 +10887,12 @@ void unregister_netdevice_many(struct list_head *head) > > list_del(head); > } > +EXPORT_SYMBOL(unregister_netdevice_many_notify); Is this export really needed? > + > +void unregister_netdevice_many(struct list_head *head) > +{ > + unregister_netdevice_many_notify(head, NULL, 0); > +} > EXPORT_SYMBOL(unregister_netdevice_many); > > /**