aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/buffer.h6
-rw-r--r--src/vnet/l2/l2_input.h1
-rw-r--r--src/vnet/l2/l2_output.h1
-rw-r--r--src/vnet/vxlan-gbp/decap.c6
-rw-r--r--src/vnet/vxlan-gbp/encap.c12
5 files changed, 16 insertions, 10 deletions
diff --git a/src/vnet/buffer.h b/src/vnet/buffer.h
index 89dd84567bc..06696515ecd 100644
--- a/src/vnet/buffer.h
+++ b/src/vnet/buffer.h
@@ -389,7 +389,11 @@ typedef struct
{
u8 __unused;
u8 flags;
- u16 src_epg;
+ union
+ {
+ u16 src_epg;
+ u16 sclass;
+ };
} gbp;
union
diff --git a/src/vnet/l2/l2_input.h b/src/vnet/l2/l2_input.h
index 93da1277e67..12e7e54038c 100644
--- a/src/vnet/l2/l2_input.h
+++ b/src/vnet/l2/l2_input.h
@@ -114,6 +114,7 @@ l2input_bd_config (u32 bd_index)
_(GBP_NULL_CLASSIFY, "gbp-null-classify") \
_(GBP_SRC_CLASSIFY, "gbp-src-classify") \
_(GBP_LPM_CLASSIFY, "l2-gbp-lpm-classify") \
+ _(GBP_SCLASS_2_ID, "l2-gbp-sclass-2-id") \
_(VTR, "l2-input-vtr") \
_(L2_IP_QOS_RECORD, "l2-ip-qos-record") \
_(VPATH, "vpath-input-l2") \
diff --git a/src/vnet/l2/l2_output.h b/src/vnet/l2/l2_output.h
index 74d2829839f..fdb6167155f 100644
--- a/src/vnet/l2/l2_output.h
+++ b/src/vnet/l2/l2_output.h
@@ -81,6 +81,7 @@ extern vlib_node_registration_t l2output_node;
#define foreach_l2output_feat \
_(OUTPUT, "interface-output") \
_(SPAN, "span-l2-output") \
+ _(GBP_ID_2_SCLASS, "l2-gbp-id-2-sclass") \
_(GBP_POLICY_PORT, "gbp-policy-port") \
_(GBP_POLICY_MAC, "gbp-policy-mac") \
_(CFM, "feature-bitmap-drop") \
diff --git a/src/vnet/vxlan-gbp/decap.c b/src/vnet/vxlan-gbp/decap.c
index 613cb012319..6c14ef79531 100644
--- a/src/vnet/vxlan-gbp/decap.c
+++ b/src/vnet/vxlan-gbp/decap.c
@@ -334,7 +334,7 @@ vxlan_gbp_input (vlib_main_t * vm,
}
vnet_buffer2 (b0)->gbp.flags = vxlan_gbp_get_gpflags (vxlan_gbp0);
- vnet_buffer2 (b0)->gbp.src_epg = vxlan_gbp_get_sclass (vxlan_gbp0);
+ vnet_buffer2 (b0)->gbp.sclass = vxlan_gbp_get_sclass (vxlan_gbp0);
if (PREDICT_FALSE
@@ -369,7 +369,7 @@ vxlan_gbp_input (vlib_main_t * vm,
}
vnet_buffer2 (b1)->gbp.flags = vxlan_gbp_get_gpflags (vxlan_gbp1);
- vnet_buffer2 (b1)->gbp.src_epg = vxlan_gbp_get_sclass (vxlan_gbp1);
+ vnet_buffer2 (b1)->gbp.sclass = vxlan_gbp_get_sclass (vxlan_gbp1);
vnet_update_l2_len (b0);
vnet_update_l2_len (b1);
@@ -473,7 +473,7 @@ vxlan_gbp_input (vlib_main_t * vm,
(rx_counter, thread_index, stats_t0->sw_if_index, 1, len0);
}
vnet_buffer2 (b0)->gbp.flags = vxlan_gbp_get_gpflags (vxlan_gbp0);
- vnet_buffer2 (b0)->gbp.src_epg = vxlan_gbp_get_sclass (vxlan_gbp0);
+ vnet_buffer2 (b0)->gbp.sclass = vxlan_gbp_get_sclass (vxlan_gbp0);
/* Required to make the l2 tag push / pop code work on l2 subifs */
vnet_update_l2_len (b0);
diff --git a/src/vnet/vxlan-gbp/encap.c b/src/vnet/vxlan-gbp/encap.c
index f1b839ce316..f8fc9b4b998 100644
--- a/src/vnet/vxlan-gbp/encap.c
+++ b/src/vnet/vxlan-gbp/encap.c
@@ -260,9 +260,9 @@ vxlan_gbp_encap_inline (vlib_main_t * vm,
vxlan_gbp0->gpflags = vnet_buffer2 (b0)->gbp.flags;
vxlan_gbp1->gpflags = vnet_buffer2 (b1)->gbp.flags;
vxlan_gbp0->sclass =
- clib_host_to_net_u16 (vnet_buffer2 (b0)->gbp.src_epg);
+ clib_host_to_net_u16 (vnet_buffer2 (b0)->gbp.sclass);
vxlan_gbp1->sclass =
- clib_host_to_net_u16 (vnet_buffer2 (b1)->gbp.src_epg);
+ clib_host_to_net_u16 (vnet_buffer2 (b1)->gbp.sclass);
if (csum_offload)
{
@@ -324,7 +324,7 @@ vxlan_gbp_encap_inline (vlib_main_t * vm,
vlib_add_trace (vm, node, b0, sizeof (*tr));
tr->tunnel_index = t0 - vxm->tunnels;
tr->vni = t0->vni;
- tr->sclass = vnet_buffer2 (b0)->gbp.src_epg;
+ tr->sclass = vnet_buffer2 (b0)->gbp.sclass;
tr->flags = vnet_buffer2 (b0)->gbp.flags;
}
@@ -334,7 +334,7 @@ vxlan_gbp_encap_inline (vlib_main_t * vm,
vlib_add_trace (vm, node, b1, sizeof (*tr));
tr->tunnel_index = t1 - vxm->tunnels;
tr->vni = t1->vni;
- tr->sclass = vnet_buffer2 (b1)->gbp.src_epg;
+ tr->sclass = vnet_buffer2 (b1)->gbp.sclass;
tr->flags = vnet_buffer2 (b1)->gbp.flags;
}
@@ -426,7 +426,7 @@ vxlan_gbp_encap_inline (vlib_main_t * vm,
/* set source class and gpflags */
vxlan_gbp0->gpflags = vnet_buffer2 (b0)->gbp.flags;
vxlan_gbp0->sclass =
- clib_host_to_net_u16 (vnet_buffer2 (b0)->gbp.src_epg);
+ clib_host_to_net_u16 (vnet_buffer2 (b0)->gbp.sclass);
if (csum_offload)
{
@@ -469,7 +469,7 @@ vxlan_gbp_encap_inline (vlib_main_t * vm,
vlib_add_trace (vm, node, b0, sizeof (*tr));
tr->tunnel_index = t0 - vxm->tunnels;
tr->vni = t0->vni;
- tr->sclass = vnet_buffer2 (b0)->gbp.src_epg;
+ tr->sclass = vnet_buffer2 (b0)->gbp.sclass;
tr->flags = vnet_buffer2 (b0)->gbp.flags;
}
vlib_validate_buffer_enqueue_x1 (vm, node, next_index,