vcl: add DSCP support in VCL
Type: feature
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I835675267c997b5dc92a0aaccdb58648bc786bb9
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 207e208..107b109 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -219,6 +219,7 @@
memset (mp, 0, sizeof (*mp));
mp->client_index = wrk->api_client_handle;
mp->context = s->session_index;
+ mp->dscp = s->dscp;
mp->wrk_index = wrk->vpp_wrk_index;
mp->is_ip4 = s->transport.is_ip4;
mp->parent_handle = s->parent_handle;
@@ -3608,6 +3609,18 @@
rv = VPPCOM_EINVAL;
break;
+ case VPPCOM_ATTR_SET_DSCP:
+ if (buffer && buflen && (*buflen >= sizeof (u8)))
+ {
+ session->dscp = *(u8 *) buffer;
+
+ VDBG (2, "VPPCOM_ATTR_SET_DSCP: %u (0x%x), buflen %d,",
+ *(u8 *) buffer, *(u8 *) buffer, *buflen);
+ }
+ else
+ rv = VPPCOM_EINVAL;
+ break;
+
case VPPCOM_ATTR_SET_TX_FIFO_LEN:
if (buffer && buflen && (*buflen == sizeof (u32)))
{