X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=VNFs%2FDPPD-PROX%2Fprox_port_cfg.h;h=82d58f765d9d9c57f378029882d5689fcf8e8787;hb=18dbfb93ed8aa67fc9266fa1a6ab40baaf54872a;hp=6a02cf0b228e9a0871a346c11d1e30b314728f8a;hpb=14662f0369b03038ac2a73d183736300fb9ca2a9;p=samplevnf.git diff --git a/VNFs/DPPD-PROX/prox_port_cfg.h b/VNFs/DPPD-PROX/prox_port_cfg.h index 6a02cf0b..82d58f76 100644 --- a/VNFs/DPPD-PROX/prox_port_cfg.h +++ b/VNFs/DPPD-PROX/prox_port_cfg.h @@ -1,5 +1,5 @@ /* -// Copyright (c) 2010-2017 Intel Corporation +// Copyright (c) 2010-2020 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,18 +21,25 @@ #include #include #include +#if RTE_VERSION >= RTE_VERSION_NUM(22,11,0,0) +#include // Please configure DPDK with meson option -Denable_driver_sdk=true +#else #if RTE_VERSION >= RTE_VERSION_NUM(17,11,0,0) #include #endif +#endif #include +#include "prox_compat.h" #include "prox_globals.h" +#include "ip_subnet.h" enum addr_type {PROX_PORT_MAC_HW, PROX_PORT_MAC_SET, PROX_PORT_MAC_RAND}; #define IPV4_CKSUM 1 #define UDP_CKSUM 2 #define NB_MCAST_ADDR 16 +#define PROX_MAX_VLAN_TAGS 256 struct prox_port_cfg { struct rte_mempool *pool[32]; /* Rx/Tx mempool */ @@ -53,8 +60,9 @@ struct prox_port_cfg { uint32_t max_link_speed; uint32_t mtu; enum addr_type type; - struct ether_addr eth_addr; /* port MAC address */ - char name[MAX_NAME_SIZE]; + prox_rte_ether_addr eth_addr; /* port MAC address */ + char names[PROX_MAX_VLAN_TAGS][MAX_NAME_BUFFER_SIZE]; + char vdev[MAX_NAME_SIZE]; char short_name[MAX_NAME_SIZE]; char driver_name[MAX_NAME_SIZE]; char rx_ring[MAX_NAME_SIZE]; @@ -77,7 +85,17 @@ struct prox_port_cfg { uint16_t min_tx_desc; uint16_t max_tx_desc; uint32_t nb_mc_addr; - struct ether_addr mc_addr[NB_MCAST_ADDR]; + uint8_t available; + prox_rte_ether_addr mc_addr[NB_MCAST_ADDR]; + int dpdk_mapping; + struct ip4_subnet ip_addr[PROX_MAX_VLAN_TAGS]; + int fds[PROX_MAX_VLAN_TAGS]; + uint32_t vlan_tags[PROX_MAX_VLAN_TAGS]; + uint8_t is_vdev; + uint8_t virtual; + uint8_t all_rx_queues; + uint16_t n_vlans; + uint32_t v6_mask_length; }; extern rte_atomic32_t lsc;