2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-05 08:45:23 +00:00

ofproto: Add NXM_NX_TUN_GBP_ID and NXM_NX_TUN_GBP_FLAGS

Introduces two new NXMs to represent VXLAN-GBP [0] fields.

  actions=load:0x10->NXM_NX_TUN_GBP_ID[],NORMAL
  tun_gbp_id=0x10,actions=drop

This enables existing VXLAN tunnels to carry security label
information such as a SELinux context to other network peers.

The values are carried to/from the datapath using the attribute
OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS.

[0] https://tools.ietf.org/html/draft-smith-vxlan-group-policy-00

Signed-off-by: Madhu Challa <challa@noironetworks.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
This commit is contained in:
Madhu Challa
2015-02-14 15:13:17 +01:00
committed by Thomas Graf
parent c7ecbf1e9c
commit ac6073e3cd
19 changed files with 274 additions and 65 deletions

View File

@@ -38,7 +38,7 @@ struct pkt_metadata;
/* This sequence number should be incremented whenever anything involving flows
* or the wildcarding of flows changes. This will cause build assertion
* failures in places which likely need to be updated. */
#define FLOW_WC_SEQ 30
#define FLOW_WC_SEQ 31
/* Number of Open vSwitch extension 32-bit registers. */
#define FLOW_N_REGS 8
@@ -156,7 +156,7 @@ BUILD_ASSERT_DECL(sizeof(struct flow) % sizeof(uint64_t) == 0);
/* Remember to update FLOW_WC_SEQ when changing 'struct flow'. */
BUILD_ASSERT_DECL(offsetof(struct flow, igmp_group_ip4) + sizeof(uint32_t)
== sizeof(struct flow_tnl) + 192
&& FLOW_WC_SEQ == 30);
&& FLOW_WC_SEQ == 31);
/* Incremental points at which flow classification may be performed in
* segments.
@@ -186,6 +186,8 @@ struct flow_metadata {
ovs_be64 tun_id; /* Encapsulating tunnel ID. */
ovs_be32 tun_src; /* Tunnel outer IPv4 src addr */
ovs_be32 tun_dst; /* Tunnel outer IPv4 dst addr */
ovs_be16 gbp_id; /* Group policy ID */
uint8_t gbp_flags; /* Group policy flags */
ovs_be64 metadata; /* OpenFlow 1.1+ metadata field. */
uint32_t regs[FLOW_N_REGS]; /* Registers. */
uint32_t pkt_mark; /* Packet mark. */