Re: [vpp-dev] duplicate user id allocation in ACL plugin

2019-06-10 Thread Satya Murthy
Hi Andrew, We dont want to have any extra config/APIs to drive this registration and hence, we did not go via that approach. To work around this, I have started a timer of 1 sec in my custom plugin init function. After 1 sec, I am registering with the ACL service, and this solved my issue for

Re: [vpp-dev] duplicate user id allocation in ACL plugin

2019-06-07 Thread Andrew Yourtchenko
Satya, So, what are the reasons preventing you from doing the same ? --a > On 7 Jun 2019, at 13:09, Satya Murthy wrote: > > Hi Andrew, > > One difference I see between our plugin vs Gbp plugin is: > > In Gbp plugin, register_module is getting called as part of an API handler, > which is

Re: [vpp-dev] duplicate user id allocation in ACL plugin

2019-06-07 Thread Satya Murthy
Hi Andrew, One difference I see between our plugin vs Gbp plugin is: In Gbp plugin, register_module is getting called as part of an API handler, which is usually after the system comes to a stable state. Whereas in our case, we are calling register_module as part of our plugin init function,

Re: [vpp-dev] duplicate user id allocation in ACL plugin

2019-06-07 Thread Andrew Yourtchenko
Satya, Gbp plugin uses acl plugin in the way I suggested. Another use is in abf plugin... what are you doing different compared to those two ? I wonder if the reason you can’t call init function is the same as the registration issue - could be that acl plugin is not loaded ? Please publish

Re: [vpp-dev] duplicate user id allocation in ACL plugin

2019-06-07 Thread Satya Murthy
Hi Andrew, I was trying to get this info on one other thread and did not realize your message in this thread. If I put this in feature_enable function, I need to trigger this function via API (or) CLI, which we want to avoid. We want to get the registration as part of our plugin

Re: [vpp-dev] duplicate user id allocation in ACL plugin

2019-06-04 Thread Andrew Yourtchenko
How about this in your plugin ? (Typed on iPhone so not directly copypasteable) static int registered_id = -1; void My_feature_enable () { If (-1 == registered_id) { registered_id = acl_plugin_register(“me myself and I”); } ... } --a > On 4 Jun 2019, at 13:00, Satya Murthy wrote: >

Re: [vpp-dev] duplicate user id allocation in ACL plugin

2019-06-04 Thread Satya Murthy
Thanks Ben. Do you see any other way to achieve this order in previous versions of the code. -- Thanks & Regards, Murthy -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#13213): https://lists.fd.io/g/vpp-dev/message/13213 Mute This Topic:

Re: [vpp-dev] duplicate user id allocation in ACL plugin

2019-06-04 Thread Benoit Ganne (bganne) via Lists.Fd.Io
> I dont see any constructs called runs_before or runs_after within > VLIB_INIT_FUNCTION macro. > I am getting compilation error when I try these changes. I could not find > any VLIB_INITS in 1810 (or) 1904 versions of the code. My mistake, I forgot to mention it was introduced in master after

Re: [vpp-dev] duplicate user id allocation in ACL plugin

2019-06-03 Thread Satya Murthy
Hi Ben, I dont see any constructs called runs_before or runs_after within VLIB_INIT_FUNCTION macro. I am getting compilation error when I try these changes. I could not find any VLIB_INITS in 1810 (or) 1904 versions of the code. Here is the code I tried. VLIB_INIT_FUNCTION

Re: [vpp-dev] duplicate user id allocation in ACL plugin

2019-06-03 Thread Satya Murthy
Thanks Ben for the quick inputs. Will try this and update this thread. -- Thanks & Regards, Murthy -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#13204): https://lists.fd.io/g/vpp-dev/message/13204 Mute This Topic:

Re: [vpp-dev] duplicate user id allocation in ACL plugin

2019-06-03 Thread Benoit Ganne (bganne) via Lists.Fd.Io
fore_function_2"), .runs_after = VLIB_INITS("we_run_after_function_1", "we_run_after_function_2), }; ben > -Original Message- > From: vpp-dev@lists.fd.io On Behalf Of Satya Murthy > Sent: lundi 3 juin 2019 13:06 > To: vpp-dev@lists.f

Re: [vpp-dev] duplicate user id allocation in ACL plugin

2019-06-03 Thread Satya Murthy
Hi Andrew, I got what the issue is, but not sure how to get around this problem. My plugin is first subscribing for ACL service by calling register_user_module. Also, I could see that it is getting added into acl_users. But, after this, acl_init() is getting called, due to which, the acl_users

Re: [vpp-dev] duplicate user id allocation in ACL plugin

2019-05-31 Thread Andrew Yourtchenko
Satya, I am just now going mostly offline for the next 9 calendar days. Normally what you are doing should work. The usual “use the force trick” with gdb applies and gerrit with fixes are welcome if you get to the root cause and the fix to it, while I am away. If not - you can post your

[vpp-dev] duplicate user id allocation in ACL plugin

2019-05-31 Thread Satya Murthy
Hi , I am trying to register my plugin as an ACL user by using  register_user_module(). I am getting a user_id of value 0. ( by looking at my logs, I could confirm this ) However, when I see  vppctl CLI "show acl-plugin lookup user" , its showing "abp" plugin got registered with user_id