Re: [vpp-dev] Build errors

2019-08-15 Thread carlito nueno
Hi all,

I think I found the problem.

fatal: ambiguous argument 'v1.19-rc0..': unknown revision or path not
in the working tree.

Here are steps I did:
- I forked `stable/1908` branch and added some code to it.
- Now my branch is `test-stable/1908`
- I tagged my branch with `v1.19.08`.
- I pushed the VPP master and my branch to github.
- On my build server, I cloned my repo `github.com/carnu/vpp.git`
- I checked out `v1.19.08`

I am not well versed with git. Please let me know how I can compile
after adding custom code.

Really appreciate it!

On Thu, Aug 15, 2019 at 5:44 PM carlito nueno via Lists.Fd.Io
 wrote:
>
> I am getting the same error with: build-root/vagrant/build.sh
>
> On Thu, Aug 15, 2019 at 5:21 PM carlito nueno via Lists.Fd.Io
>  wrote:
> >
> > Hi all,
> >
> > I am following this guide to build VPP:
> > https://wiki.fd.io/view/VPP/Pulling,_Building,_Running,_Hacking_and_Pushing_VPP_Code
> >
> > I added a patch to stable/1908 branch
> > using ubuntu 18.04LTS
> > running as ROOT user
> >
> > I followed these steps:
> > apt-get update
> > apt-get install build-essential
> > make install-dep
> > make install-ext-deps
> > make build
> >
> > When I do make install-ext-deps, I get these errors:
> >
> > dpkg-buildpackage: warning: debian/changelog(l1): version '-0' is
> > invalid: upstream version cannot be empty
> > LINE: vpp-ext-deps (-0) unstable; urgency=low
> > dpkg-buildpackage: info: source package vpp-ext-deps
> > dpkg-buildpackage: info: source version unknown
> > dpkg-buildpackage: error: version number does not start with digit
> > Makefile:72: recipe for target 'vpp-ext-deps_-0_amd64.deb' failed
> > make[2]: *** [vpp-ext-deps_-0_amd64.deb] Error 255
> > make[2]: Leaving directory '/root/vpp/build/external'
> > Makefile:79: recipe for target 'install-deb' failed
> > make[1]: *** [install-deb] Error 2
> > make[1]: Leaving directory '/root/vpp/build/external'
> > Makefile:540: recipe for target 'install-ext-deps' failed
> > make: *** [install-ext-deps] Error 2
> >
> > when I do make build, I get these errors
> >
> > -- Configuration:
> > VPP version :
> > VPP library version : NOTFOUND
> > GIT toplevel dir: /root/vpp
> > Build type  :
> > C flags : -Wno-address-of-packed-member -march=corei7
> > -mtune=corei7-avx -O0 -DCLIB_DEBUG -g -DFORTIFY_SOURCE=2
> > -fstack-protector -fPIC -Wall -Werror -fno-common
> > Linker flags: -O0 -DCLIB_DEBUG -g -DFORTIFY_SOURCE=2
> > -fstack-protector -fPIC -Wall -Werror -fno-common
> > Host processor  : x86_64
> > Target processor: x86_64
> > Prefix path :
> > /opt/vpp/external/x86_64;/root/vpp/build-root/install-vpp_debug-native/external
> > Install prefix  : /root/vpp/build-root/install-vpp_debug-native/vpp
> > -- Configuring incomplete, errors occurred!
> > See also 
> > "/root/vpp/build-root/build-vpp_debug-native/vpp/CMakeFiles/CMakeOutput.log".
> > See also 
> > "/root/vpp/build-root/build-vpp_debug-native/vpp/CMakeFiles/CMakeError.log".
> > Makefile:644: recipe for target 'vpp-configure' failed
> > make[1]: *** [vpp-configure] Error 1
> > make[1]: Leaving directory '/root/vpp/build-root'
> > Makefile:367: recipe for target 'build' failed
> > make: *** [build] Error 2
> >
> > CMakeFiles/CMakeOutput.log: https://termbin.com/fhaz
> > CMakeFiles/CMakeError.log: https://termbin.com/pkh7d
> >
> > Thanks
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> >
> > View/Reply Online (#13757): https://lists.fd.io/g/vpp-dev/message/13757
> > Mute This Topic: https://lists.fd.io/mt/32893039/675621
> > 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 (#13758): https://lists.fd.io/g/vpp-dev/message/13758
> Mute This Topic: https://lists.fd.io/mt/32893039/675621
> 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 (#13760): https://lists.fd.io/g/vpp-dev/message/13760
Mute This Topic: https://lists.fd.io/mt/32893039/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 libmemif API

2019-08-15 Thread Yao, Chengqiang
Hi William,

   That's what memif_refill_queue() does. When you call this function, libmemif 
knows you are done with these buffers.


Best Regards,
Chengqiang Yao



-Original Message-
From: William Tu  
Sent: 2019年8月15日 23:26
To: Yao, Chengqiang 
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Question about libmemif API

On Thu, Aug 15, 2019 at 8:02 AM William Tu  wrote:
>
> Hi Chengqiang,
>
> Thanks for your reply.
>
> On Wed, Aug 14, 2019 at 11:52 PM Yao, Chengqiang 
>  wrote:
> >
> > Hi William,
> >
> > You do not need to copy the packets out of memif. Once you finish 
> > processing all these packets, call memif_refill_queue() function to free 
> > these buffers. Let's say if you receive 32 packets in memif_rx_burst 
> > function, after processing, call memif_refill_queue with count=32 to free.
> >
>
> But if I calling memif_refill_queue() with count=32, then where does 
> libmemif get the 32 free buffer to refill on rx?
> And if my code is not copying packet buffer from dev->rx_bufs, how 
> does libmemif know that I'm done with these
> 32 packet buffer and libmemif can re-cycle them back to rx?
>
Looking at the source code,

When calling memif_rx_burst(), users get rx buffer from  b0->data = 
memif_get_buffer (c, ring, cur_slot & mask);

at index cur_slot and memif_get_buffer() returns buffer at
conn->regions[ring->desc[index].region].addr + ring->desc[index].offset

So users are getting the internal packet buffer from conn->regions I'd assume I 
have to tell libmemif that I'm done with this buffer and libmemif can reuse it 
later.

Thank you
William

> Regards,
> William
>
> >
> > Best Regards,
> > Chengqiang Yao
> >
> >
> >
> > -Original Message-
> > From: vpp-dev@lists.fd.io  On Behalf Of William 
> > Tu
> > Sent: 2019年8月15日 2:07
> > To: vpp-dev@lists.fd.io
> > Subject: [vpp-dev] Question about libmemif API
> >
> > Hi,
> >
> > I'm working on using libmemif in OVS.
> > https://patchwork.ozlabs.org/patch/1140858/
> >
> > While using the API, one question I have is, when I call
> >   err = memif_rx_burst(dev->handle, qid, dev->rx_bufs, 
> > NETDEV_MAX_BURST, );
> >
> > There are 'recv' number of packets are at dev->rx_bufs, do I have to copy 
> > the packet buffer immediately to my master side? For example, I received 32 
> > packets from memif_rx_burst, and I might process these packets in different 
> > order. Once done, is there an API to free each specific packet buffer back 
> > to memif buffer pool?
> >
> > Now the memif_refill_queue() can only specify number of buffers to refill, 
> > not which buffer.
> >
> > Thanks
> > William
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> >
> > View/Reply Online (#13743): 
> > https://lists.fd.io/g/vpp-dev/message/13743
> > Mute This Topic: https://lists.fd.io/mt/32866729/675822
> > Group Owner: vpp-dev+ow...@lists.fd.io
> > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  
> > [u9012...@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13759): https://lists.fd.io/g/vpp-dev/message/13759
Mute This Topic: https://lists.fd.io/mt/32866729/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] Build errors

2019-08-15 Thread carlito nueno
I am getting the same error with: build-root/vagrant/build.sh

On Thu, Aug 15, 2019 at 5:21 PM carlito nueno via Lists.Fd.Io
 wrote:
>
> Hi all,
>
> I am following this guide to build VPP:
> https://wiki.fd.io/view/VPP/Pulling,_Building,_Running,_Hacking_and_Pushing_VPP_Code
>
> I added a patch to stable/1908 branch
> using ubuntu 18.04LTS
> running as ROOT user
>
> I followed these steps:
> apt-get update
> apt-get install build-essential
> make install-dep
> make install-ext-deps
> make build
>
> When I do make install-ext-deps, I get these errors:
>
> dpkg-buildpackage: warning: debian/changelog(l1): version '-0' is
> invalid: upstream version cannot be empty
> LINE: vpp-ext-deps (-0) unstable; urgency=low
> dpkg-buildpackage: info: source package vpp-ext-deps
> dpkg-buildpackage: info: source version unknown
> dpkg-buildpackage: error: version number does not start with digit
> Makefile:72: recipe for target 'vpp-ext-deps_-0_amd64.deb' failed
> make[2]: *** [vpp-ext-deps_-0_amd64.deb] Error 255
> make[2]: Leaving directory '/root/vpp/build/external'
> Makefile:79: recipe for target 'install-deb' failed
> make[1]: *** [install-deb] Error 2
> make[1]: Leaving directory '/root/vpp/build/external'
> Makefile:540: recipe for target 'install-ext-deps' failed
> make: *** [install-ext-deps] Error 2
>
> when I do make build, I get these errors
>
> -- Configuration:
> VPP version :
> VPP library version : NOTFOUND
> GIT toplevel dir: /root/vpp
> Build type  :
> C flags : -Wno-address-of-packed-member -march=corei7
> -mtune=corei7-avx -O0 -DCLIB_DEBUG -g -DFORTIFY_SOURCE=2
> -fstack-protector -fPIC -Wall -Werror -fno-common
> Linker flags: -O0 -DCLIB_DEBUG -g -DFORTIFY_SOURCE=2
> -fstack-protector -fPIC -Wall -Werror -fno-common
> Host processor  : x86_64
> Target processor: x86_64
> Prefix path :
> /opt/vpp/external/x86_64;/root/vpp/build-root/install-vpp_debug-native/external
> Install prefix  : /root/vpp/build-root/install-vpp_debug-native/vpp
> -- Configuring incomplete, errors occurred!
> See also 
> "/root/vpp/build-root/build-vpp_debug-native/vpp/CMakeFiles/CMakeOutput.log".
> See also 
> "/root/vpp/build-root/build-vpp_debug-native/vpp/CMakeFiles/CMakeError.log".
> Makefile:644: recipe for target 'vpp-configure' failed
> make[1]: *** [vpp-configure] Error 1
> make[1]: Leaving directory '/root/vpp/build-root'
> Makefile:367: recipe for target 'build' failed
> make: *** [build] Error 2
>
> CMakeFiles/CMakeOutput.log: https://termbin.com/fhaz
> CMakeFiles/CMakeError.log: https://termbin.com/pkh7d
>
> Thanks
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
>
> View/Reply Online (#13757): https://lists.fd.io/g/vpp-dev/message/13757
> Mute This Topic: https://lists.fd.io/mt/32893039/675621
> 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 (#13758): https://lists.fd.io/g/vpp-dev/message/13758
Mute This Topic: https://lists.fd.io/mt/32893039/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] Build errors

2019-08-15 Thread carlito nueno
Hi all,

I am following this guide to build VPP:
https://wiki.fd.io/view/VPP/Pulling,_Building,_Running,_Hacking_and_Pushing_VPP_Code

I added a patch to stable/1908 branch
using ubuntu 18.04LTS
running as ROOT user

I followed these steps:
apt-get update
apt-get install build-essential
make install-dep
make install-ext-deps
make build

When I do make install-ext-deps, I get these errors:

dpkg-buildpackage: warning: debian/changelog(l1): version '-0' is
invalid: upstream version cannot be empty
LINE: vpp-ext-deps (-0) unstable; urgency=low
dpkg-buildpackage: info: source package vpp-ext-deps
dpkg-buildpackage: info: source version unknown
dpkg-buildpackage: error: version number does not start with digit
Makefile:72: recipe for target 'vpp-ext-deps_-0_amd64.deb' failed
make[2]: *** [vpp-ext-deps_-0_amd64.deb] Error 255
make[2]: Leaving directory '/root/vpp/build/external'
Makefile:79: recipe for target 'install-deb' failed
make[1]: *** [install-deb] Error 2
make[1]: Leaving directory '/root/vpp/build/external'
Makefile:540: recipe for target 'install-ext-deps' failed
make: *** [install-ext-deps] Error 2

when I do make build, I get these errors

-- Configuration:
VPP version :
VPP library version : NOTFOUND
GIT toplevel dir: /root/vpp
Build type  :
C flags : -Wno-address-of-packed-member -march=corei7
-mtune=corei7-avx -O0 -DCLIB_DEBUG -g -DFORTIFY_SOURCE=2
-fstack-protector -fPIC -Wall -Werror -fno-common
Linker flags: -O0 -DCLIB_DEBUG -g -DFORTIFY_SOURCE=2
-fstack-protector -fPIC -Wall -Werror -fno-common
Host processor  : x86_64
Target processor: x86_64
Prefix path :
/opt/vpp/external/x86_64;/root/vpp/build-root/install-vpp_debug-native/external
Install prefix  : /root/vpp/build-root/install-vpp_debug-native/vpp
-- Configuring incomplete, errors occurred!
See also 
"/root/vpp/build-root/build-vpp_debug-native/vpp/CMakeFiles/CMakeOutput.log".
See also 
"/root/vpp/build-root/build-vpp_debug-native/vpp/CMakeFiles/CMakeError.log".
Makefile:644: recipe for target 'vpp-configure' failed
make[1]: *** [vpp-configure] Error 1
make[1]: Leaving directory '/root/vpp/build-root'
Makefile:367: recipe for target 'build' failed
make: *** [build] Error 2

CMakeFiles/CMakeOutput.log: https://termbin.com/fhaz
CMakeFiles/CMakeError.log: https://termbin.com/pkh7d

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

View/Reply Online (#13757): https://lists.fd.io/g/vpp-dev/message/13757
Mute This Topic: https://lists.fd.io/mt/32893039/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] Help with two interfaces accessing outside network

2019-08-15 Thread carlito nueno
Hi Balaji,

As far as I know, VPP doesn't have link monitoring to switch routes.
But as you said, I added a cron job to check link status and switch
routes on failure.
I added each interface route to a particular FIB table. This way I am
able to use ping 8.8.8.8 source wan0 or wan1.

Is this the correct way?

Thanks!


On Thu, Aug 15, 2019 at 2:46 PM Balaji B via Lists.Fd.Io
 wrote:
>
> Not sure there is a way to do this without a routing protocol.
>
> Don't think there is link monitoring or path monitoring to switch the default 
> route to backup route.
>
> Maybe you can have a cron job that check the link status and next hop 
> connectivity and switch the route when there is a failure.
>
> Good luck.  -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
>
> View/Reply Online (#13755): https://lists.fd.io/g/vpp-dev/message/13755
> Mute This Topic: https://lists.fd.io/mt/32857184/675621
> 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 (#13756): https://lists.fd.io/g/vpp-dev/message/13756
Mute This Topic: https://lists.fd.io/mt/32857184/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] Help with two interfaces accessing outside network

2019-08-15 Thread Balaji B via Lists.Fd.Io
Not sure there is a way to do this without a routing protocol.

Don't think there is link monitoring or path monitoring to switch the default 
route to backup route.

Maybe you can have a cron job that check the link status and next hop 
connectivity and switch the route when there is a failure.

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

View/Reply Online (#13755): https://lists.fd.io/g/vpp-dev/message/13755
Mute This Topic: https://lists.fd.io/mt/32857184/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] Crash when using dns_name_server

2019-08-15 Thread Dave Barach via Lists.Fd.Io
See https://jira.fd.io/browse/VPP-1746, and 
https://gerrit.fd.io/r/c/vpp/+/21338 which fixes gross non-operation of the 
name resolver.

Process created on demand, with node index in the main_t. Needed to remove the 
static vlib_node_registration_t and use dm->resolver_process_node_index vs. 
unused_mumble_registration.node_index.

Passing 0 when signaling name resolution events couldn’t possibly work.

D.

From: vpp-dev@lists.fd.io  On Behalf Of Dave Barach via 
Lists.Fd.Io
Sent: Thursday, August 15, 2019 2:54 PM
To: anoopnairh...@gmail.com; vpp-dev@lists.fd.io
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Crash when using dns_name_server

Folks,

I’ll look at these issues. It would be helpful if people would contribute 
patches, or at least write Jira tickets. If we don’t know it’s broken, it won’t 
get fixed...

To level-set: the DNS name resolver has been lightly used. Nothing would 
surprise me at this point.

D.

From: vpp-dev@lists.fd.io 
mailto:vpp-dev@lists.fd.io>> On Behalf Of 
anoopnairh...@gmail.com
Sent: Thursday, August 15, 2019 1:07 PM
To: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Crash when using dns_name_server

Hi Carlio,
I had faced a similar crash with DNS module while resolving names.

The dns_cache_lock is in locked state after initialization. Because of this the 
first worker thread which attempts to take this lock will find it in "locked" 
state and spin forever. So the main thread panics when it tries for barrier 
sync.  Attached the patch which solved my problem

I could find couple of other issues in the DNS module and the patch has the fix 
for them as well.
- DNS lock is not released while processing dns request -> causes deadlock
- resolve a name from VAT when there is no server configured  -> crash due 
to a NULL pointer deference
- delete_random_entry() is invoked while holding DNS lock -> a potential 
deadlock

Please check if it helps you.

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

View/Reply Online (#13754): https://lists.fd.io/g/vpp-dev/message/13754
Mute This Topic: https://lists.fd.io/mt/32881233/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] Crash when using dns_name_server

2019-08-15 Thread Dave Barach via Lists.Fd.Io
Folks,

I’ll look at these issues. It would be helpful if people would contribute 
patches, or at least write Jira tickets. If we don’t know it’s broken, it won’t 
get fixed...

To level-set: the DNS name resolver has been lightly used. Nothing would 
surprise me at this point.

D.

From: vpp-dev@lists.fd.io  On Behalf Of 
anoopnairh...@gmail.com
Sent: Thursday, August 15, 2019 1:07 PM
To: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Crash when using dns_name_server

Hi Carlio,
I had faced a similar crash with DNS module while resolving names.

The dns_cache_lock is in locked state after initialization. Because of this the 
first worker thread which attempts to take this lock will find it in "locked" 
state and spin forever. So the main thread panics when it tries for barrier 
sync.  Attached the patch which solved my problem

I could find couple of other issues in the DNS module and the patch has the fix 
for them as well.
- DNS lock is not released while processing dns request -> causes deadlock
- resolve a name from VAT when there is no server configured  -> crash due 
to a NULL pointer deference
- delete_random_entry() is invoked while holding DNS lock -> a potential 
deadlock

Please check if it helps you.

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

View/Reply Online (#13753): https://lists.fd.io/g/vpp-dev/message/13753
Mute This Topic: https://lists.fd.io/mt/32881233/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] Crash when using dns_name_server

2019-08-15 Thread anoopnairhere
Hi Carlio,
I had faced a similar crash with DNS module while resolving names.

The dns_cache_lock is in locked state after initialization. Because of this the 
first worker thread which attempts to take this lock will find it in "locked" 
state and spin forever. So the main thread panics when it tries for barrier 
sync.  Attached the patch which solved my problem

I could find couple of other issues in the DNS module and the patch has the fix 
for them as well.
- DNS lock is not released while processing dns request -> causes deadlock
- resolve a name from VAT when there is no server configured  -> crash due to a 
NULL pointer deference
- delete_random_entry() is invoked while holding DNS lock -> a potential 
deadlock

Please check if it helps you.

thanks
Anoop


vpp-19.01-dns-deadlock-fix.patch
Description: Binary data
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13752): https://lists.fd.io/g/vpp-dev/message/13752
Mute This Topic: https://lists.fd.io/mt/32881233/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 libmemif API

2019-08-15 Thread William Tu
On Thu, Aug 15, 2019 at 8:02 AM William Tu  wrote:
>
> Hi Chengqiang,
>
> Thanks for your reply.
>
> On Wed, Aug 14, 2019 at 11:52 PM Yao, Chengqiang
>  wrote:
> >
> > Hi William,
> >
> > You do not need to copy the packets out of memif. Once you finish 
> > processing all these packets, call memif_refill_queue() function to free 
> > these buffers. Let's say if you receive 32 packets in memif_rx_burst 
> > function, after processing, call memif_refill_queue with count=32 to free.
> >
>
> But if I calling memif_refill_queue() with count=32, then where does
> libmemif get the 32 free buffer to refill on rx?
> And if my code is not copying packet buffer from dev->rx_bufs, how
> does libmemif know that I'm done with these
> 32 packet buffer and libmemif can re-cycle them back to rx?
>
Looking at the source code,

When calling memif_rx_burst(), users get rx buffer from
 b0->data = memif_get_buffer (c, ring, cur_slot & mask);

at index cur_slot and memif_get_buffer() returns buffer at
conn->regions[ring->desc[index].region].addr + ring->desc[index].offset

So users are getting the internal packet buffer from conn->regions
I'd assume I have to tell libmemif that I'm done with this buffer and libmemif
can reuse it later.

Thank you
William

> Regards,
> William
>
> >
> > Best Regards,
> > Chengqiang Yao
> >
> >
> >
> > -Original Message-
> > From: vpp-dev@lists.fd.io  On Behalf Of William Tu
> > Sent: 2019年8月15日 2:07
> > To: vpp-dev@lists.fd.io
> > Subject: [vpp-dev] Question about libmemif API
> >
> > Hi,
> >
> > I'm working on using libmemif in OVS.
> > https://patchwork.ozlabs.org/patch/1140858/
> >
> > While using the API, one question I have is, when I call
> >   err = memif_rx_burst(dev->handle, qid, dev->rx_bufs, NETDEV_MAX_BURST, 
> > );
> >
> > There are 'recv' number of packets are at dev->rx_bufs, do I have to copy 
> > the packet buffer immediately to my master side? For example, I received 32 
> > packets from memif_rx_burst, and I might process these packets in different 
> > order. Once done, is there an API to free each specific packet buffer back 
> > to memif buffer pool?
> >
> > Now the memif_refill_queue() can only specify number of buffers to refill, 
> > not which buffer.
> >
> > Thanks
> > William
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> >
> > View/Reply Online (#13743): https://lists.fd.io/g/vpp-dev/message/13743
> > Mute This Topic: https://lists.fd.io/mt/32866729/675822
> > Group Owner: vpp-dev+ow...@lists.fd.io
> > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [u9012...@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13751): https://lists.fd.io/g/vpp-dev/message/13751
Mute This Topic: https://lists.fd.io/mt/32866729/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] Facing mbuf allocation Error #vpp

2019-08-15 Thread chandan . mohanty
Humble Request  to experts and others to show some lights. I am relatively NEW 
to VPP and blocked here.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13750): https://lists.fd.io/g/vpp-dev/message/13750
Mute This Topic: https://lists.fd.io/mt/32862795/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp=1480452
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 libmemif API

2019-08-15 Thread William Tu
Hi Chengqiang,

Thanks for your reply.

On Wed, Aug 14, 2019 at 11:52 PM Yao, Chengqiang
 wrote:
>
> Hi William,
>
> You do not need to copy the packets out of memif. Once you finish 
> processing all these packets, call memif_refill_queue() function to free 
> these buffers. Let's say if you receive 32 packets in memif_rx_burst 
> function, after processing, call memif_refill_queue with count=32 to free.
>

But if I calling memif_refill_queue() with count=32, then where does
libmemif get the 32 free buffer to refill on rx?
And if my code is not copying packet buffer from dev->rx_bufs, how
does libmemif know that I'm done with these
32 packet buffer and libmemif can re-cycle them back to rx?

Regards,
William

>
> Best Regards,
> Chengqiang Yao
>
>
>
> -Original Message-
> From: vpp-dev@lists.fd.io  On Behalf Of William Tu
> Sent: 2019年8月15日 2:07
> To: vpp-dev@lists.fd.io
> Subject: [vpp-dev] Question about libmemif API
>
> Hi,
>
> I'm working on using libmemif in OVS.
> https://patchwork.ozlabs.org/patch/1140858/
>
> While using the API, one question I have is, when I call
>   err = memif_rx_burst(dev->handle, qid, dev->rx_bufs, NETDEV_MAX_BURST, 
> );
>
> There are 'recv' number of packets are at dev->rx_bufs, do I have to copy the 
> packet buffer immediately to my master side? For example, I received 32 
> packets from memif_rx_burst, and I might process these packets in different 
> order. Once done, is there an API to free each specific packet buffer back to 
> memif buffer pool?
>
> Now the memif_refill_queue() can only specify number of buffers to refill, 
> not which buffer.
>
> Thanks
> William
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
>
> View/Reply Online (#13743): https://lists.fd.io/g/vpp-dev/message/13743
> Mute This Topic: https://lists.fd.io/mt/32866729/675822
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [u9012...@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

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


[vpp-dev] Trouble with tunnel mode IPSec to VPP

2019-08-15 Thread dchons
[Edited Message Follows]

Hello again,

My apologies if this is not the correct place for these kinds of question, I'm 
relatively new to VPP. I would really appreciate any suggestions as to why the 
response to a PING that was received over an IPSec tunnel is not going through 
the tunnel as well, configuration and trace are below.

According to the trace: dpdk-input -> ethernet-input -> ip4-input-no-checksum 
-> ip4-lookup -> ip4-local -> esp4-decrypt -> ip4-input-no-checksum -> 
ip4-lookup ->  ip4-local -> ip4-icmp-input -> ip4-icmp-echo-request -> 
*ip4-load-balance -> ip4-rewrite -> TenGigabitEthernet5/0/0-output -> 
TenGigabitEthernet5/0/0-tx*

In the ip4-load-balance the ICMP response is from 10.0.0.44 to 10.0.0.80, and 
the traffic selectors are in the configuration:
*ikev2 profile set pr1 traffic-selector local ip-range 10.0.0.44 - 10.0.0.44 
port-range 0 - 65535 protocol 0*
*ikev2 profile set pr1 traffic-selector remote ip-range 10.0.0.80 - 10.0.0.80 
port-range 0 - 65535 protocol 0*

Thanks!


Hello devs,

I've been trying to establish an IPSec tunnel between libreswan and VPP using 
IKEv2, I'm able to get the tunnel established and packets coming in to VPP 
decrypted, but it looks like outbound packets from VPP are not going through 
IPSec. The VPP trace is shown below where I can see an ICMP packet coming into 
dpdk-input, through ipsec4-if-input, but the response does not seem to go 
through IPSec. I've run out of things to try and could really use some help, 
any suggestions would be hugely appreciated and I would be happy to contribute 
the solution and lessons learned to the wiki / documentation.

The setup is fairly simple:

[ VPP --- TenGigabitEthernet5/0/0 IP: 10.0.0.44]   [ Libreswan 
10.0.0.80 ]

*VPP configuration commands:*
set interface ip address TenGigabitEthernet5/0/0 10.0.0.44/24
set interface state TenGigabitEthernet5/0/0 up
ikev2 profile add pr1
ikev2 profile set pr1 auth shared-key-mic string thisisavppconnection
ikev2 profile set pr1 id local ip4-addr 10.0.0.44
ikev2 profile set pr1 id remote ip4-addr 10.0.0.80
ikev2 profile set pr1 traffic-selector local ip-range 10.0.0.44 - 10.0.0.44 
port-range 0 - 65535 protocol 0
ikev2 profile set pr1 traffic-selector remote ip-range 10.0.0.80 - 10.0.0.80 
port-range 0 - 65535 protocol 0

# The following commands are executed after the IKE negotiation succeeds and 
ipsec0 is available on the VPP CLI:
set interface state ipsec0 up
set interface unnumbered ipsec0 use TenGigabitEthernet5/0/0

*On the libreswan side:*
conn conn1
left=10.0.0.80
right=10.0.0.44
authby=secret
auto=start
phase2=esp
phase2alg=aes192-sha1
ike=aes256-sha1
ikev2=yes
pfs=yes
type=tunnel

*From the log file we can see the tunnel is established:*
Aug 12 16:41:18 LCI-ALIS-MF pluto[297281]: "conn1" #1: initiating v2 parent SA
Aug 12 16:41:18 LCI-ALIS-MF pluto[297281]: "conn1" #1: local IKE proposals for 
conn1 (IKE SA initiator selecting KE): 
1:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA1;INTEG=HMAC_SHA1_96;DH=MODP2048 
2:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA1;INTEG=HMAC_SHA1_96;DH=MODP1536
Aug 12 16:41:18 LCI-ALIS-MF pluto[297281]: "conn1" #1: STATE_PARENT_I1: sent 
v2I1, expected v2R1
Aug 12 16:41:19 LCI-ALIS-MF pluto[297281]: "conn1" #1: STATE_PARENT_I1: 
retransmission; will wait 0.5 seconds for response
Aug 12 16:41:19 LCI-ALIS-MF pluto[297281]: "conn1" #1: local ESP/AH proposals 
for conn1 (IKE SA initiator emitting ESP/AH proposals): 
1:ESP:ENCR=AES_CBC_192;INTEG=HMAC_SHA1_96;DH=NONE;ESN=DISABLED
Aug 12 16:41:19 LCI-ALIS-MF pluto[297281]: "conn1" #2: STATE_PARENT_I2: sent 
v2I2, expected v2R2 {auth=IKEv2 cipher=aes_256 integ=sha1_96 prf=sha 
group=MODP2048}
Aug 12 16:41:19 LCI-ALIS-MF pluto[297281]: "conn1" #2: IKEv2 mode peer ID is 
ID_IPV4_ADDR: '10.0.0.44'
Aug 12 16:41:19 LCI-ALIS-MF pluto[297281]: "conn1" #2: Authenticated using 
authby=secret
Aug 12 16:41:19 LCI-ALIS-MF pluto[297281]: "conn1" #2: negotiated connection 
[10.0.0.80-10.0.0.80:0-65535 0] -> [10.0.0.44-10.0.0.44:0-65535 0]
Aug 12 16:41:19 LCI-ALIS-MF pluto[297281]: "conn1" #2: STATE_V2_IPSEC_I: IPsec 
SA established tunnel mode {ESP=>0x8ea10d62 <0xa8304143 
xfrm=AES_CBC_192-HMAC_SHA1_96 NATOA=none NATD=none DPD=passive}

*VPP trace:*

Packet 1

00:03:20:698597: dpdk-input
TenGigabitEthernet5/0/0 rx queue 0
buffer 0x9c15e: current data 0, length 166, buffer-pool 0, ref-count 1, 
totlen-nifb 0, trace 0x0
ext-hdr-valid
l4-cksum-computed l4-cksum-correct
PKT MBUF: port 0, nb_segs 1, pkt_len 166
buf_len 2176, data_len 166, ol_flags 0x182, data_off 128, phys_addr 0xb0f05800
packet_type 0x11 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
rss 0x801ce394 fdir.hi 0x0 fdir.lo 0x801ce394
Packet Offload Flags
PKT_RX_RSS_HASH (0x0002) RX packet with RSS hash result
PKT_RX_IP_CKSUM_GOOD (0x0080) IP cksum of RX pkt. is valid
PKT_RX_L4_CKSUM_GOOD (0x0100) L4 cksum of RX pkt. is valid
Packet Types
RTE_PTYPE_L2_ETHER (0x0001) Ethernet packet
RTE_PTYPE_L3_IPV4 (0x0010) 

Re: [vpp-dev] Crash when using dns_name_server

2019-08-15 Thread carlito nueno
Hi Dave,

Yep. When I made the packet trace, I had the dns config bits.

VPP is caching DNS queries

[P] DNS query: id 18
  no-recur recur-des no-trunc non-auth
  2 queries, 0 answers, 0 name-servers, 0 add'l recs
  Queries:
Name: www.apple.com: type A
Name: www.apple.com: type 

But LAN (inside network) device is not able to resolve any url
LAN device is at 10.155.6.202

dig @10.155.6.1 www.apple.com

; <<>> DiG 9.10.6 <<>> @10.155.6.1 www.apple.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

Here is the config I was using:

set int state wan0 up
set int state lan0 up
set int state lan1 up

loopback create
set int l2 bridge loop0 1 bvi
set int ip address loop0 10.155.1.1/24
set int state loop0 up

create sub lan0 1
set int state lan0.1 up
set int l2 bridge lan0.1 1
set int l2 tag-rewrite lan0.1 pop 1
create sub lan1 1
set int state lan1.1 up
set int l2 bridge lan1.1 1
set int l2 tag-rewrite lan1.1 pop 1

create tap id 0 host-ip4-addr 10.155.1.2/24 host-if-name mgmt
set int l2 bridge tap0 1
set int state tap0 up

loopback create
set int l2 bridge loop1 2 bvi
set int ip address loop1 10.155.2.1/24
set int state loop1 up

create sub lan0 2
set int state lan0.2 up
set int l2 bridge lan0.2 2
set int l2 tag-rewrite lan0.2 pop 1
create sub lan1 2
set int state lan1.2 up
set int l2 bridge lan1.2 2
set int l2 tag-rewrite lan1.2 pop 1

create tap id 1 host-ip4-addr 10.155.2.2/24 host-if-name private
set int l2 bridge tap1 2
set int state tap1 up

loopback create
set int l2 bridge loop2 3 bvi
set int ip address loop2 10.155.6.1/24
set int state loop2 up

set int l2 bridge lan0 3
set int l2 bridge lan1 3

create tap id 2 host-ip4-addr 10.155.6.2/24 host-if-name novlan
set int l2 bridge tap2 3
set int state tap2 up

nat44 add interface address wan0
set interface nat44 in loop0 in loop1 in loop2
set interface nat44 out wan0

nat44 add identity mapping external wan0 udp 53053
bin dns_name_server_add_del 8.8.8.8
bin dns_enable_disable


DHCP server settings
OPTION:   6 (  4) DNS server10.155.6.1
OPTION:   3 (  4) Routers  10.155.6.1

Thanks!

On Thu, Aug 15, 2019 at 5:02 AM Dave Barach (dbarach)  wrote:
>
> Four bits of config required:
>
> nat44 add identity mapping external GigabitEthernet3/0/0 udp 53053
> binary-api dns_name_server_add_del 8.8.8.8
> binary-api dns_enable_disable
>
> Inside network DHCP server needs to set option 6 (DNS name server) to the vpp 
> gateway address.
>
> D.
>
> -Original Message-
> From: vpp-dev@lists.fd.io  On Behalf Of carlito nueno
> Sent: Wednesday, August 14, 2019 11:46 PM
> To: Carlito Nueno 
> Cc: vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] Crash when using dns_name_server
>
> Did a packet trace and I noticed two things:
>
> dns4-request: DNS pkts pending upstream name resolution
> nat44-out2in: no translation
>
>
> Packet 8
>
> 00:28:11:659028: dpdk-input
>   lan1 rx queue 0
>   buffer 0x8aeef: current data 0, length 89, buffer-pool 0, ref-count 1, 
> totlen-nifb 0, trace 0x5
>   ext-hdr-valid
>   l4-cksum-computed l4-cksum-correct
>   PKT MBUF: port 2, nb_segs 1, pkt_len 89
> buf_len 2176, data_len 89, ol_flags 0x180, data_off 128, phys_addr
> 0xe64bbc40
> packet_type 0x211 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
> rss 0x0 fdir.hi 0x0 fdir.lo 0x0
> Packet Offload Flags
>   PKT_RX_IP_CKSUM_GOOD (0x0080) IP cksum of RX pkt. is valid
>   PKT_RX_L4_CKSUM_GOOD (0x0100) L4 cksum of RX pkt. is valid
> Packet Types
>   RTE_PTYPE_L2_ETHER (0x0001) Ethernet packet
>   RTE_PTYPE_L3_IPV4 (0x0010) IPv4 packet without extension headers
>   RTE_PTYPE_L4_UDP (0x0200) UDP packet
>   IP4: a0:36:9f:3b:a2:b2 -> de:ad:00:00:00:05
>   UDP: 10.155.6.203 -> 10.155.6.1
> tos 0x00, ttl 64, length 75, checksum 0x55ce
> fragment id 0xc2d2, flags DONT_FRAGMENT
>   UDP: 33177 -> 53
> length 55, checksum 0x96d9
> 00:28:11:659031: ethernet-input
>   frame: flags 0x3, hw-if-index 3, sw-if-index 3
>   IP4: a0:36:9f:3b:a2:b2 -> de:ad:00:00:00:05
> 00:28:11:659032: l2-input
>   l2-input: sw_if_index 3 dst de:ad:00:00:00:05 src a0:36:9f:3b:a2:b2
> 00:28:11:659033: l2-learn
>   l2-learn: sw_if_index 3 dst de:ad:00:00:00:05 src a0:36:9f:3b:a2:b2 
> bd_index 6
> 00:28:11:659034: l2-fwd
>   l2-fwd:   sw_if_index 3 dst de:ad:00:00:00:05 src a0:36:9f:3b:a2:b2
> bd_index 6 result [0x70025, 37] static age-not bvi
> 00:28:11:659036: ip4-input
>   UDP: 10.155.6.203 -> 10.155.6.1
> tos 0x00, ttl 64, length 75, checksum 0x55ce
> fragment id 0xc2d2, flags DONT_FRAGMENT
>   UDP: 33177 -> 53
> length 55, checksum 0x96d9
> 00:28:11:659037: nat44-in2out
>   NAT44_IN2OUT_FAST_PATH: sw_if_index 37, next index 3, session -1
> 00:28:11:659037: nat44-in2out-slowpath
>   NAT44_IN2OUT_SLOW_PATH: sw_if_index 37, next index 0, session -1
> 00:28:11:659038: ip4-lookup
>   fib 0 dpo-idx 10 flow hash: 0x
>   UDP: 10.155.6.203 -> 10.155.6.1
> 

Re: [vpp-dev] vppcom_session_connect blocking or non blocking

2019-08-15 Thread Florin Coras
Hi Max,

Not at this time. It should be possible with a few changes for nonblocking 
sessions. I’ll add it to my list, in case nobody else beats me to it. 

Florin

> On Aug 15, 2019, at 2:47 AM, Max A. via Lists.Fd.Io 
>  wrote:
> 
> Hello,
> 
> Can vppcom_session_connect() function run in non-blocking mode? I see that 
> there is a wait for the connection result in the 
> vppcom_wait_for_session_state_change function.  Is it possible to get the 
> result of the connection using vppcom_epoll_wait?
> 
> Thanks.
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#13745): https://lists.fd.io/g/vpp-dev/message/13745
> Mute This Topic: https://lists.fd.io/mt/32885087/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 (#13747): https://lists.fd.io/g/vpp-dev/message/13747
Mute This Topic: https://lists.fd.io/mt/32885087/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] Crash when using dns_name_server

2019-08-15 Thread Dave Barach via Lists.Fd.Io
Four bits of config required:

nat44 add identity mapping external GigabitEthernet3/0/0 udp 53053
binary-api dns_name_server_add_del 8.8.8.8
binary-api dns_enable_disable

Inside network DHCP server needs to set option 6 (DNS name server) to the vpp 
gateway address.

D.

-Original Message-
From: vpp-dev@lists.fd.io  On Behalf Of carlito nueno
Sent: Wednesday, August 14, 2019 11:46 PM
To: Carlito Nueno 
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Crash when using dns_name_server

Did a packet trace and I noticed two things:

dns4-request: DNS pkts pending upstream name resolution
nat44-out2in: no translation


Packet 8

00:28:11:659028: dpdk-input
  lan1 rx queue 0
  buffer 0x8aeef: current data 0, length 89, buffer-pool 0, ref-count 1, 
totlen-nifb 0, trace 0x5
  ext-hdr-valid
  l4-cksum-computed l4-cksum-correct
  PKT MBUF: port 2, nb_segs 1, pkt_len 89
buf_len 2176, data_len 89, ol_flags 0x180, data_off 128, phys_addr
0xe64bbc40
packet_type 0x211 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
rss 0x0 fdir.hi 0x0 fdir.lo 0x0
Packet Offload Flags
  PKT_RX_IP_CKSUM_GOOD (0x0080) IP cksum of RX pkt. is valid
  PKT_RX_L4_CKSUM_GOOD (0x0100) L4 cksum of RX pkt. is valid
Packet Types
  RTE_PTYPE_L2_ETHER (0x0001) Ethernet packet
  RTE_PTYPE_L3_IPV4 (0x0010) IPv4 packet without extension headers
  RTE_PTYPE_L4_UDP (0x0200) UDP packet
  IP4: a0:36:9f:3b:a2:b2 -> de:ad:00:00:00:05
  UDP: 10.155.6.203 -> 10.155.6.1
tos 0x00, ttl 64, length 75, checksum 0x55ce
fragment id 0xc2d2, flags DONT_FRAGMENT
  UDP: 33177 -> 53
length 55, checksum 0x96d9
00:28:11:659031: ethernet-input
  frame: flags 0x3, hw-if-index 3, sw-if-index 3
  IP4: a0:36:9f:3b:a2:b2 -> de:ad:00:00:00:05
00:28:11:659032: l2-input
  l2-input: sw_if_index 3 dst de:ad:00:00:00:05 src a0:36:9f:3b:a2:b2
00:28:11:659033: l2-learn
  l2-learn: sw_if_index 3 dst de:ad:00:00:00:05 src a0:36:9f:3b:a2:b2 bd_index 6
00:28:11:659034: l2-fwd
  l2-fwd:   sw_if_index 3 dst de:ad:00:00:00:05 src a0:36:9f:3b:a2:b2
bd_index 6 result [0x70025, 37] static age-not bvi
00:28:11:659036: ip4-input
  UDP: 10.155.6.203 -> 10.155.6.1
tos 0x00, ttl 64, length 75, checksum 0x55ce
fragment id 0xc2d2, flags DONT_FRAGMENT
  UDP: 33177 -> 53
length 55, checksum 0x96d9
00:28:11:659037: nat44-in2out
  NAT44_IN2OUT_FAST_PATH: sw_if_index 37, next index 3, session -1
00:28:11:659037: nat44-in2out-slowpath
  NAT44_IN2OUT_SLOW_PATH: sw_if_index 37, next index 0, session -1
00:28:11:659038: ip4-lookup
  fib 0 dpo-idx 10 flow hash: 0x
  UDP: 10.155.6.203 -> 10.155.6.1
tos 0x00, ttl 64, length 75, checksum 0x55ce
fragment id 0xc2d2, flags DONT_FRAGMENT
  UDP: 33177 -> 53
length 55, checksum 0x96d9
00:28:11:659040: ip4-local
UDP: 10.155.6.203 -> 10.155.6.1
  tos 0x00, ttl 64, length 75, checksum 0x55ce
  fragment id 0xc2d2, flags DONT_FRAGMENT
UDP: 33177 -> 53
  length 55, checksum 0x96d9
00:28:11:659041: ip4-local-end-of-arc
UDP: 10.155.6.203 -> 10.155.6.1
  tos 0x00, ttl 64, length 75, checksum 0x55ce
  fragment id 0xc2d2, flags DONT_FRAGMENT
UDP: 33177 -> 53
  length 55, checksum 0x96d9
00:28:11:659041: ip4-udp-lookup
  UDP: src-port 33177 dst-port 53
00:28:11:659042: dns4-request
  DNS46_REPLY: pool index -1, disposition  6
00:28:11:659044: error-drop
  rx:loop5
00:28:11:659044: drop
  dns4-request: DNS pkts pending upstream name resolution

Packet 9

00:28:13:589187: dpdk-input
  wan0 rx queue 0
  buffer 0x504bc: current data 0, length 113, buffer-pool 0, ref-count 1, 
totlen-nifb 0, trace 0x8
  ext-hdr-valid
  l4-cksum-computed l4-cksum-correct
  PKT MBUF: port 5, nb_segs 1, pkt_len 113
buf_len 2176, data_len 113, ol_flags 0x180, data_off 128, phys_addr 
0xe5a12f80
packet_type 0x211 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
rss 0x0 fdir.hi 0x0 fdir.lo 0x0
Packet Offload Flags
  PKT_RX_IP_CKSUM_GOOD (0x0080) IP cksum of RX pkt. is valid
  PKT_RX_L4_CKSUM_GOOD (0x0100) L4 cksum of RX pkt. is valid
Packet Types
  RTE_PTYPE_L2_ETHER (0x0001) Ethernet packet
  RTE_PTYPE_L3_IPV4 (0x0010) IPv4 packet without extension headers
  RTE_PTYPE_L4_UDP (0x0200) UDP packet
  IP4: 4a:1d:70:63:fc:d4 -> 06:35:31:eb:33:22
  UDP: 8.8.8.8 -> 72.33.156.100
tos 0x20, ttl 122, length 99, checksum 0x94c7
fragment id 0x9ea9
  UDP: 53 -> 53053
length 79, checksum 0x9c5e
00:28:13:589189: ethernet-input
  frame: flags 0x3, hw-if-index 6, sw-if-index 6
  IP4: 4a:1d:70:63:fc:d4 -> 06:35:31:eb:33:22
00:28:13:589190: ip4-input-no-checksum
  UDP: 8.8.8.8 -> 72.33.156.100
tos 0x20, ttl 122, length 99, checksum 0x94c7
fragment id 0x9ea9
  UDP: 53 -> 53053
length 79, checksum 0x9c5e
00:28:13:589191: nat44-out2in
  NAT44_OUT2IN: sw_if_index 6, next index 0, session index -1
00:28:13:589192: error-drop
  rx:wan0
00:28:13:589192: drop
  nat44-out2in: no 

[vpp-dev] vppcom_session_connect blocking or non blocking

2019-08-15 Thread Max A. via Lists.Fd.Io
Hello,

Can vppcom_session_connect() function run in non-blocking mode? I see that 
there is a wait for the connection result in the 
vppcom_wait_for_session_state_change function. Is it possible to get the result 
of the connection using vppcom_epoll_wait?

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

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


[vpp-dev] envoy & vpp integration

2019-08-15 Thread Guo, Ruijing
Hi,

I saw https://github.com/envoyproxy/envoy/pull/5177 was merged.
What's status for envoy & vpp integration?
What version of vpp support it? For CNI, Only contiv-vpp support it?

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

View/Reply Online (#13744): https://lists.fd.io/g/vpp-dev/message/13744
Mute This Topic: https://lists.fd.io/mt/32884397/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 libmemif API

2019-08-15 Thread Yao, Chengqiang
Hi William,

You do not need to copy the packets out of memif. Once you finish 
processing all these packets, call memif_refill_queue() function to free these 
buffers. Let's say if you receive 32 packets in memif_rx_burst function, after 
processing, call memif_refill_queue with count=32 to free.


Best Regards,
Chengqiang Yao



-Original Message-
From: vpp-dev@lists.fd.io  On Behalf Of William Tu
Sent: 2019年8月15日 2:07
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] Question about libmemif API

Hi,

I'm working on using libmemif in OVS.
https://patchwork.ozlabs.org/patch/1140858/

While using the API, one question I have is, when I call
  err = memif_rx_burst(dev->handle, qid, dev->rx_bufs, NETDEV_MAX_BURST, );

There are 'recv' number of packets are at dev->rx_bufs, do I have to copy the 
packet buffer immediately to my master side? For example, I received 32 packets 
from memif_rx_burst, and I might process these packets in different order. Once 
done, is there an API to free each specific packet buffer back to memif buffer 
pool?

Now the memif_refill_queue() can only specify number of buffers to refill, not 
which buffer.

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

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