summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/prox_port_cfg.h
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2020-07-10 12:59:40 +0200
committerXavier Simonart <xavier.simonart@intel.com>2020-09-21 10:35:03 +0200
commit9a1e1e9336b39178362c6ccadd4a9716f865047f (patch)
treeddcf3543c1145183e37563597b7848dc675959e8 /VNFs/DPPD-PROX/prox_port_cfg.h
parentdcbc010d7e50d5d42ce5ecba9b6a2234998e7c88 (diff)
Added support for multiple vlans in ipv4 vdev mode
When the following conditions are met: - ipv4 - vdev enabled Then multiple vlans are supported. Multiple vlans can be configured using the vlan_tag option within the port section of the config file. Multiple (different) local_ipv4/prefix must then also be configured within the same section. Note that for ipv6 multiple vlans are not supported (yet) Also, when vdev is not enabled, multiple vlans are also not (yet) supported. Change-Id: I38b6cd98ff2a0f484d1bf0910b15413ba21ae6d6 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/prox_port_cfg.h')
-rw-r--r--VNFs/DPPD-PROX/prox_port_cfg.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/VNFs/DPPD-PROX/prox_port_cfg.h b/VNFs/DPPD-PROX/prox_port_cfg.h
index f5929a72..738ce86a 100644
--- a/VNFs/DPPD-PROX/prox_port_cfg.h
+++ b/VNFs/DPPD-PROX/prox_port_cfg.h
@@ -28,12 +28,14 @@
#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 */
@@ -55,7 +57,7 @@ struct prox_port_cfg {
uint32_t mtu;
enum addr_type type;
prox_rte_ether_addr eth_addr; /* port MAC address */
- char name[MAX_NAME_SIZE];
+ char names[PROX_MAX_VLAN_TAGS][MAX_NAME_SIZE];
char vdev[MAX_NAME_SIZE];
char short_name[MAX_NAME_SIZE];
char driver_name[MAX_NAME_SIZE];
@@ -82,12 +84,12 @@ struct prox_port_cfg {
uint8_t available;
prox_rte_ether_addr mc_addr[NB_MCAST_ADDR];
int dpdk_mapping;
- uint32_t ip;
- int fd;
- uint32_t vlan_tag;
- uint8_t prefix;
+ 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 all_rx_queues;
+ uint8_t all_rx_queues;
+ uint16_t n_vlans;
};
extern rte_atomic32_t lsc;