From: Laszlo Attila Toth <panther@balabit.hu>
To: Patrick McHardy <kaber@trash.net>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [IFGROUPv4 2/3] Interface group: core (netlink) part
Date: Thu, 25 Oct 2007 17:31:32 +0200 [thread overview]
Message-ID: <4720B6D4.8080404@balabit.hu> (raw)
In-Reply-To: <4720B2E6.1060505@trash.net>
Patrick McHardy írta:
> Laszlo Attila Toth wrote:
>> Interface groups let handle different interfaces together
>> especially in netfilter modules.
>> Modified net device structure and netlink interface.
>>
>> @@ -891,6 +895,13 @@ static int do_setlink(struct net_device *dev,
>> struct ifinfomsg *ifm,
>> }
>> }
>>
>> + if (tb[IFLA_IFGROUP]) {
>> + write_lock_bh(&dev_base_lock);
>> + dev->ifgroup = nla_get_u32(tb[IFLA_IFGROUP]);
>> + write_unlock_bh(&dev_base_lock);
>> + modified = 1;
>> + }
>
>
> The locking looks unnecessary, the rtnl should be enough.
> I'm not even sure why its used for operstate and linkmode,
> AFAICS they are also protected by the rtnl.
>
Hm, ok. In this case operstate and linkmode can be unprotected as code
cleanup, am I right? Or leave them unchanged?
And notification is only needed if something was changed.
--
Attila
next prev parent reply other threads:[~2007-10-25 15:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-25 15:03 [IFGROUPv4 0/3 (+3)] Interface group patches Laszlo Attila Toth
2007-10-25 15:03 ` [IFGROUPv4 1/3] rtnetlink: setlink changes atomic with single notification Laszlo Attila Toth
2007-10-25 15:03 ` [IFGROUPv4 2/3] Interface group: core (netlink) part Laszlo Attila Toth
2007-10-25 15:03 ` [IFGROUPv4 3/3] Netfilter Interface group match Laszlo Attila Toth
2007-10-25 15:03 ` [IFGROUPv4 iptables] " Laszlo Attila Toth
2007-10-25 15:03 ` [IFGROUPv4 iproute 1/2] Added IFLA_NET_NS_PID as in kernel v2.6.24-rc1 Laszlo Attila Toth
2007-10-25 15:03 ` [IFGROUPv4 iproute 2/2] Interface group as new ip link option Laszlo Attila Toth
2007-10-25 15:25 ` [IFGROUPv4 iptables] Interface group match Patrick McHardy
2007-10-25 15:18 ` [IFGROUPv4 3/3] Netfilter " Patrick McHardy
2007-10-25 15:14 ` [IFGROUPv4 2/3] Interface group: core (netlink) part Patrick McHardy
2007-10-25 15:31 ` Laszlo Attila Toth [this message]
2007-10-25 15:40 ` Patrick McHardy
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=4720B6D4.8080404@balabit.hu \
--to=panther@balabit.hu \
--cc=davem@davemloft.net \
--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).