Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp150314img; Wed, 27 Mar 2019 19:15:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwO+xCMfjPGaxeWw1pHiBCTgfF+A1qLHzjdglpuWwBQCiIA6T749tEgY6jJmGGO6W8kUpQM X-Received: by 2002:a17:902:a5c9:: with SMTP id t9mr39065960plq.196.1553739341334; Wed, 27 Mar 2019 19:15:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553739341; cv=none; d=google.com; s=arc-20160816; b=enxUo/wUXxbgdjAp01i+6qX5po2t3o6RAnhk8HYZPF0dANE2MMDebP9DHCQThGIKGf UqzQD/6JqHwP6I4PP5bPU9IgR428wQShYysX5fov8Q1tzvq2ummTgnauyG8NOwDssrE2 1mnl58ZIz/duBxmsiqrAt0SwSTU7TiuG1noqjGc2i96uPh+nACNwxdxvXAunXEXwZziG gp6ZDLh1+gWxqnccv2eGf+xxay6TiVp8sLm1P6IvGbKmbaXZ0xLdyU0W3UHEStrw32So 4JKIVTt2LQ4uYMJMUjWgZGUk6pMAZsMLPGjwjDjZYpyoFDnYICCJY8TdJjX1326b6RXg 3goQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject:dkim-signature; bh=WcIfSuDzcVqJnqzpsrMSqQpY9TJgfHhhgtnvEmSCiNQ=; b=Z4zw/iaJ5NZOo3D6rYQ4moV76Z98Mxz/3CavWXT//nHrcslytJLa4u1FQtXCWEfkX+ Ny4qsZVJ4squbBIKvdB2miZbvyHPNgRSa+P/GRJ5pI7qFaW5Pe6NyxmPFs+AzgyxZfNL I6Rbe2lVg3DlvEgwfwVrvevPfbK0wJpXkgycNt+EeW7O+hTJSLon7/tfPQku//Vc2T0m 1yG3aVu+sHOgNbLv9pfhBKnWRRuyVBMJ9lDHnevTTXUzYjfsoHd5FgyVdBmxdGSLTjXN ykTGX9U1RQ4FyF6QimANdfti3Put/xoUILqz+toJxseEFLjIQalm54mD7m8TYx/WpQJE vbaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lQ+X+HeE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si20694016plt.28.2019.03.27.19.15.25; Wed, 27 Mar 2019 19:15:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lQ+X+HeE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728087AbfC1COu (ORCPT + 99 others); Wed, 27 Mar 2019 22:14:50 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:37043 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfC1COt (ORCPT ); Wed, 27 Mar 2019 22:14:49 -0400 Received: by mail-pl1-f196.google.com with SMTP id q6so4208219pll.4; Wed, 27 Mar 2019 19:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:openpgp:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=WcIfSuDzcVqJnqzpsrMSqQpY9TJgfHhhgtnvEmSCiNQ=; b=lQ+X+HeEN4NUPNA+AH698sHgAzSRAqM5EegpFBbYOZhPIf1c13Py0HIGMPokGoOGVy I/+B+MqD0l5sUnna9kmcTCAJLKC+qkAItFs7kbKoVsaxX6M5fQL/uECTTNbMO9lhLVlA /lzeneWnKqONxjRiQ+3l+MJHye0gWpwpVeXy0Z01nQhjhiLHT1jtGPfzfj4MX5JbHyW1 LtHOtDxxuOfP7gL3KCQxcop4BEX4AreJo/FprqizPke7+amMian8MkSWQGyZ0ZKWhErt g0WCdBA8tvZsGzrlRUeTTsf4DyVXLnGtiVUz5jh52F18+i70M4Wu4YN4YrfGACz20tk3 He3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WcIfSuDzcVqJnqzpsrMSqQpY9TJgfHhhgtnvEmSCiNQ=; b=iHYkBc7/ukYImLgTK6xuurZBBLPLff5JMA5Gl+ikiF2IJ2Xi0v0YCYcGbnywS5XtBt 2SGDXNK+si5+XCzHbv/yLsphFvJuYCosIoUqbfJyqy+k618amDvVohY1oE6QPp6WAhAs 7BxrDqDFDOO/w7nKxHNEKsnQ9K7pJWAYjnSUfG+P3ZmR1wS923wFnAUaskU8R/FV3RrF 55VFeJYqJ1qPhXVGZ4gdOu29lIFWAg0X5uRpb95RHpmxa7uZOE6hVYIge43LpLeRvpaF L+lH9A9htXccVgw2D9znNY90UQXQA/sPifNegOANoHnyMWItBm4qnYsVD2wCCNJfpjcK Z7rg== X-Gm-Message-State: APjAAAVAYTHW5sE+OeF/ARAqEH0YFx2IWseVMMzrlF+VQSc+J8CbcDdl JhcOA5af3yLlahU2NrGE9lC667MF X-Received: by 2002:a17:902:9881:: with SMTP id s1mr10923229plp.99.1553739288543; Wed, 27 Mar 2019 19:14:48 -0700 (PDT) Received: from [192.168.1.3] (ip68-101-123-102.oc.oc.cox.net. [68.101.123.102]) by smtp.gmail.com with ESMTPSA id r11sm2561069pga.87.2019.03.27.19.14.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Mar 2019 19:14:47 -0700 (PDT) Subject: Re: [PATCH net-next v5 09/22] ethtool: implement EVENT notifications To: Michal Kubecek , Jiri Pirko Cc: David Miller , netdev@vger.kernel.org, Jakub Kicinski , Andrew Lunn , John Linville , Stephen Hemminger , linux-kernel@vger.kernel.org References: <971a93b567c81103716902cd1ad00946201f9710.1553532199.git.mkubecek@suse.cz> <20190327130428.GB14297@nanopsycho> <20190327141443.GS26076@unicorn.suse.cz> From: Florian Fainelli Openpgp: preference=signencrypt Message-ID: Date: Wed, 27 Mar 2019 19:14:43 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190327141443.GS26076@unicorn.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/27/2019 7:14 AM, Michal Kubecek wrote: > On Wed, Mar 27, 2019 at 02:04:28PM +0100, Jiri Pirko wrote: >> Mon, Mar 25, 2019 at 06:08:21PM CET, mkubecek@suse.cz wrote: >>> Three types of netlink notifications are introduced: >>> >>> - ETHA_EVENT_NEWDEV to notify about newly registered network devices >>> - ETHA_EVENT_DELDEV to notify about unregistered network devices >>> - ETHA_EVENT_RENAMEDEV to notify about renamed network device >>> >>> The notifications are triggered by NETDEV_REGISTER, NETDEV_UNREGISTER and >>> NETDEV_CHANGENAME notifiers. >>> >>> These notifications are intended for applications and daemons monitoring >>> ethtool events to allow updating the list of existing devices without >>> having to open another socket for rtnetlink. >> >> Wait. You duplicate events that are already going out through RTNETLINK. >> App should open RTNETLINK in order to get those. Other apps are doing >> that too. I don't think that duplications like this are desirable :/ > > Is there a way to filter or at least recognize these events when using > rtnetlink? I couldn't find any. The only way seems to be getting every > RTM_NEWLINK message (there can be quite a lot of those), always perform > the lookup in my device list and recognize what happened - only to > almost always find that nothing interesting. It is possible, sure, but > I would really like to avoid it. I am afraid you are right about this, would adding a filtering capability specifically for this in rtnetlink be a better route? -- Florian