Re: [vpp-dev] run existing plugin in VPP

2021-01-13 Thread hemant via lists.fd.io
Hi,

 

All folks on this mailer are a VPP crew.  So, even if I release a binary of the 
P4toVPP compiler, would anyone in VPP land even use the compiler?  

 

One would have to write P4 programs first.  Not that writing a P4 program is 
rocket science – there is a Slack channel and mailer for P4 with very helpful 
crew.  I don’t see an online repo of P4 programs just yet.  VPP scripts 
generate a skeleton for a VPP plugin including API for plugin enable-disable.  
The compiler my company has developed generates CLI, API, and API handlers for 
plugin enable-disable and also for table entry add/delete/show tables.  We are 
optimizing the compiler for better traffic performance as we speak.  At least, 
if anyone uses the compiler, one doesn’t have to write CLI, API, and API 
handlers any more for a VPP plugin.

 

Please let me know if anyone has any interest?

 

Thanks,

 

Hemant 

 

From: Andrew  Yourtchenko  
Sent: Thursday, September 17, 2020 2:21 AM
To: hem...@mnkcg.com
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] run existing plugin in VPP

 

Excellent!

 

So would my guess be right that you plan to autogenerate the tests as well ?

--a





On 17 Sep 2020, at 02:54, hem...@mnkcg.com <mailto:hem...@mnkcg.com>  wrote:



I did a “ps -ef | grep -I vpp” and found a few vpp processes (?) running.  I 
killed them and then the single cdp test ran fine on using “sudo make test 
TEST=test_cdp” from vpp root directory.  

 

==

CDP Test Case 

==

test_cdp_overflow_tlv (test_cdp.TestCDP) 0.28 OK

test_cdp_underflow_tlv (test_cdp.TestCDP)0.29 OK

test_enable_cdp (test_cdp.TestCDP)   0.23 OK

test_send_cdp_packet (test_cdp.TestCDP)  0.28 OK

 

==

TEST RESULTS:

 Scheduled tests: 4

  Executed tests: 4

Passed tests: 4

==

 

Hemant

 

From: hem...@mnkcg.com <mailto:hem...@mnkcg.com>  mailto:hem...@mnkcg.com> > 
Sent: Wednesday, September 16, 2020 7:43 PM
To: 'ayour...@gmail.com' mailto:ayour...@gmail.com> >
Cc: 'vpp-dev@lists.fd.io' mailto:vpp-dev@lists.fd.io> >
Subject: RE: [vpp-dev] run existing plugin in VPP

 

Andrew,

 

Thanks.  I will have to play more with VPP because “sudo make test 
TEST=test_cdp” fails.  If anyone else is able to run this test, then I know I 
have some issues with my VPP setup or dependencies.

 

I found the CSIT reports – thanks!

 

Regarding my p4 to vpp compiler, it’s work in progress.  I will update you all 
when something is ready for use.

 

Hemant  

 

From: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>  mailto:vpp-dev@lists.fd.io> > On Behalf Of Andrew Yourtchenko
Sent: Wednesday, September 16, 2020 7:10 PM
To: hem...@mnkcg.com <mailto:hem...@mnkcg.com> 
Cc: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> 
Subject: Re: [vpp-dev] run existing plugin in VPP

 

Hemant,

 

On 17 Sep 2020, at 00:43, hem...@mnkcg.com <mailto:hem...@mnkcg.com>  wrote:



Andrew,

 

Thanks!  Yes, I am a developer trying to get started with VPP.  

 

 

Cool! So my “find the answer” quiz was on target :-)

 

I run VPP using “make run-release” and get to the “vpp#” prompt.  I could do a 
“cdp enable” and thus I know this plugin has been loaded.  

 

Now how to I run the packet testing in vpp/src/plugins/cdp/test/?  There is a 
test_cdp.py in the path.  I am familiar with PTF.

 

“Make test-help” will give more info.

 

Once I can run test.py for a plugin, I’d like to learn how to run performance 
testing to see how many packets/sec of a certain size I can achieve for a 
plugin.  What would be a good plugin to test performance with?

 

That’s trickier... look around  https://wiki.fd.io/view/CSIT - basically, perf 
testing the VPP is a separate project :-) but the good thing is some reports 
might be already there..

 

 

I love the fact that you (and perhaps others) have added lua examples to 
vpp-api.

 

Lua didn’t get much love for quite a while and I think would need some 
resuscitations to work :-)

That said, last time I had a half a day to toy  with it, in half a day I had 
something sorta working... but don’t expect what is in the tree to be up to 
date... it’s waiting for the folks to help it :-)

 

 

I am developing a compiler which ingests P4 code and outputs a VPP plugin.  
First, I will make the compiler functionally correct to support as many P4 
features and as many VPP features.  Then I will worry about performance which 
is a hard problem.

 

This is a fun idea!

 

 

If you see a VPP plugin, several files can be auto-generated by compiler or 
script.  My c

Re: [vpp-dev] run existing plugin in VPP

2020-09-17 Thread Andrew Yourtchenko


> On 17 Sep 2020, at 14:59, hem...@mnkcg.com wrote:
> 
> 
> I haven’t planned auto-generation of test_xxx.py yet.
>  
> Looking at test_cdp.py, I see lot of python code which should be common to 
> most plugin PTF tests.  Thereafter, creating a good and bad packet for a 
> protocol., enabling/disabling plugin should be straightforward to 
> auto-generate.  I think, I can generate tests_xxx.py and thereafter if a user 
> wants, more tests or tweaks could be added.

Yup, that would be very cool, because assuming the initial definition is 
correct and complete, then generating positive/negative tests should be 
possible mechanically. Since you know what at least the initial code structure 
is, you could make tests that hit every basic block at least in the initial 
code; and then some potentially based on the derived ranges of allowable 
values... (eg, if a feature is unicast, try feeding broadcast and see what 
happens, etc). If there are way too many tests then they can be moved to 
extended tests...

Then one can more comfortably tweak the subsequent implementation of the node 
by hand to get more performance...

Just one catch with the building the tests: there are three “timelines” in any 
of them:
- time as seen by the python executor
- time as seen by the VPP instance being driven
- time as seen by the external observer

At high concurrency they may become different things, so that might trip up the 
tests that assume they are all the same... 

—a


>  
> Hemant
>  
> From: vpp-dev@lists.fd.io  On Behalf Of Andrew 
> Yourtchenko
> Sent: Thursday, September 17, 2020 2:21 AM
> To: hem...@mnkcg.com
> Cc: vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] run existing plugin in VPP
>  
> Excellent!
>  
> So would my guess be right that you plan to autogenerate the tests as well ?
> 
> --a
> 
> 
> On 17 Sep 2020, at 02:54, hem...@mnkcg.com wrote:
> 
> 
> I did a “ps -ef | grep -I vpp” and found a few vpp processes (?) running.  I 
> killed them and then the single cdp test ran fine on using “sudo make test 
> TEST=test_cdp” from vpp root directory. 
>  
> ==
> CDP Test Case
> ==
> test_cdp_overflow_tlv (test_cdp.TestCDP) 0.28 OK
> test_cdp_underflow_tlv (test_cdp.TestCDP)0.29 OK
> test_enable_cdp (test_cdp.TestCDP)   0.23 OK
> test_send_cdp_packet (test_cdp.TestCDP)  0.28 OK
>  
> ==
> TEST RESULTS:
>  Scheduled tests: 4
>   Executed tests: 4
> Passed tests: 4
> ==
>  
> Hemant
>  
> From: hem...@mnkcg.com  
> Sent: Wednesday, September 16, 2020 7:43 PM
> To: 'ayour...@gmail.com' 
> Cc: 'vpp-dev@lists.fd.io' 
> Subject: RE: [vpp-dev] run existing plugin in VPP
>  
> Andrew,
>  
> Thanks.  I will have to play more with VPP because “sudo make test 
> TEST=test_cdp” fails.  If anyone else is able to run this test, then I know I 
> have some issues with my VPP setup or dependencies.
>  
> I found the CSIT reports – thanks!
>  
> Regarding my p4 to vpp compiler, it’s work in progress.  I will update you 
> all when something is ready for use.
>  
> Hemant 
>  
> From: vpp-dev@lists.fd.io  On Behalf Of Andrew 
> Yourtchenko
> Sent: Wednesday, September 16, 2020 7:10 PM
> To: hem...@mnkcg.com
> Cc: vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] run existing plugin in VPP
>  
> Hemant,
>  
> 
> On 17 Sep 2020, at 00:43, hem...@mnkcg.com wrote:
> 
> 
> Andrew,
>  
> Thanks!  Yes, I am a developer trying to get started with VPP. 
>  
>  
> Cool! So my “find the answer” quiz was on target :-)
>  
> 
> I run VPP using “make run-release” and get to the “vpp#” prompt.  I could do 
> a “cdp enable” and thus I know this plugin has been loaded. 
>  
> Now how to I run the packet testing in vpp/src/plugins/cdp/test/?  There is a 
> test_cdp.py in the path.  I am familiar with PTF.
>  
> “Make test-help” will give more info.
>  
> 
> Once I can run test.py for a plugin, I’d like to learn how to run performance 
> testing to see how many packets/sec of a certain size I can achieve for a 
> plugin.  What would be a good plugin to test performance with?
>  
> That’s trickier... look around  https://wiki.fd.io/view/CSIT - basically, 
> perf testing the VPP is a separate project :-) but the good thing is some 
> reports might be already there..
>  
>  
> I love the fact that you (a

Re: [vpp-dev] run existing plugin in VPP

2020-09-17 Thread hemant via lists.fd.io
I haven’t planned auto-generation of test_xxx.py yet.

 

Looking at test_cdp.py, I see lot of python code which should be common to most 
plugin PTF tests.  Thereafter, creating a good and bad packet for a protocol., 
enabling/disabling plugin should be straightforward to auto-generate.  I think, 
I can generate tests_xxx.py and thereafter if a user wants, more tests or 
tweaks could be added. 

 

Hemant

 

From: vpp-dev@lists.fd.io  On Behalf Of Andrew Yourtchenko
Sent: Thursday, September 17, 2020 2:21 AM
To: hem...@mnkcg.com
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] run existing plugin in VPP

 

Excellent!

 

So would my guess be right that you plan to autogenerate the tests as well ?

--a





On 17 Sep 2020, at 02:54, hem...@mnkcg.com <mailto:hem...@mnkcg.com>  wrote:



I did a “ps -ef | grep -I vpp” and found a few vpp processes (?) running.  I 
killed them and then the single cdp test ran fine on using “sudo make test 
TEST=test_cdp” from vpp root directory.  

 

==

CDP Test Case 

==

test_cdp_overflow_tlv (test_cdp.TestCDP) 0.28 OK

test_cdp_underflow_tlv (test_cdp.TestCDP)0.29 OK

test_enable_cdp (test_cdp.TestCDP)   0.23 OK

test_send_cdp_packet (test_cdp.TestCDP)  0.28 OK

 

==

TEST RESULTS:

 Scheduled tests: 4

  Executed tests: 4

Passed tests: 4

==

 

Hemant

 

From: hem...@mnkcg.com <mailto:hem...@mnkcg.com>  mailto:hem...@mnkcg.com> > 
Sent: Wednesday, September 16, 2020 7:43 PM
To: 'ayour...@gmail.com' mailto:ayour...@gmail.com> >
Cc: 'vpp-dev@lists.fd.io' mailto:vpp-dev@lists.fd.io> >
Subject: RE: [vpp-dev] run existing plugin in VPP

 

Andrew,

 

Thanks.  I will have to play more with VPP because “sudo make test 
TEST=test_cdp” fails.  If anyone else is able to run this test, then I know I 
have some issues with my VPP setup or dependencies.

 

I found the CSIT reports – thanks!

 

Regarding my p4 to vpp compiler, it’s work in progress.  I will update you all 
when something is ready for use.

 

Hemant  

 

From: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>  mailto:vpp-dev@lists.fd.io> > On Behalf Of Andrew Yourtchenko
Sent: Wednesday, September 16, 2020 7:10 PM
To: hem...@mnkcg.com <mailto:hem...@mnkcg.com> 
Cc: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> 
Subject: Re: [vpp-dev] run existing plugin in VPP

 

Hemant,

 

On 17 Sep 2020, at 00:43, hem...@mnkcg.com <mailto:hem...@mnkcg.com>  wrote:



Andrew,

 

Thanks!  Yes, I am a developer trying to get started with VPP.  

 

 

Cool! So my “find the answer” quiz was on target :-)

 

I run VPP using “make run-release” and get to the “vpp#” prompt.  I could do a 
“cdp enable” and thus I know this plugin has been loaded.  

 

Now how to I run the packet testing in vpp/src/plugins/cdp/test/?  There is a 
test_cdp.py in the path.  I am familiar with PTF.

 

“Make test-help” will give more info.

 

Once I can run test.py for a plugin, I’d like to learn how to run performance 
testing to see how many packets/sec of a certain size I can achieve for a 
plugin.  What would be a good plugin to test performance with?

 

That’s trickier... look around  https://wiki.fd.io/view/CSIT - basically, perf 
testing the VPP is a separate project :-) but the good thing is some reports 
might be already there..

 

 

I love the fact that you (and perhaps others) have added lua examples to 
vpp-api.

 

Lua didn’t get much love for quite a while and I think would need some 
resuscitations to work :-)

That said, last time I had a half a day to toy  with it, in half a day I had 
something sorta working... but don’t expect what is in the tree to be up to 
date... it’s waiting for the folks to help it :-)

 

 

I am developing a compiler which ingests P4 code and outputs a VPP plugin.  
First, I will make the compiler functionally correct to support as many P4 
features and as many VPP features.  Then I will worry about performance which 
is a hard problem.

 

This is a fun idea!

 

 

If you see a VPP plugin, several files can be auto-generated by compiler or 
script.  My compiler is already generating these files:

 

-rw-rw-r--  1 hemant hemant   1498 Sep 16 18:38 tmp_test.c

-rw-rw-r--  1 hemant hemant  10577 Sep 16 18:38 tmp.h

-rw-rw-r--  1 hemant hemant  79257 Sep 16 18:38 tmp.c

-rw-rw-r--  1 hemant hemant412 Sep 16 18:38 tmp.api

-rw-rw-r--  1 hemant hemant250 Sep 16 18:38 CMakeLists.txt

 

Nice! There is the lisp script somewhere in the tree that asks questions and 
spits out the plugin, but it’s a skele

Re: [vpp-dev] run existing plugin in VPP

2020-09-17 Thread Andrew Yourtchenko
Excellent!

So would my guess be right that you plan to autogenerate the tests as well ?

--a

> On 17 Sep 2020, at 02:54, hem...@mnkcg.com wrote:
> 
> I did a “ps -ef | grep -I vpp” and found a few vpp processes (?) running.  I 
> killed them and then the single cdp test ran fine on using “sudo make test 
> TEST=test_cdp” from vpp root directory. 
>  
> ==
> CDP Test Case
> ==
> test_cdp_overflow_tlv (test_cdp.TestCDP) 0.28 OK
> test_cdp_underflow_tlv (test_cdp.TestCDP)0.29 OK
> test_enable_cdp (test_cdp.TestCDP)   0.23 OK
> test_send_cdp_packet (test_cdp.TestCDP)  0.28 OK
>  
> ==
> TEST RESULTS:
>  Scheduled tests: 4
>   Executed tests: 4
> Passed tests: 4
> ==
>  
> Hemant
>  
> From: hem...@mnkcg.com  
> Sent: Wednesday, September 16, 2020 7:43 PM
> To: 'ayour...@gmail.com' 
> Cc: 'vpp-dev@lists.fd.io' 
> Subject: RE: [vpp-dev] run existing plugin in VPP
>  
> Andrew,
>  
> Thanks.  I will have to play more with VPP because “sudo make test 
> TEST=test_cdp” fails.  If anyone else is able to run this test, then I know I 
> have some issues with my VPP setup or dependencies.
>  
> I found the CSIT reports – thanks!
>  
> Regarding my p4 to vpp compiler, it’s work in progress.  I will update you 
> all when something is ready for use.
>  
> Hemant 
>  
> From: vpp-dev@lists.fd.io  On Behalf Of Andrew 
> Yourtchenko
> Sent: Wednesday, September 16, 2020 7:10 PM
> To: hem...@mnkcg.com
> Cc: vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] run existing plugin in VPP
>  
> Hemant,
>  
> 
> On 17 Sep 2020, at 00:43, hem...@mnkcg.com wrote:
> 
> 
> Andrew,
>  
> Thanks!  Yes, I am a developer trying to get started with VPP. 
>  
>  
> Cool! So my “find the answer” quiz was on target :-)
>  
> 
> I run VPP using “make run-release” and get to the “vpp#” prompt.  I could do 
> a “cdp enable” and thus I know this plugin has been loaded. 
>  
> Now how to I run the packet testing in vpp/src/plugins/cdp/test/?  There is a 
> test_cdp.py in the path.  I am familiar with PTF.
>  
> “Make test-help” will give more info.
>  
> 
> Once I can run test.py for a plugin, I’d like to learn how to run performance 
> testing to see how many packets/sec of a certain size I can achieve for a 
> plugin.  What would be a good plugin to test performance with?
>  
> That’s trickier... look around  https://wiki.fd.io/view/CSIT - basically, 
> perf testing the VPP is a separate project :-) but the good thing is some 
> reports might be already there..
>  
>  
> I love the fact that you (and perhaps others) have added lua examples to 
> vpp-api.
>  
> Lua didn’t get much love for quite a while and I think would need some 
> resuscitations to work :-)
> That said, last time I had a half a day to toy  with it, in half a day I had 
> something sorta working... but don’t expect what is in the tree to be up to 
> date... it’s waiting for the folks to help it :-)
>  
> 
>  
> I am developing a compiler which ingests P4 code and outputs a VPP plugin.  
> First, I will make the compiler functionally correct to support as many P4 
> features and as many VPP features.  Then I will worry about performance which 
> is a hard problem.
>  
> This is a fun idea!
>  
> 
>  
> If you see a VPP plugin, several files can be auto-generated by compiler or 
> script.  My compiler is already generating these files:
>  
> -rw-rw-r--  1 hemant hemant   1498 Sep 16 18:38 tmp_test.c
> -rw-rw-r--  1 hemant hemant  10577 Sep 16 18:38 tmp.h
> -rw-rw-r--  1 hemant hemant  79257 Sep 16 18:38 tmp.c
> -rw-rw-r--  1 hemant hemant412 Sep 16 18:38 tmp.api
> -rw-rw-r--  1 hemant hemant250 Sep 16 18:38 CMakeLists.txt
>  
> Nice! There is the lisp script somewhere in the tree that asks questions and 
> spits out the plugin, but it’s a skeleton, with P4 one could probably go 
> quite a good bit further...
>  
> Is your compiler gonna be open source ?
>  
> —a
>  
>  
> 
>  
> Best wishes,
>  
> Hemant
>  
>  
>  
> From: Andrew  Yourtchenko  
> Sent: Wednesday, September 16, 2020 4:12 PM
> To: hem...@mnkcg.com
> Cc: vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] run existing plugin in VPP
>  
> Hey Hemant,
>  
> Welcome! :-)
> 
> Mo

Re: [vpp-dev] run existing plugin in VPP

2020-09-16 Thread hemant via lists.fd.io
I did a “ps -ef | grep -I vpp” and found a few vpp processes (?) running.  I 
killed them and then the single cdp test ran fine on using “sudo make test 
TEST=test_cdp” from vpp root directory.  

 

==

CDP Test Case 

==

test_cdp_overflow_tlv (test_cdp.TestCDP) 0.28 OK

test_cdp_underflow_tlv (test_cdp.TestCDP)0.29 OK

test_enable_cdp (test_cdp.TestCDP)   0.23 OK

test_send_cdp_packet (test_cdp.TestCDP)  0.28 OK

 

==

TEST RESULTS:

 Scheduled tests: 4

  Executed tests: 4

Passed tests: 4

==

 

Hemant

 

From: hem...@mnkcg.com  
Sent: Wednesday, September 16, 2020 7:43 PM
To: 'ayour...@gmail.com' 
Cc: 'vpp-dev@lists.fd.io' 
Subject: RE: [vpp-dev] run existing plugin in VPP

 

Andrew,

 

Thanks.  I will have to play more with VPP because “sudo make test 
TEST=test_cdp” fails.  If anyone else is able to run this test, then I know I 
have some issues with my VPP setup or dependencies.

 

I found the CSIT reports – thanks!

 

Regarding my p4 to vpp compiler, it’s work in progress.  I will update you all 
when something is ready for use.

 

Hemant  

 

From: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>  mailto:vpp-dev@lists.fd.io> > On Behalf Of Andrew Yourtchenko
Sent: Wednesday, September 16, 2020 7:10 PM
To: hem...@mnkcg.com <mailto:hem...@mnkcg.com> 
Cc: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> 
Subject: Re: [vpp-dev] run existing plugin in VPP

 

Hemant,

 

On 17 Sep 2020, at 00:43, hem...@mnkcg.com <mailto:hem...@mnkcg.com>  wrote:



Andrew,

 

Thanks!  Yes, I am a developer trying to get started with VPP.  

 

 

Cool! So my “find the answer” quiz was on target :-)

 

I run VPP using “make run-release” and get to the “vpp#” prompt.  I could do a 
“cdp enable” and thus I know this plugin has been loaded.  

 

Now how to I run the packet testing in vpp/src/plugins/cdp/test/?  There is a 
test_cdp.py in the path.  I am familiar with PTF.

 

“Make test-help” will give more info.

 

Once I can run test.py for a plugin, I’d like to learn how to run performance 
testing to see how many packets/sec of a certain size I can achieve for a 
plugin.  What would be a good plugin to test performance with?

 

That’s trickier... look around  https://wiki.fd.io/view/CSIT - basically, perf 
testing the VPP is a separate project :-) but the good thing is some reports 
might be already there..

 

 

I love the fact that you (and perhaps others) have added lua examples to 
vpp-api.

 

Lua didn’t get much love for quite a while and I think would need some 
resuscitations to work :-)

That said, last time I had a half a day to toy  with it, in half a day I had 
something sorta working... but don’t expect what is in the tree to be up to 
date... it’s waiting for the folks to help it :-)

 

 

I am developing a compiler which ingests P4 code and outputs a VPP plugin.  
First, I will make the compiler functionally correct to support as many P4 
features and as many VPP features.  Then I will worry about performance which 
is a hard problem.

 

This is a fun idea!

 

 

If you see a VPP plugin, several files can be auto-generated by compiler or 
script.  My compiler is already generating these files:

 

-rw-rw-r--  1 hemant hemant   1498 Sep 16 18:38 tmp_test.c

-rw-rw-r--  1 hemant hemant  10577 Sep 16 18:38 tmp.h

-rw-rw-r--  1 hemant hemant  79257 Sep 16 18:38 tmp.c

-rw-rw-r--  1 hemant hemant412 Sep 16 18:38 tmp.api

-rw-rw-r--  1 hemant hemant250 Sep 16 18:38 CMakeLists.txt

 

Nice! There is the lisp script somewhere in the tree that asks questions and 
spits out the plugin, but it’s a skeleton, with P4 one could probably go quite 
a good bit further...

 

Is your compiler gonna be open source ?

 

—a

 

 

 

Best wishes,

 

Hemant

 

 

 

From: Andrew  Yourtchenko mailto:ayour...@gmail.com> > 
Sent: Wednesday, September 16, 2020 4:12 PM
To: hem...@mnkcg.com <mailto:hem...@mnkcg.com> 
Cc: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> 
Subject: Re: [vpp-dev] run existing plugin in VPP

 

Hey Hemant,

 

Welcome! :-)


Most of the plugins load automatically (default), some don’t by default.. (see 
src/plugins/unittest/unittest.c on how it’s overridden).

 

You can take a look at the config required to change the defaults in 
test/framework.py, line 422)

 

Looking at those places, as well as the CDP plugin, should answer the question.

 

(I am assuming you are a developer trying to get started with VPP so trying to 
give the pointers I myself would have found useful).

 

--a






Re: [vpp-dev] run existing plugin in VPP

2020-09-16 Thread hemant via lists.fd.io
Andrew,

 

Thanks.  I will have to play more with VPP because “sudo make test 
TEST=test_cdp” fails.  If anyone else is able to run this test, then I know I 
have some issues with my VPP setup or dependencies.

 

I found the CSIT reports – thanks!

 

Regarding my p4 to vpp compiler, it’s work in progress.  I will update you all 
when something is ready for use.

 

Hemant  

 

From: vpp-dev@lists.fd.io  On Behalf Of Andrew Yourtchenko
Sent: Wednesday, September 16, 2020 7:10 PM
To: hem...@mnkcg.com
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] run existing plugin in VPP

 

Hemant,





On 17 Sep 2020, at 00:43, hem...@mnkcg.com <mailto:hem...@mnkcg.com>  wrote:



Andrew,

 

Thanks!  Yes, I am a developer trying to get started with VPP.  

 

 

Cool! So my “find the answer” quiz was on target :-)





I run VPP using “make run-release” and get to the “vpp#” prompt.  I could do a 
“cdp enable” and thus I know this plugin has been loaded.  

 

Now how to I run the packet testing in vpp/src/plugins/cdp/test/?  There is a 
test_cdp.py in the path.  I am familiar with PTF.

 

“Make test-help” will give more info.





Once I can run test.py for a plugin, I’d like to learn how to run performance 
testing to see how many packets/sec of a certain size I can achieve for a 
plugin.  What would be a good plugin to test performance with?

 

That’s trickier... look around  https://wiki.fd.io/view/CSIT - basically, perf 
testing the VPP is a separate project :-) but the good thing is some reports 
might be already there..

 

 

I love the fact that you (and perhaps others) have added lua examples to 
vpp-api.

 

Lua didn’t get much love for quite a while and I think would need some 
resuscitations to work :-)

That said, last time I had a half a day to toy  with it, in half a day I had 
something sorta working... but don’t expect what is in the tree to be up to 
date... it’s waiting for the folks to help it :-)





 

I am developing a compiler which ingests P4 code and outputs a VPP plugin.  
First, I will make the compiler functionally correct to support as many P4 
features and as many VPP features.  Then I will worry about performance which 
is a hard problem.

 

This is a fun idea!





 

If you see a VPP plugin, several files can be auto-generated by compiler or 
script.  My compiler is already generating these files:

 

-rw-rw-r--  1 hemant hemant   1498 Sep 16 18:38 tmp_test.c

-rw-rw-r--  1 hemant hemant  10577 Sep 16 18:38 tmp.h

-rw-rw-r--  1 hemant hemant  79257 Sep 16 18:38 tmp.c

-rw-rw-r--  1 hemant hemant412 Sep 16 18:38 tmp.api

-rw-rw-r--  1 hemant hemant250 Sep 16 18:38 CMakeLists.txt

 

Nice! There is the lisp script somewhere in the tree that asks questions and 
spits out the plugin, but it’s a skeleton, with P4 one could probably go quite 
a good bit further...

 

Is your compiler gonna be open source ?

 

—a

 





 

Best wishes,

 

Hemant

 

 

 

From: Andrew  Yourtchenko mailto:ayour...@gmail.com> > 
Sent: Wednesday, September 16, 2020 4:12 PM
To: hem...@mnkcg.com <mailto:hem...@mnkcg.com> 
Cc: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> 
Subject: Re: [vpp-dev] run existing plugin in VPP

 

Hey Hemant,

 

Welcome! :-)


Most of the plugins load automatically (default), some don’t by default.. (see 
src/plugins/unittest/unittest.c on how it’s overridden).

 

You can take a look at the config required to change the defaults in 
test/framework.py, line 422)

 

Looking at those places, as well as the CDP plugin, should answer the question.

 

(I am assuming you are a developer trying to get started with VPP so trying to 
give the pointers I myself would have found useful).

 

--a






On 16 Sep 2020, at 19:11, hemant via lists.fd.io mailto:hemant=mnkcg@lists.fd.io> > wrote:



Folks,

 

I am new to VPP.  I see several plugins in vpp/src/plugins.  How do I run an 
existing plugin in VPP such as cdp? 

 

Regards,

 

Hemant



smime.p7s
Description: S/MIME cryptographic signature

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



Re: [vpp-dev] run existing plugin in VPP

2020-09-16 Thread Andrew Yourtchenko
Hemant,

> On 17 Sep 2020, at 00:43, hem...@mnkcg.com wrote:
> 
> 
> Andrew,
>  
> Thanks!  Yes, I am a developer trying to get started with VPP. 
>  

Cool! So my “find the answer” quiz was on target :-)

> I run VPP using “make run-release” and get to the “vpp#” prompt.  I could do 
> a “cdp enable” and thus I know this plugin has been loaded. 
>  
> Now how to I run the packet testing in vpp/src/plugins/cdp/test/?  There is a 
> test_cdp.py in the path.  I am familiar with PTF.

“Make test-help” will give more info.

> Once I can run test.py for a plugin, I’d like to learn how to run performance 
> testing to see how many packets/sec of a certain size I can achieve for a 
> plugin.  What would be a good plugin to test performance with?

That’s trickier... look around  https://wiki.fd.io/view/CSIT - basically, perf 
testing the VPP is a separate project :-) but the good thing is some reports 
might be already there..

>  
> I love the fact that you (and perhaps others) have added lua examples to 
> vpp-api.

Lua didn’t get much love for quite a while and I think would need some 
resuscitations to work :-)
That said, last time I had a half a day to toy  with it, in half a day I had 
something sorta working... but don’t expect what is in the tree to be up to 
date... it’s waiting for the folks to help it :-)

>  
> I am developing a compiler which ingests P4 code and outputs a VPP plugin.  
> First, I will make the compiler functionally correct to support as many P4 
> features and as many VPP features.  Then I will worry about performance which 
> is a hard problem.

This is a fun idea!

>  
> If you see a VPP plugin, several files can be auto-generated by compiler or 
> script.  My compiler is already generating these files:
>  
> -rw-rw-r--  1 hemant hemant   1498 Sep 16 18:38 tmp_test.c
> -rw-rw-r--  1 hemant hemant  10577 Sep 16 18:38 tmp.h
> -rw-rw-r--  1 hemant hemant  79257 Sep 16 18:38 tmp.c
> -rw-rw-r--  1 hemant hemant412 Sep 16 18:38 tmp.api
> -rw-rw-r--  1 hemant hemant250 Sep 16 18:38 CMakeLists.txt

Nice! There is the lisp script somewhere in the tree that asks questions and 
spits out the plugin, but it’s a skeleton, with P4 one could probably go quite 
a good bit further...

Is your compiler gonna be open source ?

—a


>  
> Best wishes,
>  
> Hemant
>  
>  
>  
> From: Andrew  Yourtchenko  
> Sent: Wednesday, September 16, 2020 4:12 PM
> To: hem...@mnkcg.com
> Cc: vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] run existing plugin in VPP
>  
> Hey Hemant,
>  
> Welcome! :-)
> 
> Most of the plugins load automatically (default), some don’t by default.. 
> (see src/plugins/unittest/unittest.c on how it’s overridden).
>  
> You can take a look at the config required to change the defaults in 
> test/framework.py, line 422)
>  
> Looking at those places, as well as the CDP plugin, should answer the 
> question.
>  
> (I am assuming you are a developer trying to get started with VPP so trying 
> to give the pointers I myself would have found useful).
>  
> --a
> 
> 
> On 16 Sep 2020, at 19:11, hemant via lists.fd.io 
>  wrote:
> 
> 
> Folks,
>  
> I am new to VPP.  I see several plugins in vpp/src/plugins.  How do I run an 
> existing plugin in VPP such as cdp?
>  
> Regards,
>  
> Hemant

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



Re: [vpp-dev] run existing plugin in VPP

2020-09-16 Thread hemant via lists.fd.io
Andrew,

 

Thanks!  Yes, I am a developer trying to get started with VPP.  

 

I run VPP using “make run-release” and get to the “vpp#” prompt.  I could do a 
“cdp enable” and thus I know this plugin has been loaded.  

 

Now how to I run the packet testing in vpp/src/plugins/cdp/test/?  There is a 
test_cdp.py in the path.  I am familiar with PTF.

Once I can run test.py for a plugin, I’d like to learn how to run performance 
testing to see how many packets/sec of a certain size I can achieve for a 
plugin.  What would be a good plugin to test performance with?

 

I love the fact that you (and perhaps others) have added lua examples to 
vpp-api.

 

I am developing a compiler which ingests P4 code and outputs a VPP plugin.  
First, I will make the compiler functionally correct to support as many P4 
features and as many VPP features.  Then I will worry about performance which 
is a hard problem.

 

If you see a VPP plugin, several files can be auto-generated by compiler or 
script.  My compiler is already generating these files:

 

-rw-rw-r--  1 hemant hemant   1498 Sep 16 18:38 tmp_test.c

-rw-rw-r--  1 hemant hemant  10577 Sep 16 18:38 tmp.h

-rw-rw-r--  1 hemant hemant  79257 Sep 16 18:38 tmp.c

-rw-rw-r--  1 hemant hemant412 Sep 16 18:38 tmp.api

-rw-rw-r--  1 hemant hemant250 Sep 16 18:38 CMakeLists.txt

 

Best wishes,

 

Hemant

 

 

 

From: Andrew  Yourtchenko  
Sent: Wednesday, September 16, 2020 4:12 PM
To: hem...@mnkcg.com
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] run existing plugin in VPP

 

Hey Hemant,

 

Welcome! :-)


Most of the plugins load automatically (default), some don’t by default.. (see 
src/plugins/unittest/unittest.c on how it’s overridden).

 

You can take a look at the config required to change the defaults in 
test/framework.py, line 422)

 

Looking at those places, as well as the CDP plugin, should answer the question.

 

(I am assuming you are a developer trying to get started with VPP so trying to 
give the pointers I myself would have found useful).

 

--a





On 16 Sep 2020, at 19:11, hemant via lists.fd.io mailto:hemant=mnkcg@lists.fd.io> > wrote:



Folks,

 

I am new to VPP.  I see several plugins in vpp/src/plugins.  How do I run an 
existing plugin in VPP such as cdp? 

 

Regards,

 

Hemant



smime.p7s
Description: S/MIME cryptographic signature

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



Re: [vpp-dev] run existing plugin in VPP

2020-09-16 Thread Andrew Yourtchenko
Hey Hemant,

Welcome! :-)

Most of the plugins load automatically (default), some don’t by default.. (see 
src/plugins/unittest/unittest.c on how it’s overridden).

You can take a look at the config required to change the defaults in 
test/framework.py, line 422)

Looking at those places, as well as the CDP plugin, should answer the question.

(I am assuming you are a developer trying to get started with VPP so trying to 
give the pointers I myself would have found useful).

--a

> On 16 Sep 2020, at 19:11, hemant via lists.fd.io 
>  wrote:
> 
> 
> Folks,
>  
> I am new to VPP.  I see several plugins in vpp/src/plugins.  How do I run an 
> existing plugin in VPP such as cdp?
>  
> Regards,
>  
> Hemant

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



[vpp-dev] run existing plugin in VPP

2020-09-16 Thread hemant via lists.fd.io
Folks,

 

I am new to VPP.  I see several plugins in vpp/src/plugins.  How do I run an
existing plugin in VPP such as cdp? 

 

Regards,

 

Hemant



smime.p7s
Description: S/MIME cryptographic signature

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