aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2021-06-03 14:59:47 +0000
committerNeale Ranns <neale@graphiant.com>2021-06-07 07:19:00 +0000
commit68d48d94a84f6499a16cd362d0a225b1720baf67 (patch)
tree804f88db5d8f4f78ccf4523a065f7ec8ab82b6a2 /src/vnet/ethernet
parent2645f68985df4955fd8a161224595dad9f4ab488 (diff)
pg: Reduce the inclusion of pg.h
Type: style reduce the number of files recompiled after changing pg.h from 1110 to 102. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I50611eba818eeb3a2dffd437a3c72c77766bed80
Diffstat (limited to 'src/vnet/ethernet')
-rw-r--r--src/vnet/ethernet/ethernet.h12
-rw-r--r--src/vnet/ethernet/node.c11
2 files changed, 12 insertions, 11 deletions
diff --git a/src/vnet/ethernet/ethernet.h b/src/vnet/ethernet/ethernet.h
index a83b0f39295..f3dd1a24a4f 100644
--- a/src/vnet/ethernet/ethernet.h
+++ b/src/vnet/ethernet/ethernet.h
@@ -43,7 +43,6 @@
#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 */
@@ -404,16 +403,7 @@ uword unformat_ethernet_interface (unformat_input_t * input, va_list * args);
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)
diff --git a/src/vnet/ethernet/node.c b/src/vnet/ethernet/node.c
index 88b4a70a28a..f470c1c7b46 100644
--- a/src/vnet/ethernet/node.c
+++ b/src/vnet/ethernet/node.c
@@ -2237,6 +2237,17 @@ next_by_ethertype_register (next_by_ethertype_t * l3_next,
}
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)
{
__attribute__ ((unused)) vlan_table_t *invalid_vlan_table;