Re: [vpp-dev] VPP API language changes

2018-12-06 Thread pvinci
Hi Ole.

I could see a use for having an API call that populates the properties of an 
IntEnum. 

Paul
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11520): https://lists.fd.io/g/vpp-dev/message/11520
Mute This Topic: https://lists.fd.io/mt/28610110/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] VPP/Envoy integration status

2018-12-06 Thread Edward Warnicke
Checkout:

https://github.com/envoyproxy/envoy/pull/5177

The Envoy side modularity work is in progress :)

Ed

On Thu, Dec 6, 2018 at 6:45 PM dado via Lists.Fd.Io  wrote:

> Hi Florin,
>
> Thanks for the quick response. Do you know who I may contact regarding
> about VPP/Envoy integration status?
>
> Thanks,
> Dai -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
>
> View/Reply Online (#11518): https://lists.fd.io/g/vpp-dev/message/11518
> Mute This Topic: https://lists.fd.io/mt/28631119/464962
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [hagb...@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11519): https://lists.fd.io/g/vpp-dev/message/11519
Mute This Topic: https://lists.fd.io/mt/28631119/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] VPP/Envoy integration status

2018-12-06 Thread dado via Lists.Fd.Io
Hi Florin,

Thanks for the quick response. Do you know who I may contact regarding about 
VPP/Envoy integration status?

Thanks,
Dai
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11518): https://lists.fd.io/g/vpp-dev/message/11518
Mute This Topic: https://lists.fd.io/mt/28631119/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] VPP/Envoy integration status

2018-12-06 Thread Florin Coras
Hi Dai, 

No. The release plan is just a statement of intent. The actual release notes 
are here [1].

I know there are ongoing efforts in this area but I’m not sure about their 
current status. 

Florin

[1] https://git.fd.io/vpp/tree/RELEASE.md

> On Dec 6, 2018, at 2:34 PM, via Lists.Fd.Io 
>  wrote:
> 
> Hello,
>  
> Was VPP/Envoy integration delivered in VPP 18.07 as mentioned in the release 
> plan (https://wiki.fd.io/view/Projects/vpp/Release_Plans/Release_Plan_18.07 
> )? I 
> cannot seem to find the code nor any setup instructions in VPP 18.07 (or 
> 18.10) branch.
>  
> Thanks,
> Dai
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#11516): https://lists.fd.io/g/vpp-dev/message/11516 
> 
> Mute This Topic: https://lists.fd.io/mt/28631119/675152 
> 
> Group Owner: vpp-dev+ow...@lists.fd.io 
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub 
>   [fcoras.li...@gmail.com 
> ]
> -=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11517): https://lists.fd.io/g/vpp-dev/message/11517
Mute This Topic: https://lists.fd.io/mt/28631119/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] VPP/Envoy integration status

2018-12-06 Thread via Lists.Fd.Io
Hello,

Was VPP/Envoy integration delivered in VPP 18.07 as mentioned in the release 
plan (https://wiki.fd.io/view/Projects/vpp/Release_Plans/Release_Plan_18.07)? I 
cannot seem to find the code nor any setup instructions in VPP 18.07 (or 18.10) 
branch.

Thanks,
Dai
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11516): https://lists.fd.io/g/vpp-dev/message/11516
Mute This Topic: https://lists.fd.io/mt/28631119/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-api-dev] [vpp-dev] VPP API language changes

2018-12-06 Thread Ole Troan


On 6 Dec 2018, at 16:56, Jon Loeliger  wrote:

>> That is now: typedef u32 ip4_address[4];
> 
> And we mean s/u32/u8/ here, right? :-)

It was clearly a Freudian slip. My subconscious expects all addresses to be 128 
bits. :-)
IPv6 has taken over the world, even IPv4 addresses are now 128 bits.

Thanks!
Ole-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11515): https://lists.fd.io/g/vpp-dev/message/11515
Mute This Topic: https://lists.fd.io/mt/28627893/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] VPP API language changes

2018-12-06 Thread Jon Loeliger
On Wed, Dec 5, 2018 at 6:04 AM Ole Troan  wrote:

> All,
>

Hi Ole,


> Here is an update on API progress.
>
> In the long process of making types in the API language more explicit I
> have a few changes merged and a few in the pipeline:
>

Hooray!


> - Type aliases. Previously any new user defined type had to be a
> structure. With type aliasing one can do
>   e.g.
>  typedef u32 interface_index
>  instead of:
>  typedef {
> u32 index;
>  } interface_index;
>
> This is merged in 53fffa1d
>
> I have a similar change for the relatively new ip4_address and ip6_address
> types, so instead of:
> typedef {
>   u32 address[4];
> } ip4_address;
>
> That is now: typedef u32 ip4_address[4];
>

And we mean s/u32/u8/ here, right? :-)


> I will try to update the API definitions with new type as I get the
> chance. bool and type aliases are backwards compatible (in that they
> require no change on the VPP side).
>

[ ... ]

Any other changes you’d like in the API language?
>

I noticed that we had f64, but not f32 the other day.  Is that by accident
or choice?
Related, it might be nice to have the clib_host_to_net_f{32,64}() functions
too?
(We are apparently doing those as clib_host_to_net_u64() and casting them
to f64 now.)

 And please let me know if you have comments on the above.
>
> Cheers,
> Ole
>

Pedantically,
jdl
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11514): https://lists.fd.io/g/vpp-dev/message/11514
Mute This Topic: https://lists.fd.io/mt/28610110/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] Lookup in VPP NAT

2018-12-06 Thread Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES@Cisco) via Lists.Fd.Io
Hi,

https://wiki.fd.io/view/VPP/NAT
NAT44 (vanilla/simple and endpoint-dependent mode) lazily delete expired 
sessions. When inserting to session lookup hash and bucket is full, expired 
session is overwritten.

Matus


-Original Message-
From: vpp-dev@lists.fd.io  On Behalf Of Yuan Fan
Sent: Thursday, December 6, 2018 2:19 PM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] Lookup in VPP NAT


Hi,

I am currently studying the VPP source code, and try to understand the specific 
implementation of your NAT plugin. I noticed that the NAT is using hash lookup 
in the release.md. I am asking about is that the  kind of algorithm you use for 
the lookup in NAT and also how you handle the timeout in NAT.


I would be really appreciated if you could help me understand more precisely!

Thank you for your time!

BR,
Yuan.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11513): https://lists.fd.io/g/vpp-dev/message/11513
Mute This Topic: https://lists.fd.io/mt/28625769/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] Lookup in VPP NAT

2018-12-06 Thread Yuan Fan

Hi,

I am currently studying the VPP source code, and try to understand the specific 
implementation of your NAT plugin. I noticed that the NAT is using hash lookup 
in the release.md. I am asking about is that the  kind of algorithm you use for 
the lookup in NAT and also how you handle the timeout in NAT.


I would be really appreciated if you could help me understand more precisely!

Thank you for your time!

BR,
Yuan.-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11512): https://lists.fd.io/g/vpp-dev/message/11512
Mute This Topic: https://lists.fd.io/mt/28625769/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] String tests failures

2018-12-06 Thread Dave Barach via Lists.Fd.Io
Glad to hear that. I'm not surprised, the problem was anything but subtle... D.

From: vpp-dev@lists.fd.io  On Behalf Of Juraj Linkeš
Sent: Thursday, December 6, 2018 4:13 AM
To: Dave Barach (dbarach) ; Lijian Zhang (Arm Technology 
China) 
Cc: Damjan Marion ; Steven Luong (sluong) ; 
vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] String tests failures

Dave, I was able to verify that the fix works and thus removed the test from 
https://gerrit.fd.io/r/#/c/16282/.

Thanks

From: Dave Barach (dbarach) [mailto:dbar...@cisco.com]
Sent: Wednesday, December 5, 2018 2:52 PM
To: Lijian Zhang (Arm Technology China) 
mailto:lijian.zh...@arm.com>>
Cc: Juraj Linkeš 
mailto:juraj.lin...@pantheon.tech>>; Damjan Marion 
mailto:dmar...@me.com>>; Steven Luong (sluong) 
mailto:slu...@cisco.com>>; 
vpp-dev@lists.fd.io
Subject: RE: String tests failures

See https://gerrit.fd.io/r/#/c/16352, which computes strlen if necessary for a 
precise copy-overlap check. Strncpy_s was always slightly wrong in this regard.

The "make test" failure showed up [only] on aarch64 due to test code stack 
variable placement / alignment differences between aarch64 and x86_64.

HTH... Dave

From: Lijian Zhang (Arm Technology China) 
mailto:lijian.zh...@arm.com>>
Sent: Wednesday, December 5, 2018 4:39 AM
To: Dave Barach (dbarach) mailto:dbar...@cisco.com>>
Cc: Juraj Linkeš 
mailto:juraj.lin...@pantheon.tech>>; Dave Barach 
(dbarach) mailto:dbar...@cisco.com>>; Damjan Marion 
mailto:dmar...@me.com>>
Subject: String tests failures

Hi Dave,
StringTest is failing on ARM machines.
I narrowed down the problem and commit an internal code review as below.
Once the internal code review process is passed, I'll upstream the patch for 
community review.

#define clib_strncpy(d,s,n) strncpy_s_inline(d,CLIB_STRING_MACRO_MAX,s,n)

errno_t
strncpy_s (char *__restrict__ dest, rsize_t dmax,
   const char *__restrict__ src, rsize_t n);

always_inline errno_t
strncpy_s_inline (char *__restrict__ dest, rsize_t dmax,
  const char *__restrict__ src, rsize_t n)
{
   u8 bad;
   uword low, hi;
   rsize_t m;
   errno_t status = EOK;

   bad = (dest == 0) + (dmax == 0) + (src == 0) + (n == 0);
   if (PREDICT_FALSE (bad != 0))
 {
   /* Not actually trying to copy anything is OK */
   if (n == 0)
return EOK;
   if (dest == 0)
clib_c11_violation ("dest NULL");
   if (src == 0)
clib_c11_violation ("src NULL");
   if (dmax == 0)
clib_c11_violation ("dmax 0");
   return EINVAL;
 }

   if (PREDICT_FALSE (n >= dmax))
 {
   /* Relax and use strnlen of src */
   clib_c11_violation ("n >= dmax");
   m = clib_strnlen (src, dmax);
   if (m >= dmax)
{
  /* Truncate, adjust copy length to fit dest */
  m = dmax - 1;
  status = EOVERFLOW;
}
 }
   else
-m = n;
+m = clib_strnlen (src, n);

   /* Check for src/dst overlap, which is not allowed */
   low = (uword) (src < dest ? src : dest);
   hi = (uword) (src < dest ? dest : src);

   if (PREDICT_FALSE (low + (m - 1) >= hi))
 {
   clib_c11_violation ("src/dest overlap");
   return EINVAL;
 }

   clib_memcpy_fast (dest, src, m);
   dest[m] = '\0';
   return status;
}
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.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11511): https://lists.fd.io/g/vpp-dev/message/11511
Mute This Topic: https://lists.fd.io/mt/28611039/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] ikev2-ipsec-tunnel && NAT-T ?

2018-12-06 Thread Klement Sekera via Lists.Fd.Io
I don't think that the current PoC ikev2 code can do that.

Regards,
Klement

Quoting wangchuan...@163.com (2018-12-06 11:29:12)
>Klement,
>    i saw the ipsec_sad_add_del_entry api , but in my mind, it was used to
>create manual ipsec tunnel .
>how to set the ipsec tunnel negotiated out by ikev2 to be udp-encaped
>using this api?
>can you give me some tips?
>thanks!
> 
>--
> 
>wangchuan...@163.com
> 
>   
>  发件人: [1]Klement Sekera
>  发送时间: 2018-12-06 18:16
>  收件人: [2]wangchuan...@163.com
>  抄送: [3]vpp-dev
>  主题: Re: Re: [vpp-dev] ikev2-ipsec-tunnel && NAT-T ?
>  ipsec_sad_add_del_entry API - udp_encap parameter must be set to 1
>   
>  Regards,
>  Klement
>   
>  Quoting wangchuan...@163.com (2018-12-06 02:16:35)
>  >    hi Klement,
>  >        which api? Thanks
>  >
>  >   
>  
> --
>  >
>  >    wangchuan...@163.com
>  >
>  >   
>  >  发件人: [1]Klement Sekera
>  >  发送时间: 2018-12-04 18:09
>  >  收件人: [2]wangchuan...@163.com
>  >  主题: Re: [vpp-dev] ikev2-ipsec-tunnel && NAT-T ?
>  >  There is an API to enable udp encap, but unless this is called
>  >  externally, it won't be used.
>  >   
>  >  Regards,
>  >  Klement
>  >   
>  >  Quoting wangchuan...@163.com (2018-12-04 02:15:53)
>  >  >    Hi all,
>  >  >        Can the ipsec tunnel generated by ikev2 support
>  >  udp-encap(NAT-T) ?
>  >  >    How?
>  >  >    Thanks!
>  >  >
>  >  >   
>  > 
>  
> --
>  >  >
>  >  >    wangchuan...@163.com
>  >
>  > References
>  >
>  >    Visible links
>  >    1. mailto:ksek...@cisco.com
>  >    2. mailto:wangchuan...@163.com
> 
> References
> 
>Visible links
>1. mailto:ksek...@cisco.com
>2. mailto:wangchuan...@163.com
>3. mailto:vpp-dev@lists.fd.io
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11510): https://lists.fd.io/g/vpp-dev/message/11510
Mute This Topic: https://lists.fd.io/mt/28578226/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] ikev2-ipsec-tunnel && NAT-T ?

2018-12-06 Thread wangchuan...@163.com
Klement,
i saw the ipsec_sad_add_del_entry api , but in my mind, it was used to 
create manual ipsec tunnel .
how to set the ipsec tunnel negotiated out by ikev2 to be udp-encaped using 
this api?
can you give me some tips?

thanks!



wangchuan...@163.com
 
发件人: Klement Sekera
发送时间: 2018-12-06 18:16
收件人: wangchuan...@163.com
抄送: vpp-dev
主题: Re: Re: [vpp-dev] ikev2-ipsec-tunnel && NAT-T ?
ipsec_sad_add_del_entry API - udp_encap parameter must be set to 1
 
Regards,
Klement
 
Quoting wangchuan...@163.com (2018-12-06 02:16:35)
>hi Klement,
>which api? Thanks
> 
>--
> 
>wangchuan...@163.com
> 
>   
>  发件人: [1]Klement Sekera
>  发送时间: 2018-12-04 18:09
>  收件人: [2]wangchuan...@163.com
>  主题: Re: [vpp-dev] ikev2-ipsec-tunnel && NAT-T ?
>  There is an API to enable udp encap, but unless this is called
>  externally, it won't be used.
>   
>  Regards,
>  Klement
>   
>  Quoting wangchuan...@163.com (2018-12-04 02:15:53)
>  >Hi all,
>  >Can the ipsec tunnel generated by ikev2 support
>  udp-encap(NAT-T) ?
>  >How?
>  >Thanks!
>  >
>  >   
>  
> --
>  >
>  >wangchuan...@163.com
> 
> References
> 
>Visible links
>1. mailto:ksek...@cisco.com
>2. mailto:wangchuan...@163.com
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11509): https://lists.fd.io/g/vpp-dev/message/11509
Mute This Topic: https://lists.fd.io/mt/28578226/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] ikev2-ipsec-tunnel && NAT-T ?

2018-12-06 Thread Klement Sekera via Lists.Fd.Io
ipsec_sad_add_del_entry API - udp_encap parameter must be set to 1

Regards,
Klement

Quoting wangchuan...@163.com (2018-12-06 02:16:35)
>hi Klement,
>    which api? Thanks
> 
>--
> 
>wangchuan...@163.com
> 
>   
>  发件人: [1]Klement Sekera
>  发送时间: 2018-12-04 18:09
>  收件人: [2]wangchuan...@163.com
>  主题: Re: [vpp-dev] ikev2-ipsec-tunnel && NAT-T ?
>  There is an API to enable udp encap, but unless this is called
>  externally, it won't be used.
>   
>  Regards,
>  Klement
>   
>  Quoting wangchuan...@163.com (2018-12-04 02:15:53)
>  >    Hi all,
>  >        Can the ipsec tunnel generated by ikev2 support
>  udp-encap(NAT-T) ?
>  >    How?
>  >    Thanks!
>  >
>  >   
>  
> --
>  >
>  >    wangchuan...@163.com
> 
> References
> 
>Visible links
>1. mailto:ksek...@cisco.com
>2. mailto:wangchuan...@163.com
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11508): https://lists.fd.io/g/vpp-dev/message/11508
Mute This Topic: https://lists.fd.io/mt/28578226/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] String tests failures

2018-12-06 Thread Juraj Linkeš
Dave, I was able to verify that the fix works and thus removed the test from 
https://gerrit.fd.io/r/#/c/16282/.

Thanks

From: Dave Barach (dbarach) [mailto:dbar...@cisco.com]
Sent: Wednesday, December 5, 2018 2:52 PM
To: Lijian Zhang (Arm Technology China) 
Cc: Juraj Linkeš ; Damjan Marion ; 
Steven Luong (sluong) ; vpp-dev@lists.fd.io
Subject: RE: String tests failures

See https://gerrit.fd.io/r/#/c/16352, which computes strlen if necessary for a 
precise copy-overlap check. Strncpy_s was always slightly wrong in this regard.

The "make test" failure showed up [only] on aarch64 due to test code stack 
variable placement / alignment differences between aarch64 and x86_64.

HTH... Dave

From: Lijian Zhang (Arm Technology China) 
mailto:lijian.zh...@arm.com>>
Sent: Wednesday, December 5, 2018 4:39 AM
To: Dave Barach (dbarach) mailto:dbar...@cisco.com>>
Cc: Juraj Linkeš 
mailto:juraj.lin...@pantheon.tech>>; Dave Barach 
(dbarach) mailto:dbar...@cisco.com>>; Damjan Marion 
mailto:dmar...@me.com>>
Subject: String tests failures

Hi Dave,
StringTest is failing on ARM machines.
I narrowed down the problem and commit an internal code review as below.
Once the internal code review process is passed, I'll upstream the patch for 
community review.

#define clib_strncpy(d,s,n) strncpy_s_inline(d,CLIB_STRING_MACRO_MAX,s,n)

errno_t
strncpy_s (char *__restrict__ dest, rsize_t dmax,
   const char *__restrict__ src, rsize_t n);

always_inline errno_t
strncpy_s_inline (char *__restrict__ dest, rsize_t dmax,
  const char *__restrict__ src, rsize_t n)
{
   u8 bad;
   uword low, hi;
   rsize_t m;
   errno_t status = EOK;

   bad = (dest == 0) + (dmax == 0) + (src == 0) + (n == 0);
   if (PREDICT_FALSE (bad != 0))
 {
   /* Not actually trying to copy anything is OK */
   if (n == 0)
return EOK;
   if (dest == 0)
clib_c11_violation ("dest NULL");
   if (src == 0)
clib_c11_violation ("src NULL");
   if (dmax == 0)
clib_c11_violation ("dmax 0");
   return EINVAL;
 }

   if (PREDICT_FALSE (n >= dmax))
 {
   /* Relax and use strnlen of src */
   clib_c11_violation ("n >= dmax");
   m = clib_strnlen (src, dmax);
   if (m >= dmax)
{
  /* Truncate, adjust copy length to fit dest */
  m = dmax - 1;
  status = EOVERFLOW;
}
 }
   else
-m = n;
+m = clib_strnlen (src, n);

   /* Check for src/dst overlap, which is not allowed */
   low = (uword) (src < dest ? src : dest);
   hi = (uword) (src < dest ? dest : src);

   if (PREDICT_FALSE (low + (m - 1) >= hi))
 {
   clib_c11_violation ("src/dest overlap");
   return EINVAL;
 }

   clib_memcpy_fast (dest, src, m);
   dest[m] = '\0';
   return status;
}
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.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11507): https://lists.fd.io/g/vpp-dev/message/11507
Mute This Topic: https://lists.fd.io/mt/28611039/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] vnet crashes, and problems building debug version (was Re: netlink & router (vppsb or patch->vpp) - help building/running)

2018-12-06 Thread Brian Dickson
Hi, Neale,

Thanks for the info, that solved the problem!

This might be something to put into the main section rather than
"advanced", and possibly even in the README.md that goes along with the
vppsb/router.

It would probably actually be more helpful if the parameter were an IPv4
prefix-count rather than a memory amount, as users will know the former but
not the latter.

The syntax might be something like "ip { max-prefix 1M }", and have the
ip4_mtrie do the math.

It would probably also be beneficial to have the "heapsize N" calculated
from the other values, if that is possible.

Thanks again,
Brian

On Wed, Dec 5, 2018 at 11:47 AM Neale Ranns (nranns) 
wrote:

>
>
> Hi Brian,
>
>
>
> If you’re adding lots of routes, you’ll also need to bump the heap size
> for the IP FIBs as well as the main heap:
>
>
> https://fdio-vpp.readthedocs.io/en/latest/gettingstarted/users/configuring/startup.html#ip
>
>
>
> to run in gdb:
>
>   sudo service vpp stop (or your OS equivalent)
>
>   make build
>
>   sudo gdb –args ./build-root/install-vpp_debug-native/vpp/bin/vpp –c
>  plugin_path 
>
>
>
> hope that helps,
>
>
>
> /neale
>
>
>
>
>
>
>
>
>
> *De : * au nom de Brian Dickson <
> brian.peter.dick...@gmail.com>
> *Date : *mercredi 5 décembre 2018 à 19:31
> *À : *"vpp-dev@lists.fd.io" 
> *Objet : *[vpp-dev] vnet crashes, and problems building debug version
> (was Re: netlink & router (vppsb or patch->vpp) - help building/running)
>
>
>
> Greetings again,
>
>
>
> Here is more context on the problem I'm seeing.
>
> The problem occurs if a large-ish number of IPv4 prefixes are added to the
> FIB (by way of the netlink and router plugin).
>
>
>
> If the prefix count is below some threshold (e.g. 50,000 prefixes), things
> work fine.
>
> At some prefix count (haven't narrowed it down to a specific number, but I
> don't think the actual number is relevant), vnet crashes, in a failure
> within ip4_mtrie.c.
>
>
>
> I have been trying to run in debug mode, but am having a lot of difficulty
> building everything with debug.
>
> Basically, the only way I can successfully build everything is to use the
> script vagrant/build.sh (which does a make pkg-rpm that generates a bunch
> of rpm files that I then install with yum).
>
> Then, I have to rebuild things using the instructions from
> vppsb/router/README.md (doing 4 symlinks and various make iterations, and
> THEN having to run some of those with a bunch of CFLAGS values just to get
> it to compile).
>
>
>
> I don't see any good/easy way to build debug images from this environment,
> without a LOT of work/investigation on how all the various build components
> work.
>
>
>
> Is the problem easy enough to diagnose from a non-symbolic stack dump, or
> can someone provide details on how to build and run vpp with everything to
> use gdb, including the plugins for netlink/router, so the problem can be
> further isolated?
>
>
>
> I think there's basically some kind of bug related to the fib stuff in
> vnet, that really needs to be fixed.
>
>
>
> The box has an unreasonably large amount of memory (128GB, doing nothing
> but VPP), and I get the same error even if I up the initial heap size by a
> factor of 2^12 (changing 32<<20 to 32ULL<<32).
>
>
>
> Please help.
>
>
>
> Brian
>
>
>
> (In the following, the buffer space message is likely a consequence of the
> thread handling netlink messages dying, rather than a cause.)
>
> Here's the log messages:
>
> Dec  4 17:08:14 sj2tldnslab09 vnet[19785]: dpdk_pool_create:535:
> ioctl(VFIO_IOMMU_MAP_DMA) pool 'dpdk_mbuf_pool_socket0': Inappropriate
> ioctl for device (errno 25)
>
> Dec  4 17:08:14 sj2tldnslab09 vnet[19785]: dpdk_ipsec_process:1026: not
> enough DPDK crypto resources, default to OpenSSL
>
> Dec  4 17:08:16 sj2tldnslab09 vnet[19785]: rtnl_ns_recv:403: Received
> notification while in sync. Restart synchronization.
>
> Dec  4 17:08:16 sj2tldnslab09 vnet[19785]: rtnl_process_read:467:
> rtnetlink recv error (31) []: Bad file descriptor
>
> Dec  4 17:08:58 sj2tldnslab09 vnet[19785]: rtnl_process_read:467:
> rtnetlink recv error (27) []: No buffer space available
>
> Dec  4 17:09:07 sj2tldnslab09 vnet[19785]: rtnl_process_read:467:
> rtnetlink recv error (27) []: No buffer space available
>
> Dec  4 17:09:07 sj2tldnslab09 vnet[19785]: received signal SIGABRT, PC
> 0x7f043c3c7277
>
> Dec  4 17:09:07 sj2tldnslab09 vnet[19785]: #0  0x7f043e5c18c5
> 0x7f043e5c18c5
>
> Dec  4 17:09:07 sj2tldnslab09 vnet[19785]: #1  0x7f043c9716d0
> 0x7f043c9716d0
>
> Dec  4 17:09:07 sj2tldnslab09 vnet[19785]: #2  0x7f043c3c7277 gsignal
> + 0x37
>
> Dec  4 17:09:07 sj2tldnslab09 vnet[19785]: #3  0x7f043c3c8968 abort +
> 0x148
>
> Dec  4 17:09:07 sj2tldnslab09 vnet[19785]: #4  0x5569eb7900d3
> 0x5569eb7900d3
>
> Dec  4 17:09:07 sj2tldnslab09 vnet[19785]: #5  0x7f043d0e8512
> vec_resize_allocate_memory + 0x2f2
>
> Dec  4 17:09:07 sj2tldnslab09 vnet[19785]: #6  0x7f043dd9809f
> 0x7f043dd9809f
>
> Dec  4 17:09:07 sj2tldnslab09