/*
*------------------------------------------------------------------
* Copyright (c) 2018 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 <vlib/vlib.h>
#include <vlib/unix/unix.h>
#include <vlib/pci/pci.h>
#include <vnet/ethernet/ethernet.h>
#include <vat/vat.h>
#include <vlibapi/api.h>
#include <vlibmemory/api.h>
#include <vppinfra/error.h>
#include <avf/avf.h>
#define __plugin_msg_base avf_test_main.msg_id_base
#include <vlibapi/vat_helper_macros.h>
/* declare message IDs */
#include <avf/avf.api_enum.h>
#include <avf/avf.api_types.h>
typedef struct
{
/* API message ID base */
u16 msg_id_base;
vat_main_t *vat_main;
} avf_test_main_t;
avf_test_main_t avf_test_main;
/* avf create API */
static int
api_avf_create (vat_main_t * vam)
{
unformat_input_t *i = vam->input;
vl_api_avf_create_t *mp;
avf_create_if_args_t args;
uint32_t tmp;
int ret;
u32 x[4];
clib_memset (&args, 0, sizeof (avf_create_if_args_t));
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
if (unformat