mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 09:02:06 +00:00
openvswitch: Wrap struct ovs_key_ipv4_tunnel in a new structure.
Currently, the flow information that is matched for tunnels and the tunnel data passed around with packets is the same. However, as additional information is added this is not necessarily desirable, as in the case of pointers. This adds a new structure for tunnel metadata which currently contains only the existing struct. This change is purely internal to the kernel since the current OVS_KEY_ATTR_IPV4_TUNNEL is simply a compressed version of OVS_KEY_ATTR_TUNNEL that is translated at flow setup. Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
67fa034194
commit
f0b128c1e2
10 changed files with 74 additions and 43 deletions
|
@ -642,12 +642,12 @@ int ovs_flow_key_update(struct sk_buff *skb, struct sw_flow_key *key)
|
|||
return key_extract(skb, key);
|
||||
}
|
||||
|
||||
int ovs_flow_key_extract(struct ovs_key_ipv4_tunnel *tun_key,
|
||||
int ovs_flow_key_extract(struct ovs_tunnel_info *tun_info,
|
||||
struct sk_buff *skb, struct sw_flow_key *key)
|
||||
{
|
||||
/* Extract metadata from packet. */
|
||||
if (tun_key)
|
||||
memcpy(&key->tun_key, tun_key, sizeof(key->tun_key));
|
||||
if (tun_info)
|
||||
memcpy(&key->tun_key, &tun_info->tunnel, sizeof(key->tun_key));
|
||||
else
|
||||
memset(&key->tun_key, 0, sizeof(key->tun_key));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue