I missed that detail. I just submitted revert patch….

> On 27.01.2021., at 14:50, Ole Troan <otr...@employees.org> wrote:
> 
> Hi Radu,
> 
> Looks like your patch:
> https://gerrit.fd.io/r/c/vpp/+/30228
> 
> Introduces an unfortunate coupling between VLIB and VNET.
> Can you see if you can find a way to avoid calling into VNET from VLIB?
> 
> Best regards,
> Ole
> 
> static_always_inline void
> -vlib_update_nr_variant_default (vlib_node_registration_t * nr, u8 * variant)
> +vlib_update_nr_variant_default (vlib_node_fn_registration_t * fnr,
> +                               u8 * variant)
> {
> -  vlib_node_fn_registration_t *fnr = nr->node_fn_registrations;
>   vlib_node_fn_registration_t *p_reg = 0;
>   vlib_node_fn_registration_t *v_reg = 0;
>   u32 tmp;
> @@ -127,6 +128,8 @@ vlib_early_node_config (vlib_main_t * vm, 
> unformat_input_t * input)
> {
>   clib_error_t *error = 0;
>   vlib_node_registration_t *nr, **all;
> +  vnet_device_class_t *c;
> +  vnet_main_t *vnm = vnet_get_main ();
>   unformat_input_t sub_input;
>   uword *hash = 0, *p;
>   u8 *variant = 0;
> @@ -161,10 +164,20 @@ vlib_early_node_config (vlib_main_t * vm, 
> unformat_input_t * input)
>              nr = vm->node_main.node_registrations;
>              while (nr)
>                {
> -                 vlib_update_nr_variant_default (nr, variant);
> +                 vlib_update_nr_variant_default (nr->node_fn_registrations,
> +                                                 variant);
>                  nr = nr->next_registration;
>                }
> 
> +             /* also apply it to interfaces */
> +             c = vnm->device_class_registrations;
> +             while (c)
> +               {
> +                 vlib_update_nr_variant_default (c->tx_fn_registrations,
> +                                                 variant);
> +                 c = c->next_class_registration;
> +               }
> +
>              vec_free (variant);
>            }
>        }
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18605): https://lists.fd.io/g/vpp-dev/message/18605
Mute This Topic: https://lists.fd.io/mt/80157105/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to