diff options
author | Jesse Gross <jesse@nicira.com> | 2010-07-14 19:42:57 -0700 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2010-07-15 15:09:08 -0700 |
commit | 1cb8b59f8ca07d4bd3c0fe3a0608d7a8fca6b08f (patch) | |
tree | 9e5bb2898ccc9b2bdc3b62e6fe5b9f43413f29f3 | |
parent | 27b6cec086eebdd34bc8526901ea6b2a52119f17 (diff) |
datapath: Don't set tunnel_id in a function.
We don't need a function to set a variable. In practice it will
almost certainly get inlined but this makes it easier to read.
-rw-r--r-- | datapath/actions.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/datapath/actions.c b/datapath/actions.c index 51fb3105..d0b74d4b 100644 --- a/datapath/actions.c +++ b/datapath/actions.c @@ -46,12 +46,6 @@ static struct sk_buff *make_writable(struct sk_buff *skb, unsigned min_headroom, return NULL; } -static void set_tunnel(struct sk_buff *skb, struct odp_flow_key *key, - __be32 tun_id) -{ - OVS_CB(skb)->tun_id = key->tun_id = tun_id; -} - static struct sk_buff *vlan_pull_tag(struct sk_buff *skb) { struct vlan_ethhdr *vh = vlan_eth_hdr(skb); @@ -75,7 +69,6 @@ static struct sk_buff *vlan_pull_tag(struct sk_buff *skb) return skb; } - static struct sk_buff *modify_vlan_tci(struct datapath *dp, struct sk_buff *skb, struct odp_flow_key *key, const union odp_action *a, int n_actions, gfp_t gfp) @@ -469,7 +462,7 @@ int execute_actions(struct datapath *dp, struct sk_buff *skb, break; case ODPAT_SET_TUNNEL: - set_tunnel(skb, key, a->tunnel.tun_id); + OVS_CB(skb)->tun_id = key->tun_id = a->tunnel.tun_id; break; case ODPAT_SET_VLAN_VID: |