Re: [vpp-dev] Question about duplicate nodes in the graph

2019-01-03 Thread Damjan Marion via Lists.Fd.Io


> On 28 Dec 2018, at 16:21, Jon Loeliger  wrote:
> 
> Folks,
> 
> Is there a valid use for duplicate nodes in the node graph?
> Specifically, if I type this command three times:
> 
> vpp# set interface ip vxlan-bypass TenGigabitEthernet6/0/0
> vpp# set interface ip vxlan-bypass TenGigabitEthernet6/0/0
> vpp# set interface ip vxlan-bypass TenGigabitEthernet6/0/0
> 
> I end up with duplicate ip4-vxlan-nodes:
> 
> vpp# show interface features TenGigabitEthernet6/0/0
> [ ...]
> ip4-unicast:
>   ip4-not-enabled
>   ip4-vxlan-bypass
>   ip4-vxlan-bypass
>   ip4-vxlan-bypass
> 
> In this case, I don't think it makes sense, and I think we should detect
> the presence of the node and disallow multiple additions.

agree

> 
> If that is true for this case, but NOT true for other cases, we might 
> entertain
> a flag (per interface per family) in the function vnet_int_vxlan_bypass_mode()
> to record its addition and prevent subsequent re-additions.
> 
> On the other hand, if duplicate nodes is a Bad Thing for the whole graph,
> perhaps the function vnet_feature_enable_disable() itself should be able
> to detect and prevent duplicates?
> 
> Thoughts?

Typically feature specific code needs to do some work before calling 
vnet_feature_enable_disable(...) so it might be too late...


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

View/Reply Online (#11830): https://lists.fd.io/g/vpp-dev/message/11830
Mute This Topic: https://lists.fd.io/mt/28873312/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] Question about duplicate nodes in the graph

2019-01-03 Thread Jon Loeliger
[ Just reposting as it was likely missed in the Holiday Extravaganza. --jdl
]

On Fri, Dec 28, 2018 at 9:21 AM Jon Loeliger  wrote:

> Folks,
>
> Is there a valid use for duplicate nodes in the node graph?
> Specifically, if I type this command three times:
>
> vpp# set interface ip vxlan-bypass TenGigabitEthernet6/0/0
> vpp# set interface ip vxlan-bypass TenGigabitEthernet6/0/0
> vpp# set interface ip vxlan-bypass TenGigabitEthernet6/0/0
>
> I end up with duplicate ip4-vxlan-nodes:
>
> vpp# show interface features TenGigabitEthernet6/0/0
> [ ...]
> ip4-unicast:
>   ip4-not-enabled
>   ip4-vxlan-bypass
>   ip4-vxlan-bypass
>   ip4-vxlan-bypass
>
> In this case, I don't think it makes sense, and I think we should detect
> the presence of the node and disallow multiple additions.
>
> If that is true for this case, but NOT true for other cases, we might
> entertain
> a flag (per interface per family) in the
> function vnet_int_vxlan_bypass_mode()
> to record its addition and prevent subsequent re-additions.
>
> On the other hand, if duplicate nodes is a Bad Thing for the whole graph,
> perhaps the function vnet_feature_enable_disable() itself should be able
> to detect and prevent duplicates?
>
> Thoughts?
> jdl
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

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


[vpp-dev] Python Tests

2019-01-03 Thread Paul Vinciguerra
I am working on a change to cleanup some anti-patterns in the test framework 
code, but the scope is significantly larger.  
https://gerrit.fd.io/r/#/c/16642/

Specifically, I'm referring to the use of:
  except:
and
  raise Exception(...)

This is not in any way a dig against any of the contributors. The pattern is 
recommended in the docs for people to follow.

Does anyone have any suggestions as to how to best involve the original 
contributors without stalling progress?
Is adding reviewers from git blame sufficient, or do the original contributors 
prefer to know earlier in the process?   

Here are some links if anyone is interested:
https://julien.danjou.info/python-exceptions-guide/
https://hynek.me/articles/hasattr/
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

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


[vpp-dev] graph node placement on workers

2019-01-03 Thread Vratko Polak -X (vrpolak - PANTHEON TECHNOLOGIES at Cisco) via Lists.Fd.Io

Hi developers.

When examining some performance test results,
I started seeing patterns,
so I now have multiple questions.

I have noticed that (with hyper-threading on)
l2-input-vtr graph node is present only on half of VPP workers.
(At least for the dot1q test below.)
In CSIT, the node is always seen on low numbered logical cores
(lcore 2, as opposed to lcore 58).

Is that expected?

Also, some graph nodes ({if}-output and {if}-tx)
tend to be only on some workers (which makes sense)
determined apparently by random chance (which makes less sense).

I believe this (apparent) randomness affects results of trending.
I have two examples, both are scatter-plots on this [0] chart.

The first example is the dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm test.
This test uses asymmetric load (encap one way, decap the other).
There is 100% match between performance (whether the dot
lands in the 6Mpps band, or 5Mpps band)
and which TenGigabitEthernet tx node ends up on vpp_wk_0 (lcore 2).
Due to asymmetric load, I believe one subgraph has more work to do,
and it is random whether the more busy subgraph ends up
on a worker also burdened with l2-input-vtr.

The second example is the eth-l2xcbase-eth-4vhostvr1024-2vm test.
Here the load is symmetric, but I see randomness in placement
of the four VirtualEthernet tx nodes.
I have not examined many runs, but I suspect the performance
depends on which pair of the four end up on the same node.

Finally, few less coherent questions.
Is "worker handoff" involved?
Should l2-input-vtr node stick to the subgraph which needs it?
Can we (CSIT) give VPP a hint on which VirtualEthernet tx node
should be handled by which worker?

Vratko.

[0] 
https://docs.fd.io/csit/master/trending/trending/vm_vhost_l2-2n-skx-x710-64b-base.html#t1c


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

View/Reply Online (#11827): https://lists.fd.io/g/vpp-dev/message/11827
Mute This Topic: https://lists.fd.io/mt/28925781/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 coding techniques

2019-01-03 Thread Raj
On Thu, Jan 3, 2019 at 4:44 PM Damjan Marion  wrote:

> From VPP perspective sample plugin might be good start, if you have
> any particular questions, drop email here and we will try to explain...

Thanks a lot. Will get back if there are questions.

Thanks and Regards,

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

View/Reply Online (#11826): https://lists.fd.io/g/vpp-dev/message/11826
Mute This Topic: https://lists.fd.io/mt/28903866/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/DPDK performance with Madvise (Transparent Huge pages)

2019-01-03 Thread Damjan Marion via Lists.Fd.Io


> On 2 Jan 2019, at 16:28, chetan bhasin  wrote:
> 
> Hi,
> 
> We are using VPP 18.01. We have seen that in case Transparent Hugepage is 
> enable with Madvise . VPP does not take benefit of Annonymous Huge Pages. 
> Does anybody have any idea about the same ?

Can you provide more details, What exactly you did and what exactly you 
observed

-- 
Damjan

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

View/Reply Online (#11825): https://lists.fd.io/g/vpp-dev/message/11825
Mute This Topic: https://lists.fd.io/mt/28914567/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] found some issue in pci vfio

2019-01-03 Thread Damjan Marion via Lists.Fd.Io

Dear Ping,

I already agreed that code needs to be fixed, but the point is that looking for 
container fd is not right way to detect if vfio-pci can be used or not...

-- 
Damjan

> On 2 Jan 2019, at 02:49, Yu, Ping  wrote:
> 
> Hi, Damjan,
>  
> The issue existing in the code is container fd is initialized as “-1”, and 
> there is no code to update it before trying to read  iommu_group in pci.c, 
> and container_fd is the condition required. See below code. 
>  
>  
>   if (lvm->container_fd != -1)
> {
>   u8 *tmpstr;
>   vec_reset_length (f);
>   f = format (f, "%v/iommu_group%c", dev_dir_name, 0);
>   tmpstr = clib_sysfs_link_to_name ((char *) f);
>   if (tmpstr)
> {
>   di->iommu_group = atoi ((char *) tmpstr);
>   vec_free (tmpstr);
> }
>   <>
>  <>From: Damjan Marion [mailto:dmar...@me.com] 
> Sent: Sunday, December 30, 2018 7:10 PM
> To: Yu, Ping 
> Cc: vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] found some issue in pci vfio
>  
>  
> Fact that you can open vfio container doesn't actually mean that you can use 
> vfio-pci module on specific PCI device.
>  
> vfio-pci module can be used in 2 cases:
>  - when /sys/bus/pci/devices//iommu_group exists
>  - when /sys/module/vfio/parameters/enable_unsafe_noiommu_mode is set to Y 
> (introduced in kernel 4.4)
>  
> That code needs to be fixed, but I don't think your fix is the right one
>  
> 
> 
> On 29 Dec 2018, at 04:46, Yu, Ping  > wrote:
>  
> I submitted a patch to fix it. 
>  
> https://gerrit.fd.io/r/16640 
>  
> Ping
>  
> From: Yu, Ping 
> Sent: Saturday, December 29, 2018 10:43 AM
> To: vpp-dev@lists.fd.io 
> Cc: Yu, Ping mailto:ping...@intel.com>>
> Subject: found some issue in pci vfio
>  
> Hello, all
>  
> Recently I met some issue in vfio, and below is some root cause:
>  
> Before running vpp, I will use “dpdk-devbind.py” to bind the NIC to vfio-pci, 
> and then use “uio-driver auto” configure, and it once worked well, but it has 
> problem recently, so I took a look at this to resolve the problem.
> I found that vpp has some problem to “auto” detect the uio-driver to be vfio, 
> and the bug info is below:
> 1)  vlib_pci_bind_to_uio is dependent vlib_pci_get_device_info to tell 
> iommu_group
> 2)  vlib_pci_get_device_info will check whether lvm->container_fd == -1
>  
> In my case, lvm->container_fd is initialized to be “-1”, and there is no 
> chance to modify it, so in the eye of vlib_pci_bind_to_uio, iommu_group is 
> -1, then it will try to enable noiommu mode. If some kernel enabled NOIOMMU, 
> then vfio can continue work with noiommu mode, but if not, then this device 
> will be rejected due to “no VFIO” support.  (pci.c # 411. )
>  
> The solution is to drop “auto” mode, and explicitly configure “vfio-pci” in 
> the configuration, but I hope the default “auto” mode can be smarter.
>  
> Ping
>  
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#11792): https://lists.fd.io/g/vpp-dev/message/11792 
> 
> Mute This Topic: https://lists.fd.io/mt/28877871/675642 
> 
> Group Owner: vpp-dev+ow...@lists.fd.io 
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub 
>   [dmar...@me.com 
> ]
> -=-=-=-=-=-=-=-=-=-=-=-
>  
> -- 
> Damjan

-- 
Damjan

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

View/Reply Online (#11824): https://lists.fd.io/g/vpp-dev/message/11824
Mute This Topic: https://lists.fd.io/mt/28877871/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 coding techniques

2019-01-03 Thread Damjan Marion via Lists.Fd.Io


> On 1 Jan 2019, at 10:38, Raj  wrote:
> 
> Hello list and a very happy new year to all.
> 
> I am starting to learn VPP, initially by configuring for common
> scenarios and then trying to understand the code and may be eventually
> into hacking VPP code.
> 
> I know that VPP uses quite a bit of optimisation to extract maximum
> performance, for example dual looping etc. Is there any
> book/references etc which can be used by a relatively good C coder to
> understand these techniques? I know that reading the code is the
> obvious way, but if there is some prior knowledge of these techniques,
> it will help in understanding what's happening faster.


There is no much available. Intel Optimisation guide can help you much
if you know what are you looking for. It is huge document and many of 
perf suggestions are targeted to compiler developers and assembly coders.

From VPP perspective sample plugin might be good start, if you have 
any particular questions, drop email here and we will try to explain... 

-- 
Damjan

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

View/Reply Online (#11823): https://lists.fd.io/g/vpp-dev/message/11823
Mute This Topic: https://lists.fd.io/mt/28903866/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] Simple Rate Limit and QoS #vpp

2019-01-03 Thread Raj
Found some mail list links with reference to configuring policing in VPP

https://jira.fd.io/browse/HC2VPP-39
https://www.mail-archive.com/vpp-dev@lists.fd.io/msg06792.html
https://lists.fd.io/g/vpp-dev/message/3579

Based on the above links, I have used the following commands to
configure policing.

configure policer name policy1 cir 5 eir 5 cb 5 eb 5 rate kbps round
up type 2r3c-4115 conform-action transmit exceed-action drop
violate-action drop
classify table mask l2 ignore-tag1 l3 ip4 src
classify session policer-hit-next policy1 exceed-color table-index 0
match l2 ignore-tag1 l3 ip4 src 100.69.1.4
set policer classify interface TenGigabitEthernet82/0/0 ip4-table 0

TenGigabitEthernet82/0/0 is the LAN interface of the VPP where
100.69.1.4 is connected. While I do not fully understand the command I
had given I assume it to police the traffic rate at 5kbps. But that is
not working. I am able to download at the full interface speed of
100.69.1.4

Any pointers to get this working?

Thanks and Regards,

Raj

On Tue, Jan 1, 2019 at 2:56 PM Raj via Lists.Fd.Io
 wrote:
>
> Same here, some example for QoS/Rate limiting would be nice to get started.
>
> Thanks and Regards,
>
> Raj
>
> On Sat, Dec 29, 2018 at 9:39 AM carlito nueno  wrote:
> >
> >
> > I am looking for rate limiting (bandwidth/traffic shaping) as well.
> >
> >
> > Vakili, Did you figure it out?
> >
> > Thanks.
> > On Sat, Sep 8, 2018 at 12:16 AM  wrote:
> >>
> >> Simple Rate Limit and QoS
> >> Hi dears. Three questions please:
> >> 1: How can I configure an interface to let pass limited rate (Bandwidth 
> >> management) in VPP
> >> 2: Can I give rage of IPs to assign limit rates?
> >> 3: Is there any way to not restart vpp or reload interface configuration 
> >> for any configuration? I need to save and run without restart.
> >>
> >> Thanks alot
> >> Vakili -=-=-=-=-=-=-=-=-=-=-=-
> >> Links: You receive all messages sent to this group.
> >>
> >> View/Reply Online (#10441): https://lists.fd.io/g/vpp-dev/message/10441
> >> Mute This Topic: https://lists.fd.io/mt/25362068/675621
> >> Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480478
> >> Group Owner: vpp-dev+ow...@lists.fd.io
> >> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [carlitonu...@gmail.com]
> >> -=-=-=-=-=-=-=-=-=-=-=-
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> >
> > View/Reply Online (#11793): https://lists.fd.io/g/vpp-dev/message/11793
> > Mute This Topic: https://lists.fd.io/mt/25362068/157026
> > Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=3532616
> > Group Owner: vpp-dev+ow...@lists.fd.io
> > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [rajlistu...@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
>
> View/Reply Online (#11809): https://lists.fd.io/g/vpp-dev/message/11809
> Mute This Topic: https://lists.fd.io/mt/25362068/157026
> Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=3532616
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [rajlistu...@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11822): https://lists.fd.io/g/vpp-dev/message/11822
Mute This Topic: https://lists.fd.io/mt/25362068/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-