netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laszlo Attila Toth <panther@balabit.hu>
To: Jarek Poplawski <jarkao2@o2.pl>
Cc: David Miller <davem@davemloft.net>,
	Patrick McHardy <kaber@trash.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCHv7 2/5] rtnetlink: send a single notification on device state changes
Date: Mon, 03 Dec 2007 12:40:18 +0100	[thread overview]
Message-ID: <4753EB22.5040603@balabit.hu> (raw)
In-Reply-To: <47509BB9.10108@o2.pl>

Jarek Poplawski írta:
> Laszlo Attila Toth wrote, On 11/29/2007 05:11 PM:
> 
>> In do_setlink() a single ntification is sent at the end of the function
>> if any modification occured. If the address has been changed, another
>> notification is sent.
> 
> 
> ...
> 
>> @@ -858,6 +859,7 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,
>>  	if (tb[IFLA_BROADCAST]) {
>>  		nla_memcpy(dev->broadcast, tb[IFLA_BROADCAST], dev->addr_len);
>>  		send_addr_notify = 1;
>> +		modified = 1;
>>  	}
> 
> ..
> 
>>  	if (send_addr_notify)
>>  		call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
>> +
>> +	if (modified)
>> +		netdev_state_change(dev);
>> +
> 
> The subject suggests there might be less notifications. The patch actually
> adds a little. Any additional comment why they are necessary?

The actual state of a device contains its address(es), also address 
change implies state change, but these are different netlink messages 
also the NETDEV_CHANGEADDR cannot be dropped because the other one is used.

Attila

  reply	other threads:[~2007-12-03 11:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ifgroup-20071129-165736-1196351856-panther@balabit.hu>
2007-11-29 16:11 ` [PATCHv7 0/5 + 3] Interface group patches Laszlo Attila Toth
2007-11-29 16:25   ` Patrick McHardy
2007-11-29 16:39     ` Laszlo Attila Toth
2007-11-29 16:11 ` [PATCHv7 1/5] Remove unnecessary locks from rtnetlink (in do_setlink) Laszlo Attila Toth
2007-11-30 22:13   ` Jarek Poplawski
2007-12-03 11:59     ` Laszlo Attila Toth
2007-12-18 12:29   ` [PATCHv7 1/5][RESEND] Remove unnecessary locks from rtnetlink Laszlo Attila Toth
2007-11-29 16:11 ` [PATCHv7 2/5] rtnetlink: send a single notification on device state changes Laszlo Attila Toth
2007-11-30 23:24   ` Jarek Poplawski
2007-12-03 11:40     ` Laszlo Attila Toth [this message]
2007-12-03 13:37       ` Jarek Poplawski
2007-12-18 12:29   ` [PATCHv7 2/5][RESEND] " Laszlo Attila Toth
2007-11-29 16:11 ` [PATCHv7 3/5] Interface group: core (netlink) part Laszlo Attila Toth
2007-11-29 16:11 ` [PATCHv7 4/5] Ifgroup read/write support in sysfs Laszlo Attila Toth
2007-11-29 16:11 ` [PATCHv7 5/5] Netfilter Interface group match Laszlo Attila Toth
2007-11-29 16:11 ` [PATCHv7 iptables] " Laszlo Attila Toth
2007-12-01 21:19   ` Jarek Poplawski
2007-12-01 21:23     ` Jarek Poplawski
2007-11-29 16:11 ` [PATCHv7 iproute2 1/2] Added IFLA_NET_NS_PID as in kernel v2.6.24-rc1 Laszlo Attila Toth
2007-11-29 16:11 ` [PATCHv7 iproute2 2/2] Interface group as new ip link option Laszlo Attila Toth
2007-12-01 22:10   ` Jarek Poplawski
2007-12-18 12:29   ` [PATCHv7 iproute2 2/2][RESEND] " Laszlo Attila Toth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4753EB22.5040603@balabit.hu \
    --to=panther@balabit.hu \
    --cc=davem@davemloft.net \
    --cc=jarkao2@o2.pl \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).