From: Sven Eckelmann <sven@narfation.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH-maint v2] batman-adv: Avoid endless loop in bat-on-bat netdevice check
Date: Fri, 12 Feb 2016 16:49:43 +0100 [thread overview]
Message-ID: <2101716.myXYXnb4kA@sven-edge> (raw)
In-Reply-To: <20160212152536.GA13273@lunn.ch>
[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]
On Friday 12 February 2016 16:25:36 Andrew Lunn wrote:
> > /**
> >
> > + * batadv_mutual_parents - check if two devices are each others parent
> > + * @dev1: 1st net_device
> > + * @dev2: 2nd net_device
> > + *
> > + * veth devices come in pairs and each is the parent of the other!
> > + *
> > + * Return: true if the devices are each others parent, otherwise false
> > + */
> > +static bool batadv_mutual_parents(const struct net_device *dev1,
> > + const struct net_device *dev2)
> > +{
> > + int dev1_parent_iflink = dev_get_iflink(dev1);
> > + int dev2_parent_iflink = dev_get_iflink(dev2);
> > +
> > + if (!dev1_parent_iflink || !dev2_parent_iflink)
> > + return false;
> > +
> > + return (dev1_parent_iflink == dev2->ifindex) &&
> > + (dev2_parent_iflink == dev1->ifindex);
> > +}
>
> Hi Sven, et al,
>
> So this is fine for the non netns case.
This basically has nothing to do with your original patchset. It is only to
fix the problem reported some time ago and nothing else. I have extracted this
part of the patch only because you suggested this approach and Antonio wanted
to submit it to net.git
Lets discuss the rest in the correct thread.
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-02-12 15:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 21:15 [B.A.T.M.A.N.] [PATCH-maint v2] batman-adv: Avoid endless loop in bat-on-bat netdevice check Sven Eckelmann
2016-02-12 15:25 ` Andrew Lunn
2016-02-12 15:49 ` Sven Eckelmann [this message]
2016-02-16 9:19 ` Marek Lindner
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=2101716.myXYXnb4kA@sven-edge \
--to=sven@narfation.org \
--cc=andrew@lunn.ch \
--cc=b.a.t.m.a.n@lists.open-mesh.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