Re: [vpp-dev] Traffic shaping functionality in VPP?

2023-03-23 Thread amindomao
Hello!

I'm not expert, just network engineer. I'm interested and ready to take part in 
testing.

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



Re: [vpp-dev] [QUESTION] How to add virtual interfaces on ARM board

2023-03-23 Thread Lijian Zhang
You can run multiple VPP instances [1] and connect them using memif interface, 
which is shared memory-based software interface.
VPP also has packet generator, to emulate the PC1, PC2 in your topology.

In this way, you can achieve the topology based on pure software implementation.

[1]
https://s3-docs.fd.io/vpp/23.06/gettingstarted/progressivevpp/twovppinstances.html

Thanks.
From: vpp-dev@lists.fd.io  On Behalf Of Xiaodong Xu via 
lists.fd.io
Sent: Thursday, March 23, 2023 12:51 PM
To: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] [QUESTION] How to add virtual interfaces on ARM board

Maybe you can try host interface in this case, since you are going to share the 
control traffic and the user traffic on the only NIC. Check 
https://s3-docs.fd.io/vpp/23.06/gettingstarted/progressivevpp/interface.html#create-vpp-host-interface
 for more details.

Regards,
Xiaodong

On Wed, Mar 22, 2023 at 6:50 PM mailto:dorian_...@126.com>> 
wrote:
Hi,

I'm a newbie and study vpp recently. I succeed cross compiling vpp (including 
my own plugin) , and it can be started up on my arm64 board (aarch64 ubuntu 
18.04).  But there is only one physical NIC (eth1)  which I can use on the 
board, and I don't need dpdk, so there is only local0 when I run "show int" cmd.

My question is how to add two more ip addresses (maybe virtual interface?)  as 
below network tepology.

[cid:image001.png@01D95E2F.CC74F0B0]

My own plugin implements ip-in-ip, something like gre or gtp tunnel, to remove 
ip header from port1 to port2 and add ip header from port2 to port1.

Note that this vpp program and the whole function can run successfully on PC 
vmware ubuntu virtual machine with dpdk, since I can create more ensXXX in the 
virtual machine, and I use igb_uio dpdk driver to operate the interface. But I 
really don't know how to implement the same function on the board in case there 
is only one NIC. Both with or without dpdk is ok for me, as it seems that 
igb_uio.ko is not supported on the board NIC, only rte_kni.ko is supported, and 
I'm not sure if kni is still suppored in vpp dpdk plugin.

Any helps will be appreciated. Thanks!
Dorian


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



Re: [vpp-dev] Traffic shaping functionality in VPP?

2023-03-23 Thread Jasvinder Singh
Hi Elias,

You can find such solution in VPP 18.04 where VPP dpdk plugin is modified to 
enable HQoS scheduler and shaping function which runs on a separate VPP thread 
on TX path. The feature was deprecated in later releases. Hope that helps.

Thanks,
Jasvinder.



> -Original Message-
> From: vpp-dev@lists.fd.io  On Behalf Of Elias Rudberg
> Sent: Thursday, March 23, 2023 1:40 PM
> To: vpp-dev@lists.fd.io
> Subject: [vpp-dev] Traffic shaping functionality in VPP?
> 
> Hello VPP experts,
> 
> We have been using VPP for NAT44 for a while, which has worked great.
> We contributed some fixes a couple of years ago and have been using VPP
> without issues since then.
> 
> Now we are considering the possibility of using VPP for a different usecase as
> well, related to "broadband network gateway" (BNG) functionality.
> This would involve traffic shaping, something like buffering packets for each
> user/subscriber when the rate of traffic reaches a certain limit, allowing
> different limits for different users.
> There would need to be a separate buffer for each user and some counters
> to keep track of the current rate of traffic for each user.
> 
> Questions related to this:
> 
> - is there some already existing traffic shaping functionality in VPP that 
> could
> be used for this?
> 
> - otherwise, if we were to implement such functionality, would you say it is
> feasible to do as a VPP plugin and do you have advice on how to do it?
> 
> - are others on this list also interested in this, or even someone already
> working on something like this?
> 
> I would also be interested in any other comments or thoughts you may have
> about this.
> 
> Best regards,
> Elias


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



Re: [vpp-dev] Sigabrt in tcp46_input_inline for tcp_lookup_is_valid

2023-03-23 Thread Florin Coras
Hi Zhang, 

Thanks for confirming! Give me a few more days to check if there’s any other 
improvements to be made in that area. 

Regards,
Florin 

> On Mar 23, 2023, at 12:00 AM, Zhang Dongya  wrote:
> 
> Hi,
> 
> The new patch works as expected, no assert triggered abort anymore.
> 
> Really appreciate your help and thanks a lot.
> 
> Florin Coras mailto:fcoras.li...@gmail.com>> 
> 于2023年3月22日周三 11:54写道:
>> Hi Zhang, 
>> 
>> Awesome! Thanks!
>> 
>> Regards,
>> Florin
>> 
>>> On Mar 21, 2023, at 7:41 PM, Zhang Dongya >> > wrote:
>>> 
>>> Hi Florin,
>>> 
>>> Thanks a lot, the previous patch and with reset disabled have been running 
>>> 1 day without issue.
>>> 
>>> I will enable reset and with your new patch, will provide feedback later.
>>> 
>>> Florin Coras mailto:fcoras.li...@gmail.com>> 
>>> 于2023年3月22日周三 02:12写道:
 Hi, 
 
 Okay, resetting of half-opens definitely not supported. I updated the 
 patch to just clean them up on forced reset, without sending a reset to 
 make sure session lookup table cleanup still happens. 
 
 Regards,
 Florin
 
> On Mar 20, 2023, at 9:13 PM, Zhang Dongya  > wrote:
> 
> Hi,
> 
> After review my code, I found that I have add a flag to the 
> vnet_disconnect API which will call session_reset instead of 
> session_close, the reason I do this is to make intermediate firewall just 
> flush the state and reconstruct if I later reconnect.
> 
> It seems in session_reset logic, for half open session, it also missing 
> to remove the session from the lookup hash which may cause the issue too.
> 
> I change my code and will test with your patch along, will provide 
> feedback later.
> 
> I also noticed the bihash issue discussed in the list recently, I will 
> merge later.
> 
> Florin Coras mailto:fcoras.li...@gmail.com>> 
> 于2023年3月21日周二 11:56写道:
>> Hi, 
>> 
>> That last thing is pretty interesting. It’s either the issue fixed by 
>> this patch [1] or sessions are somehow cleaned up multiple times. If 
>> it’s the latter, I’d really like to understand how that happens. 
>> 
>> Regards,
>> Florin
>> 
>> [1] https://gerrit.fd.io/r/c/vpp/+/38507 
>> 
>>> On Mar 20, 2023, at 6:52 PM, Zhang Dongya >> > wrote:
>>> 
>>> Hi,
>>> 
>>> After merge this patch and update the test environment, the issue still 
>>> persists.
>>> 
>>> Let me clear my client app config:
>>> 1. register a reset callback, which will call vnet_disconnect there and 
>>> also trigger reconnect by send event to the ctrl process.)
>>> 2. register a connected callback, which will handle connect err by 
>>> trigger reconnect, on success, it will record session handle and 
>>> extract tcp sequence for our app usage.
>>> 3. register a disconnect callback, which basically do same as reset 
>>> callback.
>>> 4. register a cleanup callback and accept callback, which basically 
>>> make the session layer happy without actually relevant work to do.
>>> 
>>> There is a ctrl process in mater, which will handle periodically 
>>> reconnect or triggered by event.
>>> 
>>> BTW, I also see frequently warning 'session %u hash delete rv -3' in 
>>> session_delete in my environment, hope this helps to investigate.
>>> 
>>> Florin Coras mailto:fcoras.li...@gmail.com>> 
>>> 于2023年3月20日周一 23:29写道:
 Hi, 
 
 Understood and yes, connect will synchronously fail if port is not 
 available, so you should be able to retry it later. 
 
 Regards, 
 Florin
 
> On Mar 20, 2023, at 1:58 AM, Zhang Dongya  > wrote:
> 
> Hi,
> 
> It seems the issue occurs when there are disconnect called because 
> our network can't guarantee a tcp can't be reset even when 3 ways 
> handshake is completed (firewall issue :( ).
> 
> When we find the app layer timeout, we will first disconnect (because 
> we record the session handle, this session might be a half open 
> session), does vnet session layer guarantee that if we reconnect from 
> master thread when the half open session still not be released yet 
> (due to asynchronous logic) that the reconnect fail? if then we can 
> retry connect later.
> 
> I prefer to not registered half open callback because I think it make 
> app complicated from a TCP programming prospective.
> 
> For your patch, I think it should be work because I can't delete the 
> half open session immediately because there is worker configured, so 
> the half open will be removed from bihash when syn retrans timeout

[vpp-dev] Intel iAVF interrupt support

2023-03-23 Thread Matt Kloppmann
General question, is there any particular reason the probe for interrupt
support is not performed for Intel iAVF driver?  The spec indicated support
for interrupts, so I enabled the probe and was able to set the rx-mode
interrupt for this device.  I was wondering if this was intentional?

Thanks in advance
Matt Kloppmann

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



[vpp-dev] Traffic shaping functionality in VPP?

2023-03-23 Thread Elias Rudberg
Hello VPP experts,

We have been using VPP for NAT44 for a while, which has worked great.
We contributed some fixes a couple of years ago and have been using VPP
without issues since then.

Now we are considering the possibility of using VPP for a different
usecase as well, related to "broadband network gateway" (BNG)
functionality.
This would involve traffic shaping, something like buffering packets
for each user/subscriber when the rate of traffic reaches a certain
limit, allowing different limits for different users.
There would need to be a separate buffer for each user and some
counters to keep track of the current rate of traffic for each user.

Questions related to this:

- is there some already existing traffic shaping functionality in VPP
that could be used for this?

- otherwise, if we were to implement such functionality, would you say
it is feasible to do as a VPP plugin and do you have advice on how to
do it?

- are others on this list also interested in this, or even someone
already working on something like this?

I would also be interested in any other comments or thoughts you may
have about this.

Best regards,
Elias


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



Re: [vpp-dev] Sigabrt in tcp46_input_inline for tcp_lookup_is_valid

2023-03-23 Thread Zhang Dongya
Hi,

The new patch works as expected, no assert triggered abort anymore.

Really appreciate your help and thanks a lot.

Florin Coras  于2023年3月22日周三 11:54写道:

> Hi Zhang,
>
> Awesome! Thanks!
>
> Regards,
> Florin
>
> On Mar 21, 2023, at 7:41 PM, Zhang Dongya 
> wrote:
>
> Hi Florin,
>
> Thanks a lot, the previous patch and with reset disabled have been running
> 1 day without issue.
>
> I will enable reset and with your new patch, will provide feedback later.
>
> Florin Coras  于2023年3月22日周三 02:12写道:
>
>> Hi,
>>
>> Okay, resetting of half-opens definitely not supported. I updated the
>> patch to just clean them up on forced reset, without sending a reset to
>> make sure session lookup table cleanup still happens.
>>
>> Regards,
>> Florin
>>
>> On Mar 20, 2023, at 9:13 PM, Zhang Dongya 
>> wrote:
>>
>> Hi,
>>
>> After review my code, I found that I have add a flag to the
>> vnet_disconnect API which will call session_reset instead of session_close,
>> the reason I do this is to make intermediate firewall just flush the state
>> and reconstruct if I later reconnect.
>>
>> It seems in session_reset logic, for half open session, it also missing
>> to remove the session from the lookup hash which may cause the issue too.
>>
>> I change my code and will test with your patch along, will provide
>> feedback later.
>>
>> I also noticed the bihash issue discussed in the list recently, I will
>> merge later.
>>
>> Florin Coras  于2023年3月21日周二 11:56写道:
>>
>>> Hi,
>>>
>>> That last thing is pretty interesting. It’s either the issue fixed by
>>> this patch [1] or sessions are somehow cleaned up multiple times. If it’s
>>> the latter, I’d really like to understand how that happens.
>>>
>>> Regards,
>>> Florin
>>>
>>> [1] https://gerrit.fd.io/r/c/vpp/+/38507
>>>
>>> On Mar 20, 2023, at 6:52 PM, Zhang Dongya 
>>> wrote:
>>>
>>> Hi,
>>>
>>> After merge this patch and update the test environment, the issue still
>>> persists.
>>>
>>> Let me clear my client app config:
>>> 1. register a reset callback, which will call vnet_disconnect there and
>>> also trigger reconnect by send event to the ctrl process.)
>>> 2. register a connected callback, which will handle connect err by
>>> trigger reconnect, on success, it will record session handle and extract
>>> tcp sequence for our app usage.
>>> 3. register a disconnect callback, which basically do same as reset
>>> callback.
>>> 4. register a cleanup callback and accept callback, which basically make
>>> the session layer happy without actually relevant work to do.
>>>
>>> There is a ctrl process in mater, which will handle periodically
>>> reconnect or triggered by event.
>>>
>>> BTW, I also see frequently warning 'session %u hash delete rv -3' in
>>> session_delete in my environment, hope this helps to investigate.
>>>
>>> Florin Coras  于2023年3月20日周一 23:29写道:
>>>
 Hi,

 Understood and yes, connect will synchronously fail if port is not
 available, so you should be able to retry it later.

 Regards,
 Florin

 On Mar 20, 2023, at 1:58 AM, Zhang Dongya 
 wrote:

 Hi,

 It seems the issue occurs when there are disconnect called because our
 network can't guarantee a tcp can't be reset even when 3 ways handshake is
 completed (firewall issue :( ).

 When we find the app layer timeout, we will first disconnect (because
 we record the session handle, this session might be a half open session),
 does vnet session layer guarantee that if we reconnect from master thread
 when the half open session still not be released yet (due to asynchronous
 logic) that the reconnect fail? if then we can retry connect later.

 I prefer to not registered half open callback because I think it make
 app complicated from a TCP programming prospective.

 For your patch, I think it should be work because I can't delete the
 half open session immediately because there is worker configured, so the
 half open will be removed from bihash when syn retrans timeout. I have
 merged the patch and will provide feedback later.

 Florin Coras  于2023年3月20日周一 13:09写道:

> Hi,
>
> Inline.
>
> On Mar 19, 2023, at 6:47 PM, Zhang Dongya 
> wrote:
>
> Hi,
>
> It can be aborted both in established state or half open state because
> I will do timeout in our app layer.
>
>
> [fc] Okay! Is the issue present irrespective of the state of the
> session or does it happen only after a disconnect in hanf-open state? More
> lower.
>
>
> Regarding your question,
>
> - Yes we add a builtin in app relys on C apis that  mainly use
> vnet_connect/disconnect to connect or disconnect session.
>
>
> [fc] Understood
>
> - We call these api in a vpp ctrl process which should be running on
> the master thread, we never do session setup/teardown on worker thread.
> (the environment that found this issue is c