Re: [vpp-dev] Coding Preference Question

2017-02-23 Thread Burt Silverman
​Spend some time with C++ and it becomes more obvious that ~0 and -1 are
the same thing:  0 is an integer, and ~0 is also an integer, with the bits
flipped, and -1 is an integer with the same bit pattern as ~0. So if the
intent is to have an unsigned int with the same bit pattern as ~0 or -1,
the way to write that is ~0U (0U is an unsigned int, and ~ is an also an
unsigned int, but with the bits flipped.) [Invariably C++ throws out
warnings and/or errors for this type of thing, unlike C.]

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

Re: [vpp-dev] Coding Preference Question

2017-02-23 Thread Dave Barach (dbarach)
If the value could be construed as a pool index - e.g. a sw_if_index - I always 
use u32 and ~0...

Thanks… Dave

From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Jon Loeliger
Sent: Thursday, February 23, 2017 5:03 PM
To: vpp-dev 
Subject: [vpp-dev] Coding Preference Question

VPPers,

As a general rule, do you guys prefer to use:

1) An integer (i32) and -1 as a flag case,
or
2) An unsigned integer (u32) and ~0 as the flag case?

If it matters, this is for an API value.

Thanks,
jdl

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

[vpp-dev] Coding Preference Question

2017-02-23 Thread Jon Loeliger
VPPers,

As a general rule, do you guys prefer to use:

1) An integer (i32) and -1 as a flag case,
or
2) An unsigned integer (u32) and ~0 as the flag case?

If it matters, this is for an API value.

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

[vpp-dev] vpp csit functional test failures, not obviously related to the patches involved

2017-02-23 Thread Dave Barach (dbarach)
For example: https://gerrit.fd.io/r/#/c/5498

Thanks... Dave

13:54:14.203  TRACE   exec_command on ('10.30.51.236', 22): sudo -S rm -f 
/tmp/qga.sock
13:54:14.306  TRACE   exec_command on ('10.30.51.236', 22) took 
0.106814861298 seconds
13:54:14.306  TRACE   chan_recv/_stderr took 0.000247001647949 seconds
13:54:14.307  TRACE   return RC 0
13:54:14.307  TRACE   return STDOUT
13:54:14.307  TRACE   return STDERR
13:54:14.307  DEBUG  [chan 269] Max packet in: 32768 bytes
13:54:14.311  TRACE   exec_command on ('10.30.51.236', 22): sudo -S rm -f 
/tmp/sock1
13:54:14.413  TRACE   exec_command on ('10.30.51.236', 22) took 
0.106304168701 seconds
13:54:14.413  TRACE   chan_recv/_stderr took 0.000252962112427 seconds
13:54:14.414  TRACE   return RC 0
13:54:14.414  TRACE   return STDOUT
13:54:14.414  TRACE   return STDERR
13:54:14.414  DEBUG  [chan 270] Max packet in: 32768 bytes
13:54:14.418  TRACE   exec_command on ('10.30.51.236', 22): sudo -S rm -f 
/tmp/sock2
13:54:14.521  TRACE   exec_command on ('10.30.51.236', 22) took 
0.106459140778 seconds
13:54:14.521  TRACE   chan_recv/_stderr took 0.000211000442505 seconds
13:54:14.521  TRACE   return RC 0
13:54:14.521  TRACE   return STDOUT
13:54:14.521  TRACE   return STDERR
13:54:14.522  FAIL   SSHTimeout: Timeout exception.
Current contents of stdout buffer:
Current contents of stderr buffer:
13:54:14.522  DEBUG  Traceback (most recent call last):
  File 
"/w/workspace/vpp-csit-verify-virl-master/csit/resources/libraries/python/QemuUtils.py",
 line 521, in qemu_start
self._wait_until_vm_boot()
  File 
"/w/workspace/vpp-csit-verify-virl-master/csit/resources/libraries/python/QemuUtils.py",
 line 297, in _wait_until_vm_boot
out = self._qemu_qga_exec('guest-ping')
  File 
"/w/workspace/vpp-csit-verify-virl-master/csit/resources/libraries/python/QemuUtils.py",
 line 272, in _qemu_qga_exec
(ret_code, stdout, stderr) = self._ssh.exec_command(qga_cmd)
  File 
"/w/workspace/vpp-csit-verify-virl-master/csit/resources/libraries/python/ssh.py",
 line 156, in exec_command
.format(stdout.getvalue(), stderr.getvalue())
13:53:43.855  TRACE   Arguments: [ 'Qemu Start' ]
13:53:43.807  TRACE   Arguments: [ ${dut_node}={b'honeycomb': 
{b'netconf_port': 2831, b'passwd': b'admin', b'port': 8183, b'user': b'admin'},
b'host': b'10.30.51.236',
b'interfaces': {b'port1': {b'link': b'link1', b'mac_address': 
b'fa:16:3e:77:59:76', b'mtu': 9216, b'name': 'GigabitEthernet0/4/0', 
b'pci_address': b':00:04.0', b'vpp_sw_index': 1},
 b'port2': {b'link': b'link4', b'mac_address': 
b'fa:16:3e:11:d6:45', b'mtu': 9216, b'name': 'GigabitEthernet0/5/0', 
b'pci_address': b':00:05.0', b'vpp_sw_index': 2},
 b'port3': {b'link': b'link3', b'mac_address': 
b'fa:16:3e:e1:6f:29', b'mtu': 9216, b'name': 'GigabitEthernet0/6/0', 
b'pci_address': b':00:06.0', b'vpp_sw_index': 3},
 b'port4': {b'link': b'link6', b'mac_address': 
b'fa:16:3e:3b:47:19', b'mtu': 9216, b'name': 'GigabitEthernet0/7/0', 
b'pci_address': b':00:07.0', b'vpp_sw_index': 4}},
b'port': 22,
b'priv_key': b'-BEGIN RSA PRIVATE 
KEY-\nMIIEpgIBAAKCAQEAwUDlTpzSHpwLQotZOFS4AgcPNEWCnP1AB2hWFmvI+8Kah/gb\nv8ruZU9RqhPs56tyKzxbhvNkY4VbH5F1GilHZu3mLqzM4KfghMmaeMEjO1T7BYYd\nvuBfTvIluljfQ2vAlnYrDwn+ClxJk81m0pDgvrLEX4qVVh2sGh7UEkYy5r82DNa2\n4VjzPB1J/c8a9zP8FoZUhYIzF4FLvRMjUADpbMXgJMsGpaZLmz95ap0Eot7vb1Cc\n1LvF97iyBCrtIOSKRKA50ZhLGjMKmOwnYU+cP5718tbproDVi6VJOo7zeuXyetMs\n8YBl9kWblWG9BqP9jctFvsmi5G7hXgq1Y8u+DwIDAQABAoIBAQC/W4E0DHjLMny7\n0bvw2YKzD0Zw3fttdB94tkm4PdZv5MybooPnsAvLaXVV0hEdfVi5kzSWNl/LY/tN\nEP1BgGphc2QgB59/PPxGwFIjDCvUzlsZpynBHe+B/qh5ExNQcVvsIOqW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4CppeYLjMUHZpJYeX1USULJQd2c4crLJKb76E8gz3Z9kN\n-END
 RSA PRIVATE KEY-\n',
___
vpp-dev mailing list

Re: [vpp-dev] Loopback Interface Names

2017-02-23 Thread Burt Silverman
​No problem, Jon. Your original note suggests 2 problems, one in paragraphs
1-3, and the second problem being "not following PRCL". My understanding is
that John Lo's note eliminates the first problem as being interesting, so
that leaves the latter being in the "interesting" bucket. And like you say,
being similar to Linux does not help with that issue.

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

Re: [vpp-dev] Loopback Interface Names

2017-02-23 Thread Burt Silverman
​I am arriving a bit late to the party; I just wanted to point out that the
current user interface is similar to that of the Linux losetup command for
Linux loop devices. Here is a silly example to demonstrate:

burts@burtvb:~$ sudo losetup -f junk3.c
[sudo] password for burts:
losetup: junk3.c: Warning: file does not fit into a 512-byte sector; the
end of the file will be ignored.
burts@burtvb:~$ losetup -l
NAME   SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE DIO
/dev/loop0 00  0 0
/home/burts/junk3.c   0

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

Re: [vpp-dev] "TCP Shortcuts" for containers

2017-02-23 Thread Sukhomlinov, Vadim
Florin, thanks a lot!

In the vpp / src/scripts/vnet/uri/tcp-setup.sh there is a code to setup network 
topology with namespaces:
ip netns add vppns1
  ip link add veth_vpp1 type veth peer name vpp1
  ip link set dev vpp1 up
  ip link set dev veth_vpp1 up netns vppns1

  ip netns exec vppns1  \
  bash -c "
ip link set dev lo up
ip addr add 6.0.1.2/24 dev veth_vpp1
  "

  ethtool --offload  vpp1 rx off tx off
  ip netns ex

But I don’t see how I should config VPP to make it work. Does it mean I don’t 
have to do anything with vpp? Where is this LD_PRELOAD library?

Thanks,
Vadim


From: Florin Coras [mailto:fcoras.li...@gmail.com]
Sent: Thursday, February 23, 2017 01:27
To: Sukhomlinov, Vadim 
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] "TCP Shortcuts" for containers

Hi Vadim,

Code is still under development. We plan to merge the TCP stack and the shared 
memory FIFO code prior to 17.04 FC0. In the mean time, you can check a draft of 
what’s been done until now here [1]. Note however that most of the code is 
still in a state of flux.

HTH,
Florin

[1] https://gerrit.fd.io/r/#/c/5150

On Feb 22, 2017, at 8:31 PM, Sukhomlinov, Vadim 
> wrote:

Hi All,

On wiki there is slidedeck 
https://wiki.fd.io/view/File:Fdio_minisummit_-_containers_(theme).pptx which 
mention handling of TCP connections between namespaces thru FIFO Shared Memory 
buffers. However, I can’t find where it’s implemented and what is “official” 
name for this feature and how to configure VPP and application to use it.  I’m 
also very interested in performance data for this approach.

Thanks in advance,
Vadim
___
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] Loopback Interface Names

2017-02-23 Thread Jon Loeliger
Dave,

Thanks for taking the time to help me here!

On Wed, Feb 22, 2017 at 4:47 PM, Dave Barach (dbarach) 
wrote:

> You would certainly have to rewrite vnet_create_loopback_interface(...) a
> little bit. That’s not necessarily a bad thing.
>

Yeah, I figured as much on that front... :-)  I'm not afraid of
giving it a swing.


> Please brain-police the instance number: flunk attempts to create specific
> loopback instances (e.g. loop0) more than once, and so forth. Bitmap, plus
> some upper limit (maybe 16k?) on the loopback instance number.
>

Can do.  Two questions.  If a loopback interface is deleted,
would that free-up the instance number for re-use?  Or is
there lingering reason to never reuse an instance number?
And second, is there a bit-vector implementation around?
I would assume so and I just need to go looking...?

I still need to resolve the name expectations; that is, expecting
"Loopback" to be the base, and not "loop".  Does one of these
options make more sense here?

1) Have the API create call supply the desired name directly,
defaulting to "loop"-names if none are specified.

2) Have a loopback-module-global-ish config variable stating
to be in "loop" or "Loopback" mode.  Mode can be set via
new loopback API config call, or via VPP startup config setting.

3) Tell our users to get used to the New "loop" World Order? :-)

HTH… Dave
>

Thanks,
jdl


> PS -- At the risk of foretelling the future, bridge names are going to
 have this same naming issue, right?  'Cuz those are next up!
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] VPP Wiki Release Plan Snigglet

2017-02-23 Thread Jon Loeliger
On Thu, Feb 23, 2017 at 2:04 AM, Jong Hahn (jonhahn) 
wrote:

> Hi Jon,
>
> Per below, I updated the wiki and the Jira link.
>
> Thanks,
>
> Jong
>
>
>
Jong,

Thank you!

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

Re: [vpp-dev] SNAT Future API Questions

2017-02-23 Thread Jon Loeliger
On Wed, Feb 22, 2017 at 11:28 PM, Matus Fabian -X (matfabia - PANTHEON
TECHNOLOGIES at Cisco)  wrote:

> Hi,
>
>
>
> There is currently work on dump API  for SNAT runtime data (users and
> sessions). It will be finished in next few days.
>
>
>
> Matus
>

Matus,

That is awesome news!  Thank you!

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

Re: [vpp-dev] dpdk sw crypto- build error

2017-02-23 Thread Nicolau, Radu
If the issue appears on Ubuntu and other Debian based distros then the root of 
the problem is libtool, which is patched to set link_all_deplibs=no in the 
libtool script, effectively making libtool ignore library dependencies – the 
dependency_libs section in the .la files.

A quick workaround is to install libtool from sources.

Regards,
Radu
From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Tkachuk, Georgii
Sent: Wednesday, February 22, 2017 6:10 PM
To: Lu, Patrick ; yusuf khan ; 
vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] dpdk sw crypto- build error

We worked around this by adding extra compile flags to prevent the IPSec lib 
from being stripped from the compiler command:
Also, we proactively placed the libIPSec_MB.a into /usr/lib/. so that we don’t 
have to provide the path.

diff --git a/build-data/platforms/vpp.mk b/build-data/platforms/vpp.mk
index 401a383..b5b2369 100644
--- a/build-data/platforms/vpp.mk
+++ b/build-data/platforms/vpp.mk
@@ -54,7 +54,7 @@ vpp_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG 
-DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC -Werror

 vpp_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
-   -fstack-protector -fPIC -Werror
+   -fstack-protector -fPIC -Werror 
-Wl,--whole-archive,-l:libIPSec_MB.a,--no-whole-archive
 vpp_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
-fstack-protector -fPIC -Werror

If you don’t want to modify the vpp.mk it should also be possible to add the 
change to the vpp by guarding the IPSec lib as above in this bit:

if WITH_DPDK_CRYPTO_SW
DPDK_LD_ADD = -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
endif

Regards,
George

From: Lu, Patrick
Sent: Wednesday, February 22, 2017 11:02 AM
To: yusuf khan >; 
vpp-dev@lists.fd.io
Cc: Tkachuk, Georgii 
>
Subject: RE: [vpp-dev] dpdk sw crypto- build error

Hi Yusuf,

We saw the same issue. Copying George for workaround.

Thanks,

Patrick

From: vpp-dev-boun...@lists.fd.io 
[mailto:vpp-dev-boun...@lists.fd.io] On Behalf Of yusuf khan
Sent: Wednesday, February 22, 2017 8:50 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] dpdk sw crypto- build error

Hi,

I am trying to build latest vpp with vpp_uses_dpdk_cryptodev_sw = yes option to 
enable vpp sw crypto.
Initilia steps of downloading/compiling aesni-mb and isal-crypto works fine.
But during linking stage i am getting below errors...

CCLD bin/vpp
  CCLD vpp_api_test
  CCLD pcap2pg
./.libs/libvnet.so: undefined reference to `aesni_gcm256_init'
./.libs/libvnet.so: undefined reference to `aes_xcbc_expand_key_avx'
./.libs/libvnet.so: undefined reference to `submit_job_sse'
./.libs/libvnet.so: undefined reference to `sha1_one_block_sse'
./.libs/libvnet.so: undefined reference to `flush_job_avx2'
./.libs/libvnet.so: undefined reference to `sha512_one_block_avx'
./.libs/libvnet.so: undefined reference to `aesni_gcm256_dec_finalize'
./.libs/libvnet.so: undefined reference to `aesni_gcm128_enc_update'
./.libs/libvnet.so: undefined reference to `aesni_gcm128_pre'
./.libs/libvnet.so: undefined reference to `sha1_one_block_avx'
./.libs/libvnet.so: undefined reference to `sha256_one_block_sse'
./.libs/libvnet.so: undefined reference to `aes_xcbc_expand_key_sse'
./.libs/libvnet.so: undefined reference to `sha224_one_block_avx'
./.libs/libvnet.so: undefined reference to `sha256_one_block_avx'
./.libs/libvnet.so: undefined reference to `init_mb_mgr_avx2'
./.libs/libvnet.so: undefined reference to `aesni_gcm128_init'
./.libs/libvnet.so: undefined reference to `sha384_one_block_sse'
./.libs/libvnet.so: undefined reference to `submit_job_avx2'
./.libs/libvnet.so: undefined reference to `aesni_gcm256_dec_update'
./.libs/libvnet.so: undefined reference to `flush_job_avx'
./.libs/libvnet.so: undefined reference to `submit_job_avx512'
./.libs/libvnet.so: undefined reference to `aes_keyexp_256_avx'
./.libs/libvnet.so: undefined reference to `aesni_gcm128_dec_finalize'
./.libs/libvnet.so: undefined reference to `aes_keyexp_192_avx'
./.libs/libvnet.so: undefined reference to `init_mb_mgr_sse'
./.libs/libvnet.so: undefined reference to `aes_keyexp_256_sse'
./.libs/libvnet.so: undefined reference to `aesni_gcm256_enc_finalize'
./.libs/libvnet.so: undefined reference to `init_mb_mgr_avx'
./.libs/libvnet.so: undefined reference to `aes_keyexp_128_sse'
./.libs/libvnet.so: undefined reference to `sha512_one_block_sse'
./.libs/libvnet.so: undefined reference to `aes_keyexp_128_avx'
./.libs/libvnet.so: undefined reference to `init_mb_mgr_avx512'
./.libs/libvnet.so: undefined reference to `aesni_gcm128_dec_update'
./.libs/libvnet.so: undefined reference to `flush_job_avx512'
./.libs/libvnet.so: undefined reference to 

Re: [vpp-dev] "TCP Shortcuts" for containers

2017-02-23 Thread Florin Coras
Hi Vadim, 

Code is still under development. We plan to merge the TCP stack and the shared 
memory FIFO code prior to 17.04 FC0. In the mean time, you can check a draft of 
what’s been done until now here [1]. Note however that most of the code is 
still in a state of flux. 

HTH, 
Florin

[1] https://gerrit.fd.io/r/#/c/5150 

> On Feb 22, 2017, at 8:31 PM, Sukhomlinov, Vadim  
> wrote:
> 
> Hi All,
>  
> On wiki there is slidedeck 
> https://wiki.fd.io/view/File:Fdio_minisummit_-_containers_(theme).pptx 
>  
> which mention handling of TCP connections between namespaces thru FIFO Shared 
> Memory buffers. However, I can’t find where it’s implemented and what is 
> “official” name for this feature and how to configure VPP and application to 
> use it.  I’m also very interested in performance data for this approach.
>  
> Thanks in advance,
> Vadim
> ___
> 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] VPP Wiki Release Plan Snigglet

2017-02-23 Thread Jong Hahn (jonhahn)
Hi Jon,
Per below, I updated the wiki and the Jira link.
Thanks,
Jong

From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Jon Loeliger
Sent: Wednesday, February 22, 2017 12:44 PM
To: vpp-dev 
Subject: [vpp-dev] VPP Wiki Release Plan Snigglet
Hi Folks,

Over on the VPP Wiki Page

https://wiki.fd.io/view/Projects/vpp/Release_Plans/Release_Plan_17.04

There is an apparent cut-n-paste-ish style error at the very bottom
where it suggests 17.07 features are being extracted from Jira using
an obsolete and non-public search query.

Thanks,
jdl

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