* [PATCH net-next] net: correctly interlink lower/upper devices
@ 2013-09-02 14:26 Veaceslav Falico
2013-09-04 4:53 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Veaceslav Falico @ 2013-09-02 14:26 UTC (permalink / raw)
To: netdev
Cc: Veaceslav Falico, David S. Miller, Eric Dumazet, Jiri Pirko,
Alexander Duyck, Cong Wang
Currently we're linking upper devices to lower ones, which results in
upside-down relationship: upper devices seeing lower devices via its upper
lists.
Fix this by correctly linking lower devices to the upper ones.
CC: "David S. Miller" <davem@davemloft.net>
CC: Eric Dumazet <edumazet@google.com>
CC: Jiri Pirko <jiri@resnulli.us>
CC: Alexander Duyck <alexander.h.duyck@intel.com>
CC: Cong Wang <amwang@redhat.com>
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
---
net/core/dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 6fbb0c9..743620e 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4679,8 +4679,8 @@ static int __netdev_upper_dev_link(struct net_device *dev,
* versa, and don't forget the devices itself. All of these
* links are non-neighbours.
*/
- list_for_each_entry(i, &upper_dev->upper_dev_list, list) {
- list_for_each_entry(j, &dev->lower_dev_list, list) {
+ list_for_each_entry(i, &dev->lower_dev_list, list) {
+ list_for_each_entry(j, &upper_dev->upper_dev_list, list) {
ret = __netdev_adjacent_dev_link(i->dev, j->dev);
if (ret)
goto rollback_mesh;
--
1.8.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: correctly interlink lower/upper devices
2013-09-02 14:26 [PATCH net-next] net: correctly interlink lower/upper devices Veaceslav Falico
@ 2013-09-04 4:53 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-09-04 4:53 UTC (permalink / raw)
To: vfalico; +Cc: netdev, edumazet, jiri, alexander.h.duyck, amwang
From: Veaceslav Falico <vfalico@redhat.com>
Date: Mon, 2 Sep 2013 16:26:51 +0200
> Currently we're linking upper devices to lower ones, which results in
> upside-down relationship: upper devices seeing lower devices via its upper
> lists.
>
> Fix this by correctly linking lower devices to the upper ones.
>
> Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-04 4:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-02 14:26 [PATCH net-next] net: correctly interlink lower/upper devices Veaceslav Falico
2013-09-04 4:53 ` David Miller
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).