From: Andrew Lunn <andrew@lunn.ch>
To: Sven Eckelmann <sven@narfation.org>
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:25:36 +0100 [thread overview]
Message-ID: <20160212152536.GA13273@lunn.ch> (raw)
In-Reply-To: <1455225357-15756-1-git-send-email-sven@narfation.org>
> /**
> + * 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.
But what about the netns case? This is mainly a backward compatible
issue. It sounds like some of the older kernels you have via compat.h
are going to have issues with netns support. What do the maintainers
what to do about this? NACK my patches, drop support for some of the
older kernels? Something else?
Thanks
Andrew
next prev parent reply other threads:[~2016-02-12 15:25 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 [this message]
2016-02-12 15:49 ` Sven Eckelmann
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=20160212152536.GA13273@lunn.ch \
--to=andrew@lunn.ch \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=sven@narfation.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