summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vcl/vcl_private.h1
-rw-r--r--src/vcl/vppcom.c13
-rw-r--r--src/vcl/vppcom.h1
-rw-r--r--src/vnet/session/application_interface.h1
-rw-r--r--src/vnet/session/session_node.c1
5 files changed, 17 insertions, 0 deletions
diff --git a/src/vcl/vcl_private.h b/src/vcl/vcl_private.h
index 285985e6529..66d418084ee 100644
--- a/src/vcl/vcl_private.h
+++ b/src/vcl/vcl_private.h
@@ -168,6 +168,7 @@ typedef struct vcl_session_
u32 rcvbuf_size; // VPP-TBD: Hack until support setsockopt(SO_RCVBUF)
transport_endpt_ext_cfg_t *ext_config;
+ u8 dscp;
#if VCL_ELOG
elog_track_t elog_track;
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 207e208979c..107b109dc75 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -219,6 +219,7 @@ vcl_send_session_connect (vcl_worker_t * wrk, vcl_session_t * s)
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 @@ vppcom_session_attr (uint32_t session_handle, uint32_t op,
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)))
{
diff --git a/src/vcl/vppcom.h b/src/vcl/vppcom.h
index 19a01c798b5..46517ad8c8c 100644
--- a/src/vcl/vppcom.h
+++ b/src/vcl/vppcom.h
@@ -145,6 +145,7 @@ typedef enum
VPPCOM_ATTR_GET_VRF,
VPPCOM_ATTR_GET_DOMAIN,
VPPCOM_ATTR_SET_ENDPT_EXT_CFG,
+ VPPCOM_ATTR_SET_DSCP,
} vppcom_attr_op_t;
typedef struct _vcl_poll
diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h
index ca8dc38c4e1..733a4627c2e 100644
--- a/src/vnet/session/application_interface.h
+++ b/src/vnet/session/application_interface.h
@@ -408,6 +408,7 @@ typedef struct session_connect_msg_
u32 ckpair_index;
u8 crypto_engine;
u8 flags;
+ u8 dscp;
uword ext_config;
} __clib_packed session_connect_msg_t;
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index fe4e7324218..7565b43b29b 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -173,6 +173,7 @@ session_mq_connect_one (session_connect_msg_t *mp)
a->sep.port = mp->port;
a->sep.transport_proto = mp->proto;
a->sep.peer.fib_index = mp->vrf;
+ a->sep.dscp = mp->dscp;
clib_memcpy_fast (&a->sep.peer.ip, &mp->lcl_ip, sizeof (mp->lcl_ip));
if (mp->is_ip4)
{
3388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*
 * Copyright (c) 2017 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <vppinfra/error.h>
#include "tw_timer_16t_2w_512sl.h"
#include "tw_timer_template.c"

/*
 * fd.io coding-style-patch-verification: ON
 *
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */