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:
committed by
Thomas Graf
parent
c7ecbf1e9c
commit
ac6073e3cd
@@ -186,7 +186,7 @@ ofputil_netmask_to_wcbits(ovs_be32 netmask)
|
||||
void
|
||||
ofputil_wildcard_from_ofpfw10(uint32_t ofpfw, struct flow_wildcards *wc)
|
||||
{
|
||||
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 30);
|
||||
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 31);
|
||||
|
||||
/* Initialize most of wc. */
|
||||
flow_wildcards_init_catchall(wc);
|
||||
@@ -3298,6 +3298,8 @@ ofputil_decode_packet_in_finish(struct ofputil_packet_in *pin,
|
||||
pin->fmd.tun_id = match->flow.tunnel.tun_id;
|
||||
pin->fmd.tun_src = match->flow.tunnel.ip_src;
|
||||
pin->fmd.tun_dst = match->flow.tunnel.ip_dst;
|
||||
pin->fmd.gbp_id = match->flow.tunnel.gbp_id;
|
||||
pin->fmd.gbp_flags = match->flow.tunnel.gbp_flags;
|
||||
pin->fmd.metadata = match->flow.metadata;
|
||||
memcpy(pin->fmd.regs, match->flow.regs, sizeof pin->fmd.regs);
|
||||
pin->fmd.pkt_mark = match->flow.pkt_mark;
|
||||
@@ -3423,6 +3425,12 @@ ofputil_packet_in_to_match(const struct ofputil_packet_in *pin,
|
||||
if (pin->fmd.tun_dst != htonl(0)) {
|
||||
match_set_tun_dst(match, pin->fmd.tun_dst);
|
||||
}
|
||||
if (pin->fmd.gbp_id != htons(0)) {
|
||||
match_set_tun_gbp_id(match, pin->fmd.gbp_id);
|
||||
}
|
||||
if (pin->fmd.gbp_flags) {
|
||||
match_set_tun_gbp_flags(match, pin->fmd.gbp_flags);
|
||||
}
|
||||
if (pin->fmd.metadata != htonll(0)) {
|
||||
match_set_metadata(match, pin->fmd.metadata);
|
||||
}
|
||||
|
Reference in New Issue
Block a user