diff options
author | Neale Ranns <nranns@cisco.com> | 2019-12-02 23:28:50 +0000 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-12-03 19:59:31 +0000 |
commit | 960eeea7ea48d91c1f2ec3a85a7a84f56619be2a (patch) | |
tree | 3ca930048e90cb1ff2b2c9115331d5de9005001c /src/vnet/adj | |
parent | 9534696b4637185c9f296375e63c50d8976d153d (diff) |
fib: constify the adjacency in the rewrite nodes
Type: refactor
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I3aad20b35d89fc541fdf185096d71ca12b09a6e2
Diffstat (limited to 'src/vnet/adj')
-rw-r--r-- | src/vnet/adj/adj.h | 2 | ||||
-rw-r--r-- | src/vnet/adj/rewrite.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/vnet/adj/adj.h b/src/vnet/adj/adj.h index 58e5ebf5d98..cd6e8382ba5 100644 --- a/src/vnet/adj/adj.h +++ b/src/vnet/adj/adj.h @@ -150,7 +150,7 @@ struct ip_adjacency_t_; * @brief A function type for post-rewrite fixups on midchain adjacency */ typedef void (*adj_midchain_fixup_t) (vlib_main_t * vm, - struct ip_adjacency_t_ * adj, + const struct ip_adjacency_t_ * adj, vlib_buffer_t * b0, const void *data); diff --git a/src/vnet/adj/rewrite.h b/src/vnet/adj/rewrite.h index c2084ea0a4a..5c1d24ea890 100644 --- a/src/vnet/adj/rewrite.h +++ b/src/vnet/adj/rewrite.h @@ -154,7 +154,7 @@ vnet_rewrite_get_data_internal (vnet_rewrite_header_t * rw, int max_size) vnet_rewrite_get_data_internal (&((rw).rewrite_header), sizeof ((rw).rewrite_data)) always_inline void -_vnet_rewrite_one_header (vnet_rewrite_header_t * h0, +_vnet_rewrite_one_header (const vnet_rewrite_header_t * h0, void *packet0, int most_likely_size) { /* 0xfefe => poisoned adjacency => crash */ @@ -172,8 +172,8 @@ _vnet_rewrite_one_header (vnet_rewrite_header_t * h0, } always_inline void -_vnet_rewrite_two_headers (vnet_rewrite_header_t * h0, - vnet_rewrite_header_t * h1, +_vnet_rewrite_two_headers (const vnet_rewrite_header_t * h0, + const vnet_rewrite_header_t * h1, void *packet0, void *packet1, int most_likely_size) { /* 0xfefe => poisoned adjacency => crash */ |