vlib: refactor checksum offload support
[vpp.git] / src / vnet / pg / pg.h
index 06e6126..da5af25 100644 (file)
@@ -45,6 +45,7 @@
 #include <vppinfra/fifo.h>     /* for buffer_fifo */
 #include <vppinfra/pcap.h>
 #include <vnet/interface.h>
+#include <vnet/ethernet/mac_address.h>
 #include <vnet/gso/gro.h>
 
 extern vnet_device_class_t pg_dev_class;
@@ -124,9 +125,12 @@ typedef struct pg_stream_t
      for max_packet_bytes. */
   u32 buffer_bytes;
 
-  /* Buffer flags to set in each packet e.g. checksum offload flags */
+  /* Buffer flags to set in each packet e.g. l2 valid  flags */
   u32 buffer_flags;
 
+  /* Buffer offload flags to set in each packet e.g. checksum offload flags */
+  u32 buffer_oflags;
+
   /* Last packet length if packet size edit type is increment. */
   u32 last_increment_packet_size;
 
@@ -312,6 +316,8 @@ typedef struct
   u32 gso_size;
   pcap_main_t pcap_main;
   char *pcap_file_name;
+
+  mac_address_t *allowed_mcast_macs;
 } pg_interface_t;
 
 /* Per VLIB node data. */
@@ -335,6 +341,7 @@ typedef struct pg_main_t
   /* Pool of interfaces. */
   pg_interface_t *interfaces;
   uword *if_index_by_if_id;
+  uword *if_id_by_sw_if_index;
 
   /* Vector of buffer indices for use in pg_stream_fill_replay, per thread */
   u32 **replay_buffers_by_thread;
@@ -398,8 +405,8 @@ clib_error_t *pg_capture (pg_capture_args_t * a);
 
 typedef struct
 {
-  vlib_buffer_t buffer;
   u32 buffer_index;
+  vlib_buffer_t buffer;
 }
 pg_output_trace_t;