#include <vnet/fib/fib_entry_src.h>
#include <vnet/adj/adj_nbr.h>
#include <vnet/adj/adj_mcast.h>
+#include <vnet/pg/pg.h>
#include <vnet/ip-neighbor/ip_neighbor.h>
#include <vnet/ip-neighbor/ip_neighbor_dp.h>
#include <vnet/devices/virtio/vhost_user.h>
#include <vnet/devices/virtio/vhost_user_inline.h>
+#include <vnet/ip/ip4_packet.h>
+#include <vnet/ip/ip6_packet.h>
+
/*
* When an RX queue is down but active, received packets
* must be discarded. This value controls up to how many
#include <vnet/vnet.h>
#include <vnet/ethernet/packet.h>
#include <vnet/ethernet/mac_address.h>
-#include <vnet/pg/pg.h>
#include <vnet/feature/feature.h>
/* ethernet-input frame flags and scalar data */
uword unformat_pg_ethernet_header (unformat_input_t * input, va_list * args);
-always_inline void
-ethernet_setup_node (vlib_main_t * vm, u32 node_index)
-{
- vlib_node_t *n = vlib_get_node (vm, node_index);
- pg_node_t *pn = pg_get_node (node_index);
-
- n->format_buffer = format_ethernet_header_with_length;
- n->unformat_buffer = unformat_ethernet_header;
- pn->unformat_edit = unformat_pg_ethernet_header;
-}
+void ethernet_setup_node (vlib_main_t *vm, u32 node_index);
always_inline ethernet_header_t *
ethernet_buffer_get_header (vlib_buffer_t * b)
return 0;
}
+void
+ethernet_setup_node (vlib_main_t *vm, u32 node_index)
+{
+ vlib_node_t *n = vlib_get_node (vm, node_index);
+ pg_node_t *pn = pg_get_node (node_index);
+
+ n->format_buffer = format_ethernet_header_with_length;
+ n->unformat_buffer = unformat_ethernet_header;
+ pn->unformat_edit = unformat_pg_ethernet_header;
+}
+
void
ethernet_input_init (vlib_main_t * vm, ethernet_main_t * em)
{
#include <vnet/vnet.h>
#include <vnet/hdlc/packet.h>
-#include <vnet/pg/pg.h>
extern vnet_hw_interface_class_t hdlc_hw_interface_class;
unformat_function_t unformat_hdlc_header;
unformat_function_t unformat_pg_hdlc_header;
-always_inline void
-hdlc_setup_node (vlib_main_t * vm, u32 node_index)
-{
- vlib_node_t *n = vlib_get_node (vm, node_index);
- pg_node_t *pn = pg_get_node (node_index);
-
- n->format_buffer = format_hdlc_header_with_length;
- n->unformat_buffer = unformat_hdlc_header;
- pn->unformat_edit = unformat_pg_hdlc_header;
-}
-
void
hdlc_register_input_protocol (vlib_main_t * vm,
hdlc_protocol_t protocol, u32 node_index);
return 0;
}
+static void
+hdlc_setup_node (vlib_main_t *vm, u32 node_index)
+{
+ vlib_node_t *n = vlib_get_node (vm, node_index);
+ pg_node_t *pn = pg_get_node (node_index);
+
+ n->format_buffer = format_hdlc_header_with_length;
+ n->unformat_buffer = unformat_hdlc_header;
+ pn->unformat_edit = unformat_pg_hdlc_header;
+}
+
static clib_error_t *
hdlc_input_init (vlib_main_t * vm)
{
#include <vnet/dpo/classify_dpo.h>
#include <vnet/mfib/mfib_table.h> /* for mFIB table and entry creation */
#include <vnet/adj/adj_dp.h>
+#include <vnet/pg/pg.h>
#include <vnet/ip/ip4_forward.h>
#include <vnet/interface_output.h>
#include <vnet/ip/ip4_input.h>
#include <vnet/ethernet/ethernet.h>
+#include <vnet/pg/pg.h>
#include <vnet/ppp/ppp.h>
#include <vnet/hdlc/hdlc.h>
#include <vnet/util/throttle.h>
#include <vnet/dpo/load_balance_map.h>
#include <vnet/dpo/classify_dpo.h>
#include <vnet/classify/vnet_classify.h>
+#include <vnet/pg/pg.h>
#ifndef CLIB_MARCH_VARIANT
#include <vppinfra/bihash_template.c>
#include <vnet/ethernet/ethernet.h>
#include <vnet/ppp/ppp.h>
#include <vnet/hdlc/hdlc.h>
+#include <vnet/pg/pg.h>
typedef struct
{
#include <vlib/vlib.h>
#include <vnet/vnet.h>
-#include <vnet/pg/pg.h>
#include <vnet/ethernet/ethernet.h>
#include <vnet/ethernet/packet.h>
#include <vnet/ip/ip_packet.h>
#define included_llc_h
#include <vnet/vnet.h>
-#include <vnet/pg/pg.h>
/* Protocol (SSAP/DSAP) types. */
#define foreach_llc_protocol \
unformat_function_t unformat_llc_header;
unformat_function_t unformat_pg_llc_header;
-always_inline void
-llc_setup_node (vlib_main_t * vm, u32 node_index)
-{
- vlib_node_t *n = vlib_get_node (vm, node_index);
- pg_node_t *pn = pg_get_node (node_index);
-
- n->format_buffer = format_llc_header_with_length;
- n->unformat_buffer = unformat_llc_header;
- pn->unformat_edit = unformat_pg_llc_header;
-}
-
#endif /* included_llc_h */
/*
*/
#include <vlib/vlib.h>
+#include <vnet/pg/pg.h>
#include <vnet/llc/llc.h>
#define foreach_llc_input_next \
};
/* *INDENT-ON* */
+static void
+llc_setup_node (vlib_main_t *vm, u32 node_index)
+{
+ vlib_node_t *n = vlib_get_node (vm, node_index);
+ pg_node_t *pn = pg_get_node (node_index);
+
+ n->format_buffer = format_llc_header_with_length;
+ n->unformat_buffer = unformat_llc_header;
+ pn->unformat_edit = unformat_pg_llc_header;
+}
+
static clib_error_t *
llc_input_init (vlib_main_t * vm)
{
};
/* *INDENT-ON* */
+static void
+osi_setup_node (vlib_main_t *vm, u32 node_index)
+{
+ vlib_node_t *n = vlib_get_node (vm, node_index);
+ pg_node_t *pn = pg_get_node (node_index);
+
+ n->format_buffer = format_osi_header_with_length;
+ n->unformat_buffer = unformat_osi_header;
+ pn->unformat_edit = unformat_pg_osi_header;
+}
+
static clib_error_t *
osi_input_init (vlib_main_t * vm)
{
#define included_osi_h
#include <vnet/vnet.h>
-#include <vnet/pg/pg.h>
#define foreach_osi_protocol \
_ (null, 0x0) \
unformat_function_t unformat_osi_header;
unformat_function_t unformat_pg_osi_header;
-always_inline void
-osi_setup_node (vlib_main_t * vm, u32 node_index)
-{
- vlib_node_t *n = vlib_get_node (vm, node_index);
- pg_node_t *pn = pg_get_node (node_index);
-
- n->format_buffer = format_osi_header_with_length;
- n->unformat_buffer = unformat_osi_header;
- pn->unformat_edit = unformat_pg_osi_header;
-}
-
void osi_register_input_protocol (osi_protocol_t protocol, u32 node_index);
format_function_t format_osi_header;
return 0;
}
+static void
+ppp_setup_node (vlib_main_t *vm, u32 node_index)
+{
+ vlib_node_t *n = vlib_get_node (vm, node_index);
+ pg_node_t *pn = pg_get_node (node_index);
+
+ n->format_buffer = format_ppp_header_with_length;
+ n->unformat_buffer = unformat_ppp_header;
+ pn->unformat_edit = unformat_pg_ppp_header;
+}
+
static clib_error_t *
ppp_input_init (vlib_main_t * vm)
{
#include <vnet/vnet.h>
#include <vnet/ppp/packet.h>
-#include <vnet/pg/pg.h>
extern vnet_hw_interface_class_t ppp_hw_interface_class;
unformat_function_t unformat_ppp_header;
unformat_function_t unformat_pg_ppp_header;
-always_inline void
-ppp_setup_node (vlib_main_t * vm, u32 node_index)
-{
- vlib_node_t *n = vlib_get_node (vm, node_index);
- pg_node_t *pn = pg_get_node (node_index);
-
- n->format_buffer = format_ppp_header_with_length;
- n->unformat_buffer = unformat_ppp_header;
- pn->unformat_edit = unformat_pg_ppp_header;
-}
-
void
ppp_register_input_protocol (vlib_main_t * vm,
ppp_protocol_t protocol, u32 node_index);
};
/* *INDENT-ON* */
+static void
+snap_setup_node (vlib_main_t *vm, u32 node_index)
+{
+ vlib_node_t *n = vlib_get_node (vm, node_index);
+ pg_node_t *pn = pg_get_node (node_index);
+
+ n->format_buffer = format_snap_header_with_length;
+ n->unformat_buffer = unformat_snap_header;
+ pn->unformat_edit = unformat_pg_snap_header;
+}
+
static clib_error_t *
snap_input_init (vlib_main_t * vm)
{
#define included_snap_h
#include <vnet/vnet.h>
-#include <vnet/pg/pg.h>
#define foreach_ieee_oui \
_ (0x000000, ethernet) \
unformat_function_t unformat_snap_header;
unformat_function_t unformat_pg_snap_header;
-always_inline void
-snap_setup_node (vlib_main_t * vm, u32 node_index)
-{
- vlib_node_t *n = vlib_get_node (vm, node_index);
- pg_node_t *pn = pg_get_node (node_index);
-
- n->format_buffer = format_snap_header_with_length;
- n->unformat_buffer = unformat_snap_header;
- pn->unformat_edit = unformat_pg_snap_header;
-}
-
#endif /* included_snap_h */
/*
#include <vlib/vlib.h>
#include <vnet/ip/ip_packet.h> /* for ip_csum_fold */
#include <vnet/srp/srp.h>
+#include <vnet/pg/pg.h>
srp_main_t srp_main;
.state = VLIB_NODE_STATE_DISABLED,
};
+static void
+srp_setup_node (vlib_main_t *vm, u32 node_index)
+{
+ vlib_node_t *n = vlib_get_node (vm, node_index);
+ pg_node_t *pn = pg_get_node (node_index);
+ n->format_buffer = format_srp_header_with_length;
+ n->unformat_buffer = unformat_srp_header;
+ pn->unformat_edit = unformat_pg_srp_header;
+}
+
static clib_error_t * srp_init (vlib_main_t * vm)
{
srp_main_t * sm = &srp_main;
#include <vnet/vnet.h>
#include <vnet/srp/packet.h>
#include <vnet/ethernet/ethernet.h>
-#include <vnet/pg/pg.h>
extern vnet_hw_interface_class_t srp_hw_interface_class;
uword unformat_pg_srp_header (unformat_input_t * input, va_list * args);
-always_inline void
-srp_setup_node (vlib_main_t * vm, u32 node_index)
-{
- vlib_node_t * n = vlib_get_node (vm, node_index);
- pg_node_t * pn = pg_get_node (node_index);
- n->format_buffer = format_srp_header_with_length;
- n->unformat_buffer = unformat_srp_header;
- pn->unformat_edit = unformat_pg_srp_header;
-}
-
#define foreach_srp_error \
_ (NONE, "no error") \
_ (UNKNOWN_MODE, "unknown mode in SRP header") \