aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/mpls
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-01-09 06:39:23 -0800
committerDave Barach <openvpp@barachs.net>2018-01-11 19:46:01 +0000
commit6c4dae27e75fc668f86c9cca0f3f58273b680621 (patch)
tree88c2adee0a2eb2c5e48471da2ef010e46cc270ab /src/vnet/mpls
parentf72212e00282712f5829a7f76a8cb6f486cdae60 (diff)
api: remove transport specific code from handlers
This does not update api client code. In other words, if the client assumes the transport is shmem based, this patch does not change that. Furthermore, code that checks queue size, for tail dropping, is not updated. Done for the following apis: Plugins - acl - gtpu - memif - nat - pppoe VNET - bfd - bier - tapv2 - vhost user - dhcp - flow - geneve - ip - punt - ipsec/ipsec-gre - l2 - l2tp - lisp-cp/one-cp - lisp-gpe - map - mpls - policer - session - span - udp - tap - vxlan/vxlan-gpe - interface VPP - api/api.c OAM - oam_api.c Stats - stats.c Change-Id: I0e33ecefb2bdab0295698c0add948068a5a83345 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/mpls')
-rw-r--r--src/vnet/mpls/mpls_api.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/vnet/mpls/mpls_api.c b/src/vnet/mpls/mpls_api.c
index d9f40501526..394a6b7f51b 100644
--- a/src/vnet/mpls/mpls_api.c
+++ b/src/vnet/mpls/mpls_api.c
@@ -376,7 +376,7 @@ static void
typedef struct mpls_tunnel_send_walk_ctx_t_
{
- svm_queue_t *q;
+ vl_api_registration_t *reg;
u32 index;
u32 context;
} mpls_tunnel_send_walk_ctx_t;
@@ -427,20 +427,20 @@ send_mpls_tunnel_entry (u32 mti, void *arg)
// mt->mt_label_stack, nlabels * sizeof (u32));
- vl_msg_api_send_shmem (ctx->q, (u8 *) & mp);
+ vl_api_send_msg (ctx->reg, (u8 *) mp);
}
static void
vl_api_mpls_tunnel_dump_t_handler (vl_api_mpls_tunnel_dump_t * mp)
{
- svm_queue_t *q;
+ vl_api_registration_t *reg;
- q = vl_api_client_index_to_input_queue (mp->client_index);
- if (q == 0)
+ reg = vl_api_client_index_to_registration (mp->client_index);
+ if (!reg)
return;
mpls_tunnel_send_walk_ctx_t ctx = {
- .q = q,
+ .reg = reg,
.index = ntohl (mp->tunnel_index),
.context = mp->context,
};
@@ -449,7 +449,7 @@ vl_api_mpls_tunnel_dump_t_handler (vl_api_mpls_tunnel_dump_t * mp)
static void
send_mpls_fib_details (vpe_api_main_t * am,
- svm_queue_t * q,
+ vl_api_registration_t * reg,
const fib_table_t * table,
u32 label, u32 eos,
fib_route_path_encode_t * api_rpaths, u32 context)
@@ -485,7 +485,7 @@ send_mpls_fib_details (vpe_api_main_t * am,
fp++;
}
- vl_msg_api_send_shmem (q, (u8 *) & mp);
+ vl_api_send_msg (reg, (u8 *) mp);
}
typedef struct vl_api_mpls_fib_dump_table_walk_ctx_t_
@@ -507,7 +507,7 @@ static void
vl_api_mpls_fib_dump_t_handler (vl_api_mpls_fib_dump_t * mp)
{
vpe_api_main_t *am = &vpe_api_main;
- svm_queue_t *q;
+ vl_api_registration_t *reg;
mpls_main_t *mm = &mpls_main;
fib_table_t *fib_table;
mpls_fib_t *mpls_fib;
@@ -519,8 +519,8 @@ vl_api_mpls_fib_dump_t_handler (vl_api_mpls_fib_dump_t * mp)
.lfeis = NULL,
};
- q = vl_api_client_index_to_input_queue (mp->client_index);
- if (q == 0)
+ reg = vl_api_client_index_to_registration (mp->client_index);
+ if (!reg)
return;
/* *INDENT-OFF* */
@@ -540,7 +540,7 @@ vl_api_mpls_fib_dump_t_handler (vl_api_mpls_fib_dump_t * mp)
fib_table = fib_table_get (fib_index, pfx.fp_proto);
api_rpaths = NULL;
fib_entry_encode (*lfeip, &api_rpaths);
- send_mpls_fib_details (am, q,
+ send_mpls_fib_details (am, reg,
fib_table, pfx.fp_label,
pfx.fp_eos, api_rpaths, mp->context);
vec_free (api_rpaths);