[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <517A841F.6080107@cogentembedded.com>
Date: Fri, 26 Apr 2013 17:41:51 +0400
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Thomas Graf <tgraf@...g.ch>
CC: jesse@...ira.com, netdev@...r.kernel.org, dev@...nvswitch.org
Subject: Re: [PATCH net-next] openvswitch: Remove unneeded ovs_netdev_get_ifindex()
Hello.
On 26-04-2013 16:40, Thomas Graf wrote:
> The only user is get_dpifindex(), no need to redirect via the port
> operations.
> Signed-off-by: Thomas Graf <tgraf@...g.ch>
[...]
> diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
> index 74a5fe6..965c059 100644
> --- a/net/openvswitch/datapath.c
> +++ b/net/openvswitch/datapath.c
> @@ -150,9 +150,10 @@ static int get_dpifindex(struct datapath *dp)
> rcu_read_lock();
>
> local = ovs_vport_rcu(dp, OVSP_LOCAL);
> - if (local)
> - ifindex = local->ops->get_ifindex(local);
> - else
> + if (local) {
> + const struct netdev_vport *vport = netdev_vport_priv(local);
Empty line after declaration wouldn't hurt.
> + ifindex = vport->dev->ifindex;
> + } else
> ifindex = 0;
>
> rcu_read_unlock();
WBR, Sergei
--
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