[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50E08157.2010001@candelatech.com>
Date: Sun, 30 Dec 2012 10:00:55 -0800
From: Ben Greear <greearb@...delatech.com>
To: Jiri Pirko <jiri@...nulli.us>
CC: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
bhutchings@...arflare.com, faisal.latif@...el.com,
shemminger@...tta.com, fbl@...hat.com, roland@...nel.org,
sean.hefty@...el.com, hal.rosenstock@...il.com, fubar@...ibm.com,
andy@...yhouse.net, divy@...lsio.com, jitendra.kalsaria@...gic.com,
sony.chacko@...gic.com, linux-driver@...gic.com, kaber@...sh.net,
ursula.braun@...ibm.com, blaschka@...ux.vnet.ibm.com,
schwidefsky@...ibm.com, heiko.carstens@...ibm.com,
ebiederm@...ssion.com, joe@...ches.com, amwang@...hat.com,
nhorman@...driver.com, john.r.fastabend@...el.com,
pablo@...filter.org
Subject: Re: [patch net-next 04/15] rtnetlink: remove usage of dev->master
On 12/30/2012 03:58 AM, Jiri Pirko wrote:
> Signed-off-by: Jiri Pirko <jiri@...nulli.us>
> ---
> net/core/rtnetlink.c | 69 ++++++++++++++++++++++++++++------------------------
> 1 file changed, 37 insertions(+), 32 deletions(-)
>
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index 2ef7a56..ae612f4 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -880,6 +880,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
> const struct rtnl_link_stats64 *stats;
> struct nlattr *attr, *af_spec;
> struct rtnl_af_ops *af_ops;
> + struct net_device *upper_dev = netdev_master_upper_dev_get(dev);
>
> ASSERT_RTNL();
> nlh = nlmsg_put(skb, pid, seq, type, sizeof(*ifm), flags);
> @@ -908,8 +909,8 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
> #endif
> (dev->ifindex != dev->iflink &&
> nla_put_u32(skb, IFLA_LINK, dev->iflink)) ||
> - (dev->master &&
> - nla_put_u32(skb, IFLA_MASTER, dev->master->ifindex)) ||
> + (upper_dev &&
> + nla_put_u32(skb, IFLA_MASTER, upper_dev->ifindex)) ||
This seems confusing to me. You are calling the new variable 'upper_dev',
but it seems you are actually using it as a lower_dev???
Thanks,
Ben
--
Ben Greear <greearb@...delatech.com>
Candela Technologies Inc http://www.candelatech.com
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists