[vpp-dev] 18.01 Release Notes

2018-01-23 Thread Dave Wallace

Folks,

The 18.01 Release Notes are available for review in the patch: 
https://gerrit.fd.io/r/#/c/10219/


I have merged the patch and tagged it with v18.01 so that the release 
articles can build overnight and be available for testing tomorrow morning.


Please send comments to me by replying to this email and I will amend 
the patch accordingly and run-docs by hand.


Thanks,
-daw-
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] heap per thread

2018-01-23 Thread Saeed P
Hi
I tried to change the memory allocation on VPP to set different mheap per
worker not a shared mheap per worker.
so on /vlib/threads.c at start_workers function chang as follow :

   if ( !strcmp( tr->name , "workers") )
   {
   tr->mheap_size = new_mheap_size ;
   }
   vec_add2 (vlib_worker_threads, w, 1);

  if (tr->mheap_size)
w->thread_mheap = mheap_alloc (0 , tr->mheap_size);
  else
w->thread_mheap = main_heap;

 by default the "tr->mheap_size" is zero so go into else and use the
main_heap but now allocate mheap for workers, but it has coredump as GDB
shows:

 Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.
mheap_get_search_free_bin (align_offset=4, align=,
n_user_data_bytes_arg=, bin=11, v=0x7fffb5bdd000) at
/root/CGNAT/build-data/../src/vppinfra/mheap.c:401
401   uword this_object_n_user_data_bytes = mheap_elt_data_bytes (e);

 Is it possible to set different mheap per worker ?


Thanks,
-Saeed
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] VPP ACL plugin session info

2018-01-23 Thread Andrew Yourtchenko
Pradeep,

At this time you can only look at the specific session for the debug purposes, 
not the whole table.

To have the traffic create the session you need to use “permit+reflect” action.

So with our your configuring “deny” no sessions will be created.

--a

> On 22 Jan 2018, at 18:32, Pradeep Patel (pradpate)  wrote:
> 
> Team,
> I am trying to dump the session table (show acl-plugin sessions) to view the 
> session info but don’t see any sessions getting created. Any input will be 
> helpful.
>  
> Plugin Version
> vat# acl_plugin_get_version
> vl_api_acl_plugin_get_version_reply_t_handler:133: ACL plugin version: 1.3  
>  
> Following is the acl plugin configuration:
> vat# acl_add_replace deny, ipv4 deny
> vl_api_acl_add_replace_reply_t_handler:107: ACL index: 0
> vat# acl_interface_set_acl_list sw_if_index 1  input 0  output 0
> vat# acl_interface_set_acl_list sw_if_index 2 input 0  output 0
> vat# acl_add_replace  0 permit src 192.168.1.10/32, permit
> vl_api_acl_add_replace_reply_t_handler:107: ACL index: 0
> vat# acl_dump
> vl_api_acl_details_t_handler:193: acl_index: 0, count: 2
>tag {}
>ipv4 action 1 src 192.168.1.10/32 dst 0.0.0.0/0 proto 0 sport 0-65535 
> dport 0-65535 tcpflags 0 mask 0,
>ipv4 action 1 src 0.0.0.0/0 dst 0.0.0.0/0 proto 0 sport 0-65535 dport 
> 0-65535 tcpflags 0 mask 0
>  
> Client IP : 192.168.1.10
>  
> root@localhost:/sandbox/tests/vpp# nc   5.1.1.10 11000
> fdsdsf
>  
> Server IP :   5.1.1.10
> root@localhost:~# nc -l 11000
> fdsdsf
>  
> Trace Info
>  
> Packet X
> 00:08:21:983273: acl-plugin-out-ip4-fa
>   acl-plugin: sw_if_index 2, next index 1, action: 1, match: acl 0 rule 0 
> trace_bits 
>   pkt info  0a01a8c0  
> 0a010105 000200062af8a798 05020002
>output sw_if_index 2 (lsb16 2) l3 ip4 192.168.1.10 -> 5.1.1.10 l4 proto 6 
> l4_valid 1 port 42904 -> 11000 tcp flags (valid) 02 rsvd 0
> 00:08:21:983276: host-vpp_outside-output
>   host-vpp_outside
>   IP4: 02:fe:ec:db:35:b8 -> 92:93:a8:73:cd:7f
>   TCP: 192.168.1.10 -> 5.1.1.10
> tos 0x00, ttl 63, length 60, checksum 0xee09
> fragment id 0x85f5, flags DONT_FRAGMENT
>   TCP: 42904 -> 11000
> seq. 0xd64e1be2 ack 0x
> flags 0x02 SYN, tcp header: 40 bytes
> window 29200, checksum 0x
>  
> packet Y
> 00:08:21:983327: acl-plugin-in-ip4-fa
>   acl-plugin: sw_if_index 2, next index 1, action: 1, match: acl 0 rule 1 
> trace_bits 
>   pkt info  0a010105  
> 0a01a8c0 00020006a7982af8 07120002
>input sw_if_index 2 (lsb16 2) l3 ip4 5.1.1.10 -> 192.168.1.10 l4 proto 6 
> l4_valid 1 port 11000 -> 42904 tcp flags (valid) 12 rsvd 0
> 00:08:21:983329: ip4-lookup
>   fib 0 dpo-idx 2 flow hash: 0x
>   TCP: 5.1.1.10 -> 192.168.1.10
> tos 0x00, ttl 64, length 60, checksum 0x72ff
>  
> vpp# show acl-plugin sessions
> Sessions total: add 0 - del 0 = 0
>  
>  
> Per-thread data:
> Thread #0:
>   connection add/del stats:
> sw_if_index 0: add 0 - del 0 = 0
> sw_if_index 1: add 0 - del 0 = 0
> sw_if_index 2: add 0 - del 0 = 0
>   connection timeout type lists:
>   fa_conn_list_head[0]: -1
>   fa_conn_list_head[1]: -1
>   fa_conn_list_head[2]: -1
>   Next expiry time: 0
>   Requeue until time: 0
>   Current time wait interval: 0
>   Count of deleted sessions: 0
>   Delete already deleted: 0
>   Session timers restarted: 0
>   Swipe until this time: 0
>   sw_if_index serviced bitmap: 0
>   pending clear intfc bitmap : 0
>   clear in progress: 0
>   interrupt is pending: 0
>   interrupt is needed: 0
>   interrupt is unwanted: 0
>   interrupt generation: 1898
>  
>  
> Conn cleaner thread counters:
> 0: delete_by_sw_index events
> 0: delete_by_sw_index handled ok
> 0: unknown events received
> 0: session idle timers restarted
>  1898: event wait with timeout called
> 1: event wait w/o timeout called
>  1898: total event cycles
> Interrupt generation: 1899
> Sessions per interval: min 1 max 100 increment: 100 ms current: 500 ms
>  
> Session lookup hash table:
> Hash table ACL plugin FA session bihash
> 0 active elements
> 0 free lists
> 0 linear search buckets
> 0 cache hits, 0 cache misses
>  
>  
> vpp#
> ___
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] dpdk_lib_init: Why hi->max_packet_bytes passed to rte_eth_dev_set_mtu()

2018-01-23 Thread Saxena, Nitin
Hi,

I am running VPP on Cavium’s OCTEONTx processor which is using 
VNET_DPDK_PMD_THUNDERX driver in dpdk.  I am running into failure because 
dpdk_lib_init() and dpdk_device_setup() functions are calling 
rte_eth_dev_set_mtu() with argument hi->max_packet_bytes.

  1  Line no:112   src/plugins/dpdk/device/common.c  rte_eth_dev_set_mtu 
(xd->device_index, hi->max_packet_bytes);
  2   Line no: 674  src/plugins/dpdk/device/init.c   rte_eth_dev_set_mtu 
(xd->device_index, hi->max_packet_bytes);

I can see hi->max_packet_bytes being set to ETHERNET_MAX_PACKET_BYTES == 9216 
which is not the MTU but instead max frame size (in case of OCTEONTx)

The dpdk_lib_init() calls dpdk function: rte_eth_dev_info_get (i, _info); 
to get dev_info.max_rx_pktlen

hence MTU can be calculated as

 mtu = dev_info.max_rx_pktlen - sizeof(ethernet_header_t);

which the one should be passed to rte_eth_dev_set_mtu() and not 
hi->max_packet_bytes which does not take into account what DPDK PMD driver 
passing max_rx_pktlen.

Any comment/input will be helpful?

Thanks,
Nitin


___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] Re-verify a Commit?

2018-01-23 Thread Saxena, Nitin
Hi Jon,

Press reply button and post a review comment of: recheck

Thanks,
Nitin
> On 23-Jan-2018, at 10:29 PM, Jon Loeliger  wrote:
> 
> Hey vpp-dev-iants,
> 
> How do I kick-off a re-verify request after a patch fails
> to verify properly.  It is the mystery "unknown failure",
> so we just need to try to rebuild it again.  Am I just
> blindly missing a "reverify" button on an otherwise
> inscrutable Gerrit page somewhere?
> 
> Thanks,
> jdl
> 
> ___
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev

___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev


Re: [vpp-dev] Re-verify a Commit?

2018-01-23 Thread Neale Ranns (nranns)
Hi Jon,

Leave a code review comment of:
  recheck

that will poke JJB to go do its thing again

/neale

From:  on behalf of Jon Loeliger 
Date: Tuesday, 23 January 2018 at 17:59
To: vpp-dev 
Subject: [vpp-dev] Re-verify a Commit?

Hey vpp-dev-iants,

How do I kick-off a re-verify request after a patch fails
to verify properly.  It is the mystery "unknown failure",
so we just need to try to rebuild it again.  Am I just
blindly missing a "reverify" button on an otherwise
inscrutable Gerrit page somewhere?

Thanks,
jdl

___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] Re-verify a Commit?

2018-01-23 Thread Jon Loeliger
Hey vpp-dev-iants,

How do I kick-off a re-verify request after a patch fails
to verify properly.  It is the mystery "unknown failure",
so we just need to try to rebuild it again.  Am I just
blindly missing a "reverify" button on an otherwise
inscrutable Gerrit page somewhere?

Thanks,
jdl
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] VPP/AArch64 - fd.io

2018-01-23 Thread Tina Tsou
Dear Maciek,

As discussed at today’s VPP call, you may want to look into here.

https://wiki.fd.io/view/VPP/AArch64

Build, unit test, packaging

The following is tracked manually until hardware is integrated into upstream 
FD.io CI


Cmd Status  timing
make bootstrap  OK  0m45
make build  OK  11m45
make build-release  OK  14m56
make test   OK  26m7
make test-all   KO (kubeproxy)  36m15
make test-debug OK  22m32
make test-all-debug KO (kubeproxy)  33m29

Status on commit: 9cfb11787f24e90ad14697afefbb2dd5969b2951 (Mon Jan 8 01:29:34 
2018)

kubeproxy tests are broken on purpose: corresponding features are not fully 
implemented

Timing consideration on platform: Hierofalcon with Cortex-A57 & Fedora 26

  *   Might want to have a look at this patch which adds make config: 
https://gerrit.fd.io/r/#/c/9200/

Distro  Cmd Status
Fedora 26 (Server Edition)  make pkg-rpmOK
Ubuntu 17.10make pkg-debOK
Ubuntu 16.04.3 LTS  make pkg-debOK




Thank you,
Tina
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] RFC: Error Codes

2018-01-23 Thread Dave Barach (dbarach)
Right. The error number base needs to be managed just like the message ID base… 
D.

From: Jon Loeliger [mailto:j...@netgate.com]
Sent: Tuesday, January 23, 2018 9:39 AM
To: Ole Troan 
Cc: Dave Barach (dbarach) ; vpp-dev 
Subject: Re: [vpp-dev] RFC: Error Codes

On Tue, Jan 23, 2018 at 8:12 AM, Ole Troan 
> wrote:
Dear Dave,

> I would be tempted to have the compiler emit 
> "foreach__api_error" macros [or similar]:
>
> #define foreach_foo_api_error \
> _(SUCCESS, "Success") \
> _(ERROR, "This didn't go well")
>
> To minimize pain in upgrading existing C-code...

Ah, yes of course.
Done.
https://gerrit.fd.io/r/#/c/10204/

Cheers,
Ole

Glad to see you guys like the notion!

With this, will plugins have to manage an error number base for
each plugin now?  Or will that be some form of magic behind the scene?

Thanks,
jdl

___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] RFC: Error Codes

2018-01-23 Thread Jon Loeliger
On Tue, Jan 23, 2018 at 8:12 AM, Ole Troan  wrote:

> Dear Dave,
>
> > I would be tempted to have the compiler emit 
> > "foreach__api_error"
> macros [or similar]:
> >
> > #define foreach_foo_api_error \
> > _(SUCCESS, "Success") \
> > _(ERROR, "This didn't go well")
> >
> > To minimize pain in upgrading existing C-code...
>
> Ah, yes of course.
> Done.
> https://gerrit.fd.io/r/#/c/10204/
>
> Cheers,
> Ole


Glad to see you guys like the notion!

With this, will plugins have to manage an error number base for
each plugin now?  Or will that be some form of magic behind the scene?

Thanks,
jdl
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] How to link zmq library to new plugin in vpp

2018-01-23 Thread Dave Barach (dbarach)
This report leaves a bit to be desired. As in: "configure file" means what? 
Where is the build output?

Laying that aside, if your plugin is called xxx, try adding:

 xxx_plugin_la_LIBADD += -lzmq

to src/plugins/xxx.am...

HTH... Dave

From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Vadnere, Neha R
Sent: Tuesday, January 23, 2018 4:56 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] How to link zmq library to new plugin in vpp

Hi,

I want to use zmq APIs in my plugin in VPP. I tried to add following line in 
configure file:
LDFLAGS+=-L/usr/local/lib -lzmq
autoreconf -fis
./configure
make
make install

and  I am building new plugin from main vpp directory
cd vpp/
make build
make run

But this is not working for me. Can anybody please let me know the correct way 
to link library to plugin?

Regards,
Neha

___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] RFC: Error Codes

2018-01-23 Thread Ole Troan
Dear Dave,

> I would be tempted to have the compiler emit 
> "foreach__api_error" macros [or similar]:
> 
> #define foreach_foo_api_error \
> _(SUCCESS, "Success") \
> _(ERROR, "This didn't go well")
> 
> To minimize pain in upgrading existing C-code...

Ah, yes of course.
Done.
https://gerrit.fd.io/r/#/c/10204/

Cheers,
Ole

> -Original Message-
> From: Ole Troan [mailto:otr...@employees.org]
> Sent: Tuesday, January 23, 2018 5:41 AM
> To: Dave Barach (dbarach) ; Jon Loeliger 
> Cc: vpp-dev 
> Subject: Re: [vpp-dev] RFC: Error Codes
> 
> Dave, Jon,
> 
>> On 22 Jan 2018, at 19:34, Dave Barach (dbarach)  wrote:
>> 
>> Dear Jon,
>> 
>> That makes sense to me. Hopefully Ole will comment with respect to
>> adding statements of the form
>> 
>> error { FOO_NOT_AVAILABLE, “Resource ‘foo’ is not available } ;
>> 
>> to the new Python PLY-based API generator.
>> 
>> The simple technique used to allocate plugin message-ID’s seems to work OK 
>> to solve the analogous problem here.
> 
> That makes sense to me too (wonder why we haven't done that before. ;-))
> 
> Here is the patch to the compiler:
> 
> https://gerrit.fd.io/r/10204 VPPAPIGEN: Error definitions
> 
> VPPAPIGEN: Error definitions
> This commit adds support for defining errors.
> 
> errors {
>  SUCCESS, "No error";
>  ERROR, "This didn't go well";
> };
> 
> Which results in the following C:
> 
> vl_error(VL_API_ERROR_SUCCESS, "No error") vl_error(VL_API_ERROR_ERROR, "This 
> didn't go well")
> 
> And JSON:
> "errors": [ [ "SUCCESS", "No error" ], [ "ERROR", "This is wrong" ] ]
> 
> 
> Does that seem sane?
> 
> Cheers,
> Ole
> 
>> 
>> Thanks… Dave
>> 
>> From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io]
>> On Behalf Of Jon Loeliger
>> Sent: Monday, January 22, 2018 12:13 PM
>> To: vpp-dev 
>> Subject: [vpp-dev] RFC: Error Codes
>> 
>> Hey VPP Aficionados,
>> 
>> I would like to make a proposal for a new way to introduce error codes
>> into the VPP code base.  The two main motivations for the proposal are
>> 
>>1) to improve the over-all error messages coupled to their API
>> calls, and
>>2) to clearly delineate the errors for VNET from those of various plugins.
>> 
>> Recently, it was pointed out to me that the errors for the various
>> plugins should not introduce new, plugin-specific errors into the main
>> VNET list of errors (src/vnet/api_errno.h) on the basis that plugins
>> shouldn't clutter VNET, should be more self-sustaining, and should stand 
>> alone.
>> 
>> Without a set of generic error codes that can be used by the various
>> plugins, there would then be no error codes as viable return values
>> from the API calls defined by plugins.
>> 
>> So here is my proposal:
>> 
>>- Extend the API definition files to allow the definition of error 
>> messages
>>  and codes specific to VNET, or to a plugin.
>> 
>>- Each plugin registers its error codes with a main registry upon being 
>> loaded.
>> 
>>- The global error table is maintained, perhaps much like API enums today.
>> 
>>- Each API call then has a guaranteed set of return values defined 
>> directly
>>  within its own API definition, thus coupling API calls and their 
>> possible
>>  returned error codes as well.
>> 
>> Other thoughts?
>> 
>> Thanks,
>> jdl
>> 
>> ___
>> vpp-dev mailing list
>> vpp-dev@lists.fd.io
>> https://lists.fd.io/mailman/listinfo/vpp-dev
> 



signature.asc
Description: Message signed with OpenPGP
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] Vpp apps available

2018-01-23 Thread Sarkar, Kawshik
Thanks Marek for your reply.
  
1)If I took something like “yang explorer “and tried to upload the yang schema 
for vpp there and interact with vpp from there using netconf..can you point me 
towards a yang-schema that I can download . I am not sure how I can download 
some of the yang schemea links u pointed to me earlier. There is no download 
link.

2)in vpp nitrogen do I need to also copy the yang schemas to the vpp device or 
is it already present there?

3)what is hc2vpp? Is that an app?

4)what is the use of some of these plugins like v3po?Is it relevant to my 
requirement?

5)does each api in the list you shared map to a corresponding yang entry In 
netconf/yang?

Thanks for your great help.



Sent from my iPhone

> On Jan 23, 2018, at 12:46 AM, Marek Gradzki -X (mgradzki - PANTHEON 
> TECHNOLOGIES at Cisco)  wrote:
> 
> Hi,
> 
> vbd allows to mount multiple vpp instances and configure bridge domains, also 
> provides GUI.
> I also recall gbp, but I also suggest asking ODL mailing list.
> 
> If you are interested in VPP + ODL integration or want to configure VPP using 
> RESTCONF/NETCONF,
> you can use honeycomb and you don't need any app on top as described in the 
> other thread you started on 
> hc2vpp list.
> 
> Here is list of VPP features we support and mapping to yang models:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.fd.io_hc2vpp_1.17.10_hc2vpp-2Dparent_release-2Dnotes-2Daggregator_api-5Fdocs-5Findex.html=DwIFAg=LlUvidvlhStGUSxQl0giOA=CH1IaH9G9Yvtvt_W7UNpxUe_7wG3-oz0TDVxIZBCmBs=RPqAVsbzlwSAh575RWLi4Ftg11eOnu_6WSnr6zpDL90=3rDbEcfqbNu5TQJ5-QzgAou4T-Zyy8BeTXNDsmKSzJc=
> 
> Regards,
> Marek
> 
> -Original Message-
> From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
> Behalf Of Sarkar, Kawshik
> Sent: 22 stycznia 2018 14:05
> To: vpp-dev@lists.fd.io
> Subject: [vpp-dev] Vpp apps available
> 
> I am finding only one vpp app out there called vpp vbd for odl...It only lets 
> u create bridge domains but lacks other major stuffs like tap and veth 
> interface creation etc..and many more functionsquestion 1.are there other 
> apps available? Question 2.can users create their own yang models and model 
> enhance the platform?
> 
> Sent from my iPhone
> 
> 
> This electronic message and any files transmitted with it contains 
> information from iDirect, which may be privileged, proprietary and/or 
> confidential. It is intended solely for the use of the individual or entity 
> to whom they are addressed. If you are not the original recipient or the 
> person responsible for delivering the email to the intended recipient, be 
> advised that you have received this email in error, and that any use, 
> dissemination, forwarding, printing, or copying of this email is strictly 
> prohibited. If you received this email in error, please delete it and 
> immediately notify the sender.
> ___
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.fd.io_mailman_listinfo_vpp-2Ddev=DwIFAg=LlUvidvlhStGUSxQl0giOA=CH1IaH9G9Yvtvt_W7UNpxUe_7wG3-oz0TDVxIZBCmBs=RPqAVsbzlwSAh575RWLi4Ftg11eOnu_6WSnr6zpDL90=K6QharvlZaBphlBs-e8rx8l3IGngloNh9N8eZPNUeww=


This electronic message and any files transmitted with it contains
information from iDirect, which may be privileged, proprietary
and/or confidential. It is intended solely for the use of the individual
or entity to whom they are addressed. If you are not the original
recipient or the person responsible for delivering the email to the
intended recipient, be advised that you have received this email
in error, and that any use, dissemination, forwarding, printing, or
copying of this email is strictly prohibited. If you received this email
in error, please delete it and immediately notify the sender.
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] RFC: Error Codes

2018-01-23 Thread Dave Barach (dbarach)
I would be tempted to have the compiler emit "foreach__api_error" 
macros [or similar]:

#define foreach_foo_api_error \
_(SUCCESS, "Success") \
_(ERROR, "This didn't go well") 

To minimize pain in upgrading existing C-code...

D.


-Original Message-
From: Ole Troan [mailto:otr...@employees.org] 
Sent: Tuesday, January 23, 2018 5:41 AM
To: Dave Barach (dbarach) ; Jon Loeliger 
Cc: vpp-dev 
Subject: Re: [vpp-dev] RFC: Error Codes

Dave, Jon,

> On 22 Jan 2018, at 19:34, Dave Barach (dbarach)  wrote:
> 
> Dear Jon,
> 
> That makes sense to me. Hopefully Ole will comment with respect to 
> adding statements of the form
> 
> error { FOO_NOT_AVAILABLE, “Resource ‘foo’ is not available } ;
> 
> to the new Python PLY-based API generator.
> 
> The simple technique used to allocate plugin message-ID’s seems to work OK to 
> solve the analogous problem here.

That makes sense to me too (wonder why we haven't done that before. ;-))

Here is the patch to the compiler:

https://gerrit.fd.io/r/10204 VPPAPIGEN: Error definitions

VPPAPIGEN: Error definitions
This commit adds support for defining errors.

errors {
  SUCCESS, "No error";
  ERROR, "This didn't go well";
};

Which results in the following C:

vl_error(VL_API_ERROR_SUCCESS, "No error") vl_error(VL_API_ERROR_ERROR, "This 
didn't go well")

And JSON:
 "errors": [ [ "SUCCESS", "No error" ], [ "ERROR", "This is wrong" ] ]


Does that seem sane?

Cheers,
Ole

> 
> Thanks… Dave
> 
> From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] 
> On Behalf Of Jon Loeliger
> Sent: Monday, January 22, 2018 12:13 PM
> To: vpp-dev 
> Subject: [vpp-dev] RFC: Error Codes
> 
> Hey VPP Aficionados,
> 
> I would like to make a proposal for a new way to introduce error codes 
> into the VPP code base.  The two main motivations for the proposal are
> 
> 1) to improve the over-all error messages coupled to their API 
> calls, and
> 2) to clearly delineate the errors for VNET from those of various plugins.
> 
> Recently, it was pointed out to me that the errors for the various 
> plugins should not introduce new, plugin-specific errors into the main 
> VNET list of errors (src/vnet/api_errno.h) on the basis that plugins 
> shouldn't clutter VNET, should be more self-sustaining, and should stand 
> alone.
> 
> Without a set of generic error codes that can be used by the various 
> plugins, there would then be no error codes as viable return values 
> from the API calls defined by plugins.
> 
> So here is my proposal:
> 
> - Extend the API definition files to allow the definition of error 
> messages
>   and codes specific to VNET, or to a plugin.
> 
> - Each plugin registers its error codes with a main registry upon being 
> loaded.
> 
> - The global error table is maintained, perhaps much like API enums today.
> 
> - Each API call then has a guaranteed set of return values defined 
> directly
>   within its own API definition, thus coupling API calls and their 
> possible
>   returned error codes as well.
> 
> Other thoughts?
> 
> Thanks,
> jdl
> 
> ___
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev

___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] How to link zmq library to new plugin in vpp

2018-01-23 Thread Vadnere, Neha R
Hi,

I want to use zmq APIs in my plugin in VPP. I tried to add following line in 
configure file:
LDFLAGS+=-L/usr/local/lib -lzmq
autoreconf -fis
./configure
make
make install

and  I am building new plugin from main vpp directory
cd vpp/
make build
make run

But this is not working for me. Can anybody please let me know the correct way 
to link library to plugin?

Regards,
Neha

___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] RFC: Error Codes

2018-01-23 Thread Ole Troan
Dave, Jon,

> On 22 Jan 2018, at 19:34, Dave Barach (dbarach)  wrote:
> 
> Dear Jon,
> 
> That makes sense to me. Hopefully Ole will comment with respect to adding 
> statements of the form
> 
> error { FOO_NOT_AVAILABLE, “Resource ‘foo’ is not available } ;
> 
> to the new Python PLY-based API generator.
> 
> The simple technique used to allocate plugin message-ID’s seems to work OK to 
> solve the analogous problem here.

That makes sense to me too (wonder why we haven't done that before. ;-))

Here is the patch to the compiler:

https://gerrit.fd.io/r/10204 VPPAPIGEN: Error definitions

VPPAPIGEN: Error definitions
This commit adds support for defining errors.

errors {
  SUCCESS, "No error";
  ERROR, "This didn't go well";
};

Which results in the following C:

vl_error(VL_API_ERROR_SUCCESS, "No error")
vl_error(VL_API_ERROR_ERROR, "This didn't go well")

And JSON:
 "errors": [ [ "SUCCESS", "No error" ], [ "ERROR", "This is wrong" ] ]


Does that seem sane?

Cheers,
Ole

> 
> Thanks… Dave
> 
> From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
> Behalf Of Jon Loeliger
> Sent: Monday, January 22, 2018 12:13 PM
> To: vpp-dev 
> Subject: [vpp-dev] RFC: Error Codes
> 
> Hey VPP Aficionados,
> 
> I would like to make a proposal for a new way to introduce error codes
> into the VPP code base.  The two main motivations for the proposal are
> 
> 1) to improve the over-all error messages coupled to their API calls,
> and
> 2) to clearly delineate the errors for VNET from those of various plugins.
> 
> Recently, it was pointed out to me that the errors for the various plugins
> should not introduce new, plugin-specific errors into the main VNET list
> of errors (src/vnet/api_errno.h) on the basis that plugins shouldn't clutter
> VNET, should be more self-sustaining, and should stand alone.
> 
> Without a set of generic error codes that can be used by the various plugins,
> there would then be no error codes as viable return values from the API calls
> defined by plugins.
> 
> So here is my proposal:
> 
> - Extend the API definition files to allow the definition of error 
> messages
>   and codes specific to VNET, or to a plugin.
> 
> - Each plugin registers its error codes with a main registry upon being 
> loaded.
> 
> - The global error table is maintained, perhaps much like API enums today.
> 
> - Each API call then has a guaranteed set of return values defined 
> directly
>   within its own API definition, thus coupling API calls and their 
> possible
>   returned error codes as well.
> 
> Other thoughts?
> 
> Thanks,
> jdl
> 
> ___
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev



signature.asc
Description: Message signed with OpenPGP
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] VPP equivalent of the vrf commands in Cisco

2018-01-23 Thread Neale Ranns (nranns)

Hi Reza,

Can I refer you back to this previous thread;
  https://lists.fd.io/pipermail/vpp-dev/2017-August/006254.html

/neale

From:  on behalf of "mirzaei.reza" 

Date: Tuesday, 23 January 2018 at 09:27
To: Vpp Dev 
Subject: [vpp-dev] VPP equivalent of the vrf commands in Cisco


Hi
I want to know what is VPP equivalent of the "ip route vrf vrf_name" command in 
Cisco?
Also equivalent of these commands:
"ip vrf vrf_name"
"rd RD_value"
"route-target import vrf_name"

Best regards
Reza
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev