From: Stephen Hemminger <stephen@networkplumber.org>
To: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Cc: <netdev@vger.kernel.org>, Jamal Hadi Salim <jhs@mojatatu.com>,
Jiri Pirko <jiri@resnulli.us>,
Shmulik Ladkani <shmulik.ladkani@gmail.com>
Subject: Re: [PATCH iproute2 net-next] tc: m_vlan: Add vlan modify action
Date: Thu, 22 Sep 2016 09:05:04 -0700 [thread overview]
Message-ID: <20160922090504.3eaa5266@xeon-e3> (raw)
In-Reply-To: <1474536670-2495-1-git-send-email-shmulik.ladkani@gmail.com>
On Thu, 22 Sep 2016 12:31:10 +0300
Shmulik Ladkani <shmulik.ladkani@ravellosystems.com> wrote:
> +
> +static const char *action_name(int action)
> +{
> + static const char * const names[] = {
> + [TCA_VLAN_ACT_POP] = "pop",
> + [TCA_VLAN_ACT_PUSH] = "push",
> + [TCA_VLAN_ACT_MODIFY] = "modify",
> + };
> + return names[action];
> +}
> +
Why are you wrapping a simple array lookup in a function?
next prev parent reply other threads:[~2016-09-22 16:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 9:31 [PATCH iproute2 net-next] tc: m_vlan: Add vlan modify action Shmulik Ladkani
2016-09-22 16:05 ` Stephen Hemminger [this message]
2016-09-22 17:44 ` Shmulik Ladkani
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=20160922090504.3eaa5266@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=shmulik.ladkani@gmail.com \
--cc=shmulik.ladkani@ravellosystems.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.