From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
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 20:44:46 +0300 [thread overview]
Message-ID: <20160922204446.14a0c23b@halley> (raw)
In-Reply-To: <20160922090504.3eaa5266@xeon-e3>
On Thu, 22 Sep 2016 09:05:04 -0700 Stephen Hemminger <stephen@networkplumber.org> wrote:
> 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?
No reason in particular, was probably code evolution, will amend, thanks.
prev parent reply other threads:[~2016-09-22 17:44 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
2016-09-22 17:44 ` Shmulik Ladkani [this message]
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=20160922204446.14a0c23b@halley \
--to=shmulik.ladkani@gmail.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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;
as well as URLs for NNTP newsgroup(s).