From: Simon Horman <horms@verge.net.au>
To: dev@openvswitch.org, netdev@vger.kernel.org
Cc: Ravi K <rkerur@gmail.com>,
Isaku Yamahata <yamahata@valinux.co.jp>,
Jesse Gross <jesse@nicira.com>,
Pravin B Shelar <pshelar@nicira.com>,
Joe Stringer <joe@wand.net.nz>
Subject: [PATCH v2.37 1/6] odp: Only pass vlan_tci to commit_vlan_action()
Date: Tue, 20 Aug 2013 12:15:59 +1000 [thread overview]
Message-ID: <1376964964-18151-2-git-send-email-horms@verge.net.au> (raw)
In-Reply-To: <1376964964-18151-1-git-send-email-horms@verge.net.au>
From: Joe Stringer <joe@wand.net.nz>
This allows for future patches to pass different tci values to
commit_vlan_action() without passing an entire flow structure.
Signed-off-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
v2.36 - v2.37
* No change
v2.35
* First post
---
lib/odp-util.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/odp-util.c b/lib/odp-util.c
index a09042e..d0c9bbe 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -3097,10 +3097,10 @@ commit_set_ether_addr_action(const struct flow *flow, struct flow *base,
}
static void
-commit_vlan_action(const struct flow *flow, struct flow *base,
+commit_vlan_action(ovs_be16 vlan_tci, struct flow *base,
struct ofpbuf *odp_actions, struct flow_wildcards *wc)
{
- if (base->vlan_tci == flow->vlan_tci) {
+ if (base->vlan_tci == vlan_tci) {
return;
}
@@ -3110,15 +3110,15 @@ commit_vlan_action(const struct flow *flow, struct flow *base,
nl_msg_put_flag(odp_actions, OVS_ACTION_ATTR_POP_VLAN);
}
- if (flow->vlan_tci & htons(VLAN_CFI)) {
+ if (vlan_tci & htons(VLAN_CFI)) {
struct ovs_action_push_vlan vlan;
vlan.vlan_tpid = htons(ETH_TYPE_VLAN);
- vlan.vlan_tci = flow->vlan_tci;
+ vlan.vlan_tci = vlan_tci;
nl_msg_put_unspec(odp_actions, OVS_ACTION_ATTR_PUSH_VLAN,
&vlan, sizeof vlan);
}
- base->vlan_tci = flow->vlan_tci;
+ base->vlan_tci = vlan_tci;
}
static void
@@ -3330,7 +3330,7 @@ commit_odp_actions(const struct flow *flow, struct flow *base,
struct ofpbuf *odp_actions, struct flow_wildcards *wc)
{
commit_set_ether_addr_action(flow, base, odp_actions, wc);
- commit_vlan_action(flow, base, odp_actions, wc);
+ commit_vlan_action(flow->vlan_tci, base, odp_actions, wc);
commit_set_nw_action(flow, base, odp_actions, wc);
commit_set_port_action(flow, base, odp_actions, wc);
/* Committing MPLS actions should occur after committing nw and port
--
1.7.10.4
next prev parent reply other threads:[~2013-08-20 2:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-20 2:15 [PATCH v2.37 0/6] MPLS actions and matches Simon Horman
2013-08-20 2:15 ` Simon Horman [this message]
[not found] ` <1376964964-18151-1-git-send-email-horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2013-08-20 2:16 ` [PATCH v2.37 2/6] odp: Allow VLAN actions after MPLS actions Simon Horman
2013-08-20 2:16 ` [PATCH v2.37 3/6] ofp-actions: Add OFPUTIL_OFPAT13_PUSH_MPLS Simon Horman
2013-08-20 2:16 ` [PATCH v2.37 4/6] ofp-actions: Add separate OpenFlow 1.3 action parser Simon Horman
2013-08-20 2:16 ` [PATCH v2.37 5/6] lib: Push MPLS tags in the OpenFlow 1.3 ordering Simon Horman
2013-08-20 2:16 ` [PATCH v2.37 6/6] datapath: Add basic MPLS support to kernel Simon Horman
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=1376964964-18151-2-git-send-email-horms@verge.net.au \
--to=horms@verge.net.au \
--cc=dev@openvswitch.org \
--cc=jesse@nicira.com \
--cc=joe@wand.net.nz \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.com \
--cc=rkerur@gmail.com \
--cc=yamahata@valinux.co.jp \
/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