summaryrefslogtreecommitdiffstats
path: root/src/vnet/pg/pg.h
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2021-06-03 14:43:21 +0000
committerOle Tr�an <otroan@employees.org>2021-06-14 13:12:34 +0000
commit6197cb730e1571ca69859489c0ae7ea90a5c5fd4 (patch)
tree769f178533896318ed98c0014987169d24db94db /src/vnet/pg/pg.h
parent52c33d60bc63626d400067e38ab0af312fdb8594 (diff)
pg: A Tunnel mode variant of a pg interface
Type: feature this allows VPP to simulate linux tun devices. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I3adf38b49a254804370f78edd5d275d192fd00a6
Diffstat (limited to 'src/vnet/pg/pg.h')
-rw-r--r--src/vnet/pg/pg.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/vnet/pg/pg.h b/src/vnet/pg/pg.h
index da5af25b22e..ffa2f8a82f4 100644
--- a/src/vnet/pg/pg.h
+++ b/src/vnet/pg/pg.h
@@ -299,6 +299,13 @@ pg_free_edit_group (pg_stream_t * s)
_vec_len (s->edit_groups) = i;
}
+typedef enum pg_interface_mode_t_
+{
+ PG_MODE_ETHERNET,
+ PG_MODE_IP4,
+ PG_MODE_IP6,
+} pg_interface_mode_t;
+
typedef struct
{
/* TX lock */
@@ -316,6 +323,7 @@ typedef struct
u32 gso_size;
pcap_main_t pcap_main;
char *pcap_file_name;
+ pg_interface_mode_t mode;
mac_address_t *allowed_mcast_macs;
} pg_interface_t;
@@ -373,9 +381,9 @@ void pg_interface_enable_disable_coalesce (pg_interface_t * pi, u8 enable,
u32 tx_node_index);
/* Find/create free packet-generator interface index. */
-u32 pg_interface_add_or_get (pg_main_t * pg, uword stream_index,
- u8 gso_enabled, u32 gso_size,
- u8 coalesce_enabled);
+u32 pg_interface_add_or_get (pg_main_t *pg, uword stream_index, u8 gso_enabled,
+ u32 gso_size, u8 coalesce_enabled,
+ pg_interface_mode_t mode);
always_inline pg_node_t *
pg_get_node (uword node_index)