Skip to content

Commit

Permalink
fix references to new types again
Browse files Browse the repository at this point in the history
  • Loading branch information
mogaika committed Jan 8, 2024
1 parent ff1ca48 commit fe7de96
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion upf/unittest.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ tbcd_test()
int res = 0;
u8 sample_value[] = { 0x09, 0x09, 0x60, 0x00, 0xa2, 0xcb, 0xed, 0xf9 };
u8 * expected = "909006002*#abc9";
u8 * actual = format(0, "%U", format_tbcd, sample_value, sizeof(sample_value));
u8 * actual = format(0, "%U", format_pfcp_tbcd, sample_value, sizeof(sample_value));

UPF_TEST (vec_len (actual) == strlen (expected) &&
!memcmp (actual, expected, strlen(expected)),
Expand Down
2 changes: 1 addition & 1 deletion upf/upf.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ upf_tdf_ul_lookup_add_i (u32 tdf_ul_fib_index, const fib_prefix_t *pfx,
}

int
vnet_upf_node_id_set (const pfcp_node_id_t *node_id)
vnet_upf_node_id_set (const pfcp_ie_node_id_t *node_id)
{
upf_main_t *gtm = &upf_main;

Expand Down
16 changes: 8 additions & 8 deletions upf/upf_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,14 @@ vl_api_upf_pfcp_reencode_t_handler (vl_api_upf_pfcp_reencode_t *mp)
upf_main_t *sm = &upf_main;
vl_api_upf_pfcp_reencode_reply_t *rmp;
pfcp_decoded_msg_t dmsg;
pfcp_offending_ie_t *err = 0;
pfcp_ie_offending_ie_t *err = 0;
u8 *reply_data = 0;
int rv = 0;
int data_len = 0, packet_len = clib_net_to_host_u32 (mp->packet_len);

if ((rv = pfcp_decode_msg (mp->packet, packet_len, &dmsg, &err)) != 0)
{
pfcp_offending_ie_t *cur_err;
pfcp_ie_offending_ie_t *cur_err;
vec_foreach (cur_err, err)
{
clib_warning ("offending IE: %d", *cur_err);
Expand Down Expand Up @@ -294,15 +294,15 @@ vl_api_upf_pfcp_format_t_handler (vl_api_upf_pfcp_reencode_t *mp)
upf_main_t *sm = &upf_main;
vl_api_upf_pfcp_format_reply_t *rmp;
pfcp_decoded_msg_t dmsg;
pfcp_offending_ie_t *err = 0;
pfcp_ie_offending_ie_t *err = 0;
u8 *s;
/* pfcp_offending_ie_t *err = NULL; */
/* pfcp_ie_offending_ie_t *err = NULL; */
int rv = 0;
int text_len = 0, packet_len = clib_net_to_host_u32 (mp->packet_len);

if ((rv = pfcp_decode_msg (mp->packet, packet_len, &dmsg, &err)) != 0)
{
pfcp_offending_ie_t *cur_err;
pfcp_ie_offending_ie_t *cur_err;
vec_foreach (cur_err, err)
{
clib_warning ("offending IE: %d", *cur_err);
Expand All @@ -312,7 +312,7 @@ vl_api_upf_pfcp_format_t_handler (vl_api_upf_pfcp_reencode_t *mp)
goto reply;
}

s = format (0, "%U\n", format_dmsg, &dmsg);
s = format (0, "%U\n", format_pfcp_dmsg, &dmsg);

text_len = vec_len (s);

Expand Down Expand Up @@ -894,7 +894,7 @@ vl_api_upf_set_node_id_t_handler (vl_api_upf_set_node_id_t *mp)
upf_main_t *sm = &upf_main;
vl_api_upf_set_node_id_reply_t *rmp = NULL;

pfcp_node_id_t node_id = { 0 };
pfcp_ie_node_id_t node_id = { 0 };
node_id.type = mp->type;

switch (mp->type)
Expand Down Expand Up @@ -932,7 +932,7 @@ vl_api_upf_get_node_id_t_handler (vl_api_upf_get_node_id_t *mp)

vl_api_upf_get_node_id_reply_t *rmp = NULL;
upf_main_t *sm = &upf_main;
pfcp_node_id_t *node = &sm->node_id;
pfcp_ie_node_id_t *node = &sm->node_id;

switch (node->type)
{
Expand Down
8 changes: 4 additions & 4 deletions upf/upf_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ upf_show_nwi_command_fn (vlib_main_t *vm, unformat_input_t *main_input,
vlib_cli_output (vm,
"%U, ip4-table-id %u, ip6-table-id %u, ipfix-policy "
"%U, ipfix-collector-ip %U\n",
format_dns_labels, nwi->name, fib4->hash.table_id,
format_pfcp_dns_labels, nwi->name, fib4->hash.table_id,
fib6->table_id, format_upf_ipfix_policy,
nwi->ipfix_policy, format_ip_address,
&nwi->ipfix_collector_ip);
Expand Down Expand Up @@ -854,7 +854,7 @@ upf_node_id_command_fn (vlib_main_t *vm, unformat_input_t *main_input,
unformat_input_t _line_input, *line_input = &_line_input;
clib_error_t *error = NULL;
u8 *fqdn = 0;
pfcp_node_id_t node_id = { .type = (u8) ~0 };
pfcp_ie_node_id_t node_id = { .type = (u8) ~0 };

if (!unformat_user (main_input, unformat_line_input, line_input))
return 0;
Expand Down Expand Up @@ -905,7 +905,7 @@ upf_show_node_id_command_fn (vlib_main_t *vm, unformat_input_t *main_input,
vlib_cli_command_t *cmd)
{
upf_main_t *gtm = &upf_main;
vlib_cli_output (vm, "Node ID: %U", format_node_id, &gtm->node_id);
vlib_cli_output (vm, "Node ID: %U", format_pfcp_ie_node_id, &gtm->node_id);
return NULL;
}

Expand Down Expand Up @@ -1282,7 +1282,7 @@ upf_show_assoc_command_fn (vlib_main_t *vm, unformat_input_t *main_input,

if (has_ip && has_fqdn)
{
pfcp_node_id_t node_id;
pfcp_ie_node_id_t node_id;

if (has_ip)
{
Expand Down
4 changes: 2 additions & 2 deletions upf/upf_ipfix_templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@

#define IPFIX_VALUE_MOBILE_IMSI(v, n, c) \
do { \
uword l = tbcd_len (v, n); \
uword l = pfcp_tbcd_len (v, n); \
to_b->data[offset++] = l; \
decode_tbcd (v, n, to_b->data + offset, l); \
decode_pfcp_tbcd (v, n, to_b->data + offset, l); \
offset += l; \
} while (0)

Expand Down

0 comments on commit fe7de96

Please sign in to comment.