FD.io VPP  v21.01.1
Vector Packet Processing
adj_glean.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include <vnet/adj/adj.h>
17 #include <vnet/adj/adj_internal.h>
18 #include <vnet/fib/fib_walk.h>
19 
20 /*
21  * The 'DB' of all glean adjs.
22  * There is one glean per-{interface, protocol, connected prefix}
23  */
25 
26 static inline u32
28 {
29  switch (proto) {
30  case FIB_PROTOCOL_IP4:
31  return (ip4_glean_node.index);
32  case FIB_PROTOCOL_IP6:
33  return (ip6_glean_node.index);
34  case FIB_PROTOCOL_MPLS:
35  break;
36  }
37  ASSERT(0);
38  return (~0);
39 }
40 
41 static adj_index_t
44  const ip46_address_t *nh_addr)
45 {
46  uword *p;
47 
48  if (vec_len(adj_gleans[proto]) <= sw_if_index)
49  return (ADJ_INDEX_INVALID);
50 
51  p = hash_get_mem (adj_gleans[proto][sw_if_index], nh_addr);
52 
53  if (p)
54  return (p[0]);
55 
56  return (ADJ_INDEX_INVALID);
57 }
58 
59 static void
62  const ip46_address_t *nh_addr,
63  adj_index_t ai)
64 {
66 
68 
69  vec_validate(adj_gleans[proto], sw_if_index);
70 
71  if (NULL == adj_gleans[proto][sw_if_index])
72  {
74  hash_create_mem (0, sizeof(ip46_address_t), sizeof(adj_index_t));
75  }
76 
77  hash_set_mem_alloc (&adj_gleans[proto][sw_if_index],
78  nh_addr, ai);
79 
81 }
82 
83 static void
86  const ip46_address_t *nh_addr)
87 {
89 
91 
92  ASSERT(ADJ_INDEX_INVALID != adj_glean_db_lookup(proto, sw_if_index, nh_addr));
93  hash_unset_mem_free (&adj_gleans[proto][sw_if_index],
94  nh_addr);
95 
96  if (0 == hash_elts(adj_gleans[proto][sw_if_index]))
97  {
98  hash_free(adj_gleans[proto][sw_if_index]);
99  adj_gleans[proto][sw_if_index] = NULL;
100  }
102 }
103 
104 /*
105  * adj_glean_add_or_lock
106  *
107  * The next_hop address here is used for source address selection in the DP.
108  * The glean adj is added to an interface's connected prefix, the next-hop
109  * passed here is the local prefix on the same interface.
110  */
113  vnet_link_t linkt,
115  const fib_prefix_t *conn)
116 {
117  ip_adjacency_t * adj;
118  adj_index_t ai;
119 
120  ai = adj_glean_db_lookup(proto, sw_if_index, &conn->fp_addr);
121 
122  if (ADJ_INDEX_INVALID == ai)
123  {
124  adj = adj_alloc(proto);
125 
127  adj->ia_nh_proto = proto;
128  adj->ia_link = linkt;
129  adj->ia_node_index = adj_get_glean_node(proto);
130  ai = adj_get_index(adj);
131  adj_lock(ai);
132 
133  ASSERT(conn);
134  fib_prefix_normalize(conn, &adj->sub_type.glean.rx_pfx);
135  adj->rewrite_header.sw_if_index = sw_if_index;
136  adj->rewrite_header.data_bytes = 0;
137  adj->rewrite_header.max_l3_packet_bytes =
139  vnet_link_to_mtu(linkt));
140 
142  sw_if_index,
143  ai);
144 
145  adj_glean_db_insert(proto, sw_if_index,
146  &adj->sub_type.glean.rx_pfx.fp_addr, ai);
147  }
148  else
149  {
150  adj = adj_get(ai);
151  adj_lock(ai);
152  }
153 
155 
156  return (ai);
157 }
158 
159 /**
160  * adj_glean_update_rewrite
161  */
162 void
164 {
165  ip_adjacency_t *adj;
166 
167  ASSERT(ADJ_INDEX_INVALID != adj_index);
168 
169  adj = adj_get(adj_index);
170 
173  adj->rewrite_header.sw_if_index,
174  adj->ia_node_index,
176  &adj->rewrite_header,
177  sizeof (adj->rewrite_data));
178 }
179 
180 static adj_walk_rc_t
182  void *data)
183 {
185 
186  return (ADJ_WALK_RC_CONTINUE);
187 }
188 
189 void
191 {
192  adj_glean_walk (sw_if_index, adj_glean_update_rewrite_walk, NULL);
193 }
194 
195 void
197  adj_walk_cb_t cb,
198  void *data)
199 {
201 
203  {
204  adj_index_t ai, *aip, *ais = NULL;
205  ip46_address_t *conn;
206 
207  if (vec_len(adj_gleans[proto]) <= sw_if_index ||
208  NULL == adj_gleans[proto][sw_if_index])
209  continue;
210 
211  /*
212  * Walk first to collect the indices
213  * then walk the collection. This is safe
214  * to modifications of the hash table
215  */
216  hash_foreach_mem(conn, ai, adj_gleans[proto][sw_if_index],
217  ({
218  vec_add1(ais, ai);
219  }));
220 
221  vec_foreach(aip, ais)
222  {
223  if (ADJ_WALK_RC_STOP == cb(*aip, data))
224  break;
225  }
226  vec_free(ais);
227  }
228 }
229 
233  const ip46_address_t *nh)
234 {
235  if (NULL != nh)
236  {
237  return adj_glean_db_lookup(proto, sw_if_index, nh);
238  }
239  else
240  {
241  ip46_address_t *conn;
242  adj_index_t ai;
243 
244  if (vec_len(adj_gleans[proto]) <= sw_if_index ||
245  NULL == adj_gleans[proto][sw_if_index])
246  return (ADJ_INDEX_INVALID);
247 
248  hash_foreach_mem(conn, ai, adj_gleans[proto][sw_if_index],
249  ({
250  return (ai);
251  }));
252  }
253  return (ADJ_INDEX_INVALID);
254 }
255 
256 const ip46_address_t *
259  const ip46_address_t *nh)
260 {
261  const ip46_address_t *conn, *source;
262  const ip_adjacency_t *adj;
263  adj_index_t ai;
264 
265  if (vec_len(adj_gleans[proto]) <= sw_if_index ||
266  NULL == adj_gleans[proto][sw_if_index])
267  return (NULL);
268 
269  fib_prefix_t pfx = {
271  .fp_proto = proto,
272  };
273 
274  if (nh)
275  pfx.fp_addr = *nh;
276 
277  /*
278  * An interface can have more than one glean address. Where
279  * possible we want to return a source address from the same
280  * subnet as the destination. If this is not possible then any address
281  * will do.
282  */
283  source = NULL;
284 
285  hash_foreach_mem(conn, ai, adj_gleans[proto][sw_if_index],
286  ({
287  adj = adj_get(ai);
288 
289  if (adj->sub_type.glean.rx_pfx.fp_len > 0)
290  {
291  source = &adj->sub_type.glean.rx_pfx.fp_addr;
292 
293  /* if no destination is specified use the just glean */
294  if (NULL == nh)
295  return (source);
296 
297  /* check the clean covers the desintation */
298  if (fib_prefix_is_cover(&adj->sub_type.glean.rx_pfx, &pfx))
299  return (source);
300  }
301  }));
302 
303  return (source);
304 }
305 
306 void
308 {
309  fib_prefix_t norm;
310 
311  fib_prefix_normalize(&adj->sub_type.glean.rx_pfx,
312  &norm);
314  adj->rewrite_header.sw_if_index,
315  &norm.fp_addr);
316 }
317 
318 static adj_walk_rc_t
320  void *data)
321 {
323 
324  fib_walk_sync(FIB_NODE_TYPE_ADJ, ai, &bw_ctx);
325 
326  return (ADJ_WALK_RC_CONTINUE);
327 }
328 
329 static clib_error_t *
332  u32 flags)
333 {
334  /*
335  * for each glean on the interface trigger a walk back to the children
336  */
337  fib_node_back_walk_ctx_t bw_ctx = {
341  };
342 
343  adj_glean_walk (sw_if_index, adj_glean_start_backwalk, &bw_ctx);
344 
345  return (NULL);
346 }
347 
349 
350 /**
351  * @brief Invoked on each SW interface of a HW interface when the
352  * HW interface state changes
353  */
354 static walk_rc_t
357  void *arg)
358 {
359  adj_glean_interface_state_change(vnm, sw_if_index, (uword) arg);
360 
361  return (WALK_CONTINUE);
362 }
363 
364 /**
365  * @brief Registered callback for HW interface state changes
366  */
367 static clib_error_t *
369  u32 hw_if_index,
370  u32 flags)
371 {
372  /*
373  * walk SW interfaces on the HW
374  */
375  uword sw_flags;
376 
377  sw_flags = ((flags & VNET_HW_INTERFACE_FLAG_LINK_UP) ?
379  0);
380 
381  vnet_hw_interface_walk_sw(vnm, hw_if_index,
383  (void*) sw_flags);
384 
385  return (NULL);
386 }
387 
390 
391 static clib_error_t *
394  u32 is_add)
395 {
396  if (is_add)
397  {
398  /*
399  * not interested in interface additions. we will not back walk
400  * to resolve paths through newly added interfaces. Why? The control
401  * plane should have the brains to add interfaces first, then routes.
402  * So the case where there are paths with a interface that matches
403  * one just created is the case where the path resolved through an
404  * interface that was deleted, and still has not been removed. The
405  * new interface added, is NO GUARANTEE that the interface being
406  * added now, even though it may have the same sw_if_index, is the
407  * same interface that the path needs. So tough!
408  * If the control plane wants these routes to resolve it needs to
409  * remove and add them again.
410  */
411  return (NULL);
412  }
413 
414  /*
415  * for each glean on the interface trigger a walk back to the children
416  */
417  fib_node_back_walk_ctx_t bw_ctx = {
419  };
420 
421  adj_glean_walk (sw_if_index, adj_glean_start_backwalk, &bw_ctx);
422 
423  return (NULL);
424 }
425 
427 
428 u8*
429 format_adj_glean (u8* s, va_list *ap)
430 {
431  index_t index = va_arg(*ap, index_t);
432  CLIB_UNUSED(u32 indent) = va_arg(*ap, u32);
433  ip_adjacency_t * adj = adj_get(index);
434 
435  s = format(s, "%U-glean: [src:%U] %U",
437  format_fib_prefix, &adj->sub_type.glean.rx_pfx,
439  &adj->rewrite_header, sizeof (adj->rewrite_data), 0);
440 
441  return (s);
442 }
443 
444 u32
446 {
448  u32 sw_if_index = 0;
449  u64 count = 0;
450 
452  {
453  vec_foreach_index(sw_if_index, adj_gleans[proto])
454  {
455  if (NULL != adj_gleans[proto][sw_if_index])
456  {
457  count += hash_elts(adj_gleans[proto][sw_if_index]);
458  }
459  }
460  }
461  return (count);
462 }
463 
464 static void
466 {
467  adj_lock(dpo->dpoi_index);
468 }
469 static void
471 {
472  adj_unlock(dpo->dpoi_index);
473 }
474 
475 const static dpo_vft_t adj_glean_dpo_vft = {
477  .dv_unlock = adj_dpo_unlock,
478  .dv_format = format_adj_glean,
479  .dv_get_urpf = adj_dpo_get_urpf,
480 };
481 
482 /**
483  * @brief The per-protocol VLIB graph nodes that are assigned to a glean
484  * object.
485  *
486  * this means that these graph nodes are ones from which a glean is the
487  * parent object in the DPO-graph.
488  */
489 const static char* const glean_ip4_nodes[] =
490 {
491  "ip4-glean",
492  NULL,
493 };
494 const static char* const glean_ip6_nodes[] =
495 {
496  "ip6-glean",
497  NULL,
498 };
499 
500 const static char* const * const glean_nodes[DPO_PROTO_NUM] =
501 {
504  [DPO_PROTO_MPLS] = NULL,
505 };
506 
507 void
509 {
510  dpo_register(DPO_ADJACENCY_GLEAN, &adj_glean_dpo_vft, glean_nodes);
511 }
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
Definition: vec.h:509
dpo_lock_fn_t dv_lock
A reference counting lock function.
Definition: dpo.h:411
#define vec_foreach_index(var, v)
Iterate over vector indices.
#define VNET_REWRITE_FOR_SW_INTERFACE_ADDRESS_BROADCAST
Definition: rewrite.h:239
#define CLIB_UNUSED(x)
Definition: clib.h:87
A virtual function table regisitered for a DPO type.
Definition: dpo.h:406
u32 adj_glean_db_size(void)
Return the size of the adjacency database.
Definition: adj_glean.c:445
vl_api_wireguard_peer_flags_t flags
Definition: wireguard.api:105
void adj_lock(adj_index_t adj_index)
Take a reference counting lock on the adjacency.
Definition: adj.c:330
vnet_main_t * vnet_get_main(void)
Definition: misc.c:46
vl_api_fib_path_nh_t nh
Definition: fib_types.api:126
unsigned long u64
Definition: types.h:89
void adj_delegate_adj_created(ip_adjacency_t *adj)
Definition: adj_delegate.c:158
static adj_walk_rc_t adj_glean_start_backwalk(adj_index_t ai, void *data)
Definition: adj_glean.c:319
IP unicast adjacency.
Definition: adj.h:235
#define FIB_PROTOCOL_IP_MAX
Definition outside of enum so it does not need to be included in non-defaulted switch statements...
Definition: fib_types.h:57
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
Definition: dpo.h:41
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
Definition: vec.h:592
adj_index_t adj_glean_get(fib_protocol_t proto, u32 sw_if_index, const ip46_address_t *nh)
Get an existing glean.
Definition: adj_glean.c:231
void vnet_rewrite_for_sw_interface(vnet_main_t *vnm, vnet_link_t link_type, u32 sw_if_index, u32 node_index, void *dst_address, vnet_rewrite_header_t *rw, u32 max_rewrite_bytes)
Deprecated.
Definition: rewrite.c:101
vlib_main_t * vm
Definition: in2out_ed.c:1580
static u32 vnet_sw_interface_get_mtu(vnet_main_t *vnm, u32 sw_if_index, vnet_mtu_t af)
void adj_glean_update_rewrite_itf(u32 sw_if_index)
Definition: adj_glean.c:190
u32 adj_dpo_get_urpf(const dpo_id_t *dpo)
Definition: adj.c:320
unsigned char u8
Definition: types.h:56
u8 data[128]
Definition: ipsec_types.api:90
u8 * format_fib_protocol(u8 *s, va_list *ap)
Definition: fib_types.c:33
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
#define vlib_worker_thread_barrier_sync(X)
Definition: threads.h:205
vnet_link_t ia_link
link/ether-type 1 bytes
Definition: adj.h:343
enum walk_rc_t_ walk_rc_t
Walk return code.
const ip46_address_t * adj_glean_get_src(fib_protocol_t proto, u32 sw_if_index, const ip46_address_t *nh)
Return the source address from the glean.
Definition: adj_glean.c:257
void adj_glean_update_rewrite(adj_index_t adj_index)
adj_glean_update_rewrite
Definition: adj_glean.c:163
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
Definition: adj.h:467
void dpo_register(dpo_type_t type, const dpo_vft_t *vft, const char *const *const *nodes)
For a given DPO type Register:
Definition: dpo.c:327
static walk_rc_t adj_nbr_hw_sw_interface_state_change(vnet_main_t *vnm, u32 sw_if_index, void *arg)
Invoked on each SW interface of a HW interface when the HW interface state changes.
Definition: adj_glean.c:355
void fib_walk_sync(fib_node_type_t parent_type, fib_node_index_t parent_index, fib_node_back_walk_ctx_t *ctx)
Back walk all the children of a FIB node.
Definition: fib_walk.c:745
static adj_walk_rc_t adj_glean_update_rewrite_walk(adj_index_t ai, void *data)
Definition: adj_glean.c:181
enum adj_walk_rc_t_ adj_walk_rc_t
return codes from a adjacency walker callback function
void adj_glean_walk(u32 sw_if_index, adj_walk_cb_t cb, void *data)
Walk all the gleans on an interface.
Definition: adj_glean.c:196
description fragment has unexpected format
Definition: map.api:433
u8 * format_fib_prefix(u8 *s, va_list *args)
Definition: fib_types.c:283
Aggregate type for a prefix.
Definition: fib_types.h:202
int fib_prefix_is_cover(const fib_prefix_t *p1, const fib_prefix_t *p2)
Compare two prefixes for covering relationship.
Definition: fib_types.c:212
void adj_unlock(adj_index_t adj_index)
Release a reference counting lock on the adjacency.
Definition: adj.c:347
void vnet_update_adjacency_for_sw_interface(vnet_main_t *vnm, u32 sw_if_index, u32 ai)
Definition: rewrite.c:179
unsigned int u32
Definition: types.h:88
u16 fp_len
The mask length.
Definition: fib_types.h:206
format_function_t format_vnet_rewrite
Definition: rewrite.h:268
static clib_error_t * adj_glean_interface_delete(vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
Definition: adj_glean.c:392
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
Definition: dpo.h:170
fib_node_bw_reason_flag_t fnbw_reason
The reason/trigger for the backwalk.
Definition: fib_node.h:212
void fib_prefix_normalize(const fib_prefix_t *p, fib_prefix_t *out)
normalise a prefix (i.e.
Definition: fib_types.c:264
#define hash_create_mem(elts, key_bytes, value_bytes)
Definition: hash.h:661
#define ADJ_INDEX_INVALID
Invalid ADJ index - used when no adj is known likewise blazoned capitals INVALID speak volumes where ...
Definition: adj_types.h:36
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
Definition: fib_types.h:225
vl_api_ip_proto_t proto
Definition: acl_types.api:51
vl_api_address_t nh_addr
Definition: lisp_gpe.api:222
static adj_index_t adj_get_index(const ip_adjacency_t *adj)
Get a pointer to an adjacency object from its index.
Definition: adj_internal.h:101
static uword ** adj_gleans[FIB_PROTOCOL_IP_MAX]
Definition: adj_glean.c:24
void vnet_hw_interface_walk_sw(vnet_main_t *vnm, u32 hw_if_index, vnet_hw_sw_interface_walk_t fn, void *ctx)
Walk the SW interfaces on a HW interface - this is the super interface and any sub-interfaces.
Definition: interface.c:1080
static clib_error_t * adj_glean_hw_interface_state_change(vnet_main_t *vnm, u32 hw_if_index, u32 flags)
Registered callback for HW interface state changes.
Definition: adj_glean.c:368
#define hash_free(h)
Definition: hash.h:310
void adj_glean_remove(ip_adjacency_t *adj)
Definition: adj_glean.c:307
static adj_index_t adj_glean_db_lookup(fib_protocol_t proto, u32 sw_if_index, const ip46_address_t *nh_addr)
Definition: adj_glean.c:42
vlib_node_registration_t ip6_glean_node
(constructor) VLIB_REGISTER_NODE (ip6_glean_node)
Definition: ip6_neighbor.c:262
u32 ia_node_index
The VLIB node in which this adj is used to forward packets.
Definition: adj.h:330
This packet matches an "interface route" and packets need to be passed to ARP to find rewrite string ...
Definition: adj.h:68
static void adj_dpo_unlock(dpo_id_t *dpo)
Definition: adj_glean.c:470
#define hash_foreach_mem(key_var, value_var, h, body)
Definition: hash.h:461
void adj_glean_module_init(void)
Module initialisation.
Definition: adj_glean.c:508
static const char *const glean_ip4_nodes[]
The per-protocol VLIB graph nodes that are assigned to a glean object.
Definition: adj_glean.c:489
static void adj_glean_db_remove(fib_protocol_t proto, u32 sw_if_index, const ip46_address_t *nh_addr)
Definition: adj_glean.c:84
u8 fib_prefix_get_host_length(fib_protocol_t proto)
Definition: fib_types.c:234
static clib_error_t * adj_glean_interface_state_change(vnet_main_t *vnm, u32 sw_if_index, u32 flags)
Definition: adj_glean.c:330
static void adj_dpo_lock(dpo_id_t *dpo)
Definition: adj_glean.c:465
#define vec_free(V)
Free vector&#39;s memory (no header).
Definition: vec.h:380
u8 * format_adj_glean(u8 *s, va_list *ap)
Format/display a glean adjacency.
Definition: adj_glean.c:429
adj_walk_rc_t(* adj_walk_cb_t)(adj_index_t ai, void *ctx)
Call back function when walking adjacencies.
Definition: adj_types.h:50
u32 adj_index_t
An index for adjacencies.
Definition: adj_types.h:30
static const char *const *const glean_nodes[DPO_PROTO_NUM]
Definition: adj_glean.c:500
vnet_mtu_t vnet_link_to_mtu(vnet_link_t link)
Definition: interface.c:1652
VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION(adj_glean_hw_interface_state_change)
Context passed between object during a back walk.
Definition: fib_node.h:208
static void adj_glean_db_insert(fib_protocol_t proto, u32 sw_if_index, const ip46_address_t *nh_addr, adj_index_t ai)
Definition: adj_glean.c:60
static uword hash_elts(void *v)
Definition: hash.h:118
#define ASSERT(truth)
enum vnet_link_t_ vnet_link_t
Link Type: A description of the protocol of packets on the link.
static void hash_unset_mem_free(uword **h, const void *key)
Definition: hash.h:295
struct ip_adjacency_t_::@161::@164 glean
IP_LOOKUP_NEXT_GLEAN.
static vlib_main_t * vlib_get_main(void)
Definition: global_funcs.h:23
VNET_SW_INTERFACE_ADD_DEL_FUNCTION(adj_glean_interface_delete)
static const char *const glean_ip6_nodes[]
Definition: adj_glean.c:494
union ip_adjacency_t_::@161 sub_type
fib_protocol_t ia_nh_proto
The protocol of the neighbor/peer.
Definition: adj.h:350
adj_index_t adj_glean_add_or_lock(fib_protocol_t proto, vnet_link_t linkt, u32 sw_if_index, const fib_prefix_t *conn)
Glean Adjacency.
Definition: adj_glean.c:112
#define DPO_PROTO_NUM
Definition: dpo.h:70
index_t dpoi_index
the index of objects of that type
Definition: dpo.h:188
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
ip_lookup_next_t lookup_next_index
Next hop after ip4-lookup.
Definition: adj.h:337
u64 uword
Definition: types.h:112
ip_adjacency_t * adj_alloc(fib_protocol_t proto)
Definition: adj.c:63
u32 index
Definition: flow_types.api:221
#define FOR_EACH_FIB_IP_PROTOCOL(_item)
Definition: fib_types.h:69
vlib_node_registration_t ip4_glean_node
(constructor) VLIB_REGISTER_NODE (ip4_glean_node)
Definition: ip4_neighbor.c:277
#define hash_get_mem(h, key)
Definition: hash.h:269
static vnet_link_t adj_fib_proto_2_nd(fib_protocol_t fp)
Definition: adj_internal.h:67
void vlib_worker_thread_barrier_release(vlib_main_t *vm)
Definition: threads.c:1561
#define vec_foreach(var, vec)
Vector iterator.
u8 count
Definition: dhcp.api:208
static void hash_set_mem_alloc(uword **h, const void *key, uword v)
Definition: hash.h:279
static u32 adj_get_glean_node(fib_protocol_t proto)
Definition: adj_glean.c:27
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION(adj_glean_interface_state_change)