From: Sergei Shtylyov <sergei.shtylyov@cogentembedded•com>
To: Thomas Graf <tgraf@suug•ch>
Cc: jesse@nicira•com, netdev@vger•kernel.org, dev@openvswitch•org
Subject: Re: [PATCH net-next] openvswitch: Remove unneeded ovs_netdev_get_ifindex()
Date: Fri, 26 Apr 2013 17:41:51 +0400 [thread overview]
Message-ID: <517A841F.6080107@cogentembedded.com> (raw)
In-Reply-To: <a59b1675cc29cd2897bdf1fb6ae34bfd0971fbb7.1366980015.git.tgraf@suug.ch>
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@suug•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
next prev parent reply other threads:[~2013-04-26 13:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-26 12:40 [PATCH net-next] openvswitch: Remove unneeded ovs_netdev_get_ifindex() Thomas Graf
2013-04-26 13:41 ` Sergei Shtylyov [this message]
2013-04-29 18:07 ` Jesse Gross
2013-04-29 18:08 ` David Miller
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=517A841F.6080107@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded$(echo .)com \
--cc=dev@openvswitch$(echo .)org \
--cc=jesse@nicira$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=tgraf@suug$(echo .)ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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